Plz Help Needed! The type initializer threw an exception. ---> System.UnauthorizedAccessException: A

B

batista

Hello All,

I have windows server 2003 with IIS 6.0..
I have a webservice that is using a vc7 dll which in turn is using a
com dll...now....

there is a function there in that vc7 dll that is using the com dll to
connect to a server running on different machine.

Now when I call that function from webservice its giving me eception
that

System.TypeInitializationException: The type initializer for
"TraderComponent.InteropWeb" threw an exception. --->
System.UnauthorizedAccessException: Access is denied.

TraderComponent is my vc7 dlls name...and interopweb is the class
contaning that function..

BTW this whole thing is working fine in windowx XP....

I thnk it has something to do with the permission rights etc....

Plz help me out on this...
Wats causing the problem...

Thanks
Cheers...

Bye.
 
J

Joe Kaplan \(MVP - ADSI\)

The fact that is a TypeInitializerException seems to indicate that you have
a static constructor of some sort in this class that is trying to initialize
your class, so the exception is being thrown there. However, the underlying
issue is either a local ACL problem (on a file or reg key or something) or a
delegation issue if you are trying to access a component on another network
node via some sort of RPC mechanism.

If this is an issue involving some local resources that are ACLed
incorrectly, sometimes using filemon or regmon on the server and looking for
"access denied" messages from the worker process will identify the problem
and give you a quick fix.

If the issue is related to the RPC, then we need more details. Can you talk
a bit more about the RPC mechanism in question, how the current Windows
security context in your web application was established (IWA, Basic, forms
auth, impersonation settings, etc.) and how you were expecting the security
context to flow to the remote machine.

Joe K.
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top