Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Bug in Interop?

Reply
Thread Tools

Bug in Interop?

 
 
Michael
Guest
Posts: n/a
 
      10-29-2003

Hi, we have a small web service that calls into some VB6
com components. There is only one call to these
components and this is done on a new thread in order to
use impersonation. The problem is that on every other
call into the Com components the aspnet_wp.exe throws an
unhandled exception " 0xC0000005: Access violation
reading location " and recycles itself.

Has anyone else ran into this. Not sure what could be
causing this. Any ideas?

Also, releasecomobject is being called and even tried
garbage collecting......

Thanks for any insight....

 
Reply With Quote
 
 
 
 
Chris Botha
Guest
Posts: n/a
 
      10-30-2003
Michael, you don't need a new thread for impersonation, switch off anonymous
access to the web app and put
<identity impersonate="true" />
in your web.config file under the line <system.web> and use the main
thread and see what it does (for sure VB6 com components are not thread
safe, but it may be irrelevant in your case).

"Michael" <(E-Mail Removed)> wrote in message
news:0cbf01c39e76$f3dbe570$(E-Mail Removed)...
>
> Hi, we have a small web service that calls into some VB6
> com components. There is only one call to these
> components and this is done on a new thread in order to
> use impersonation. The problem is that on every other
> call into the Com components the aspnet_wp.exe throws an
> unhandled exception " 0xC0000005: Access violation
> reading location " and recycles itself.
>
> Has anyone else ran into this. Not sure what could be
> causing this. Any ideas?
>
> Also, releasecomobject is being called and even tried
> garbage collecting......
>
> Thanks for any insight....
>



 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      10-30-2003

From what I have read you need to create a new thread in
a web service when accessing Com components. This is not
true when working with Asp.net. Only web services...

>-----Original Message-----
>Michael, you don't need a new thread for impersonation,

switch off anonymous
>access to the web app and put
><identity impersonate="true" />
>in your web.config file under the line <system.web>

and use the main
>thread and see what it does (for sure VB6 com components

are not thread
>safe, but it may be irrelevant in your case).
>
>"Michael" <(E-Mail Removed)> wrote in message
>news:0cbf01c39e76$f3dbe570$(E-Mail Removed)...
>>
>> Hi, we have a small web service that calls into some

VB6
>> com components. There is only one call to these
>> components and this is done on a new thread in order

to
>> use impersonation. The problem is that on every other
>> call into the Com components the aspnet_wp.exe throws

an
>> unhandled exception " 0xC0000005: Access violation
>> reading location " and recycles itself.
>>
>> Has anyone else ran into this. Not sure what could be
>> causing this. Any ideas?
>>
>> Also, releasecomobject is being called and even tried
>> garbage collecting......
>>
>> Thanks for any insight....
>>

>
>
>.
>

 
Reply With Quote
 
Chris Botha
Guest
Posts: n/a
 
      10-30-2003
Hi.

This is interesting. Can you remember where you read it? I'm asking,
because I don't do it.

Thanks.

<(E-Mail Removed)> wrote in message
news:0ac601c39ef2$66145a70$(E-Mail Removed)...
>
> From what I have read you need to create a new thread in
> a web service when accessing Com components. This is not
> true when working with Asp.net. Only web services...
>
> >-----Original Message-----
> >Michael, you don't need a new thread for impersonation,

> switch off anonymous
> >access to the web app and put
> ><identity impersonate="true" />
> >in your web.config file under the line <system.web>

> and use the main
> >thread and see what it does (for sure VB6 com components

> are not thread
> >safe, but it may be irrelevant in your case).
> >
> >"Michael" <(E-Mail Removed)> wrote in message
> >news:0cbf01c39e76$f3dbe570$(E-Mail Removed)...
> >>
> >> Hi, we have a small web service that calls into some

> VB6
> >> com components. There is only one call to these
> >> components and this is done on a new thread in order

> to
> >> use impersonation. The problem is that on every other
> >> call into the Com components the aspnet_wp.exe throws

> an
> >> unhandled exception " 0xC0000005: Access violation
> >> reading location " and recycles itself.
> >>
> >> Has anyone else ran into this. Not sure what could be
> >> causing this. Any ideas?
> >>
> >> Also, releasecomobject is being called and even tried
> >> garbage collecting......
> >>
> >> Thanks for any insight....
> >>

> >
> >
> >.
> >



 
Reply With Quote
 
Guest
Posts: n/a
 
      10-30-2003

We need our Com components to use a different user than
the Aspnet account....

see this microsoft article
http://support.microsoft.com/default.aspx?scid=kb;en-
us;325791


>-----Original Message-----
>Hi.
>
>This is interesting. Can you remember where you read

it? I'm asking,
>because I don't do it.
>
>Thanks.
>
><(E-Mail Removed)> wrote in message
>news:0ac601c39ef2$66145a70$(E-Mail Removed)...
>>
>> From what I have read you need to create a new thread

in
>> a web service when accessing Com components. This is

not
>> true when working with Asp.net. Only web services...
>>
>> >-----Original Message-----
>> >Michael, you don't need a new thread for

impersonation,
>> switch off anonymous
>> >access to the web app and put
>> ><identity impersonate="true" />
>> >in your web.config file under the line <system.web>

>> and use the main
>> >thread and see what it does (for sure VB6 com

components
>> are not thread
>> >safe, but it may be irrelevant in your case).
>> >
>> >"Michael" <(E-Mail Removed)> wrote in message
>> >news:0cbf01c39e76$f3dbe570$(E-Mail Removed)...
>> >>
>> >> Hi, we have a small web service that calls into some

>> VB6
>> >> com components. There is only one call to these
>> >> components and this is done on a new thread in

order
>> to
>> >> use impersonation. The problem is that on every

other
>> >> call into the Com components the aspnet_wp.exe

throws
>> an
>> >> unhandled exception " 0xC0000005: Access violation
>> >> reading location " and recycles itself.
>> >>
>> >> Has anyone else ran into this. Not sure what could

be
>> >> causing this. Any ideas?
>> >>
>> >> Also, releasecomobject is being called and even

tried
>> >> garbage collecting......
>> >>
>> >> Thanks for any insight....
>> >>
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
Chris Botha
Guest
Posts: n/a
 
      10-30-2003
I had a look at the article, frightening.
What I said in my first response above was you don't have to use a second
thread in order to impersonate. I'm calling COM components with
impersonation from the main thread, and it works - after reading the article
I'm a bit nervous though. In any case, this is what I do
(1) Take off anonymous access to the virtual directory (Internet Services
Manager)
(2) Make the following entry in the web.config file, under the line that
says "<system.web>", put a line
"<identity impersonate="true"/>"

Now you should be able to call the WEB Service from IE already, however, if
you use a Windows app that calls the service, then you may have to call
myService.Credentials = new NetworkCredential(...) or use the
DefaultCredentials.
Note that you can also "hard-code" the UserName/Password in the web.config
file, have a look at
http://msdn.microsoft.com/library/de...ersonation.asp

Please let me know if this works, so I can shrug off the nervousness.


<(E-Mail Removed)> wrote in message
news:0ce401c39efe$abc45b40$(E-Mail Removed)...
>
> We need our Com components to use a different user than
> the Aspnet account....
>
> see this microsoft article
> http://support.microsoft.com/default.aspx?scid=kb;en-
> us;325791
>
>
> >-----Original Message-----
> >Hi.
> >
> >This is interesting. Can you remember where you read

> it? I'm asking,
> >because I don't do it.
> >
> >Thanks.
> >
> ><(E-Mail Removed)> wrote in message
> >news:0ac601c39ef2$66145a70$(E-Mail Removed)...
> >>
> >> From what I have read you need to create a new thread

> in
> >> a web service when accessing Com components. This is

> not
> >> true when working with Asp.net. Only web services...
> >>
> >> >-----Original Message-----
> >> >Michael, you don't need a new thread for

> impersonation,
> >> switch off anonymous
> >> >access to the web app and put
> >> ><identity impersonate="true" />
> >> >in your web.config file under the line <system.web>
> >> and use the main
> >> >thread and see what it does (for sure VB6 com

> components
> >> are not thread
> >> >safe, but it may be irrelevant in your case).
> >> >
> >> >"Michael" <(E-Mail Removed)> wrote in message
> >> >news:0cbf01c39e76$f3dbe570$(E-Mail Removed)...
> >> >>
> >> >> Hi, we have a small web service that calls into some
> >> VB6
> >> >> com components. There is only one call to these
> >> >> components and this is done on a new thread in

> order
> >> to
> >> >> use impersonation. The problem is that on every

> other
> >> >> call into the Com components the aspnet_wp.exe

> throws
> >> an
> >> >> unhandled exception " 0xC0000005: Access violation
> >> >> reading location " and recycles itself.
> >> >>
> >> >> Has anyone else ran into this. Not sure what could

> be
> >> >> causing this. Any ideas?
> >> >>
> >> >> Also, releasecomobject is being called and even

> tried
> >> >> garbage collecting......
> >> >>
> >> >> Thanks for any insight....
> >> >>
> >> >
> >> >
> >> >.
> >> >

> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*bug* *bug* *bug* David Raleigh Arnold Firefox 12 04-02-2007 03:13 AM
ASP.NET Login control bug or SQL 2005 bug? RedEye ASP .Net 2 12-13-2005 10:57 AM
Re: BUG? OR NOT A BUG? John ASP .Net 2 09-21-2005 10:31 AM
Bug Parade Bug 4953793 Michel Joly de Lotbiniere Java 4 12-02-2003 05:05 AM
how to report bug to g++ ? got a bug and fixed up source code DarkSpy C++ 4 06-27-2003 09:05 AM



Advertisments