Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Plz Help Needed! The type initializer threw an exception. ---> System.UnauthorizedAccessException: Access is denied

Reply
Thread Tools

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

 
 
batista
Guest
Posts: n/a
 
      03-04-2006
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.

 
Reply With Quote
 
 
 
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      03-04-2006
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.

"batista" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.
>



 
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
The type initializer threw an exception Fredrik Kronander ASP .Net 3 05-29-2008 04:41 PM
The type initializer for 'System.Web.UI.BaseParser' threw an exception. bmayer@mnepilepsy.net ASP .Net 0 07-31-2006 01:23 PM
Plz Help Needed! The type initializer threw an exception. ---> System.UnauthorizedAccessException: Access is denied batista ASP .Net 0 03-04-2006 12:29 PM
The type initializer for 'MyClass' threw an exception. ibiza ASP .Net 1 02-25-2006 04:37 PM
Re: plz help!!! plz plz plz plzplzplz help the noob alkzy Microsoft Certification 0 10-31-2004 10:04 PM



Advertisments