ASP.NET not executing interop functions

G

Guest

Hello everyone, Im having a rather strange problem with my custom ASP.NET
application. After deploying the application on a .NET v1.1 computer, the
first time the application is launched it can call an external interop and
excute commands with no problems. However, when the same system is restarted
and my application is relauched the COM commands do not function (asp &
managed code still works fine).

When I alter the permissions of any file in my application's web folder the
COM interop functions begin working again. Sometimes I open up my web config
add a blank space to the end of the file, save & exit, and voila the COM
interop works again (temporarily - until the next restart).

What is going on, is the CLR not loading the COM interop correctly? How do I
resolve this issue?
 
R

Rick Strahl [MVP]

Hi Jas,

Your best bet likely will be to stick the COM component into a COM+
Application and then assign an Impersonation to the COM+ Application.

The problem most likely is that the ASP.NET account (ASPNET or NETWORK
SERVICE by default) - which is doesn't have rights to access the DLL or
access what ever the DLL needs to have access to. IF you don't use COM+ the
DLL just inherits the ASP.NET security token.

So the two choices are: Use COM+ as described or lower the security to give
the ASP.NET account the rights it needs to access the DLL and anything the
DLL accesses. If at all possible the former is probably the better approach.
<g>

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
 
G

Guest

I managed a work-around by giving the ASP.NET account increased security
priveledges, thanks for your help Rick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top