Re: Access to the path is denied: Assembly Permission Problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for the reply.

You are right. It was a delegation configuration problem (and, I myself,
was not entirely convinced it was a GAC problem).

Unfortunately, my initial analysis of the problem was a little off. There
was another distinctive feature occurring in this part of the code that I had
overlooked (besides it being a portion of code in the GAC). This entire
portion of the code was also launched within a new child thread.

It was a thread permission problem not a GAC permission problem. The thread
did not receive the impersonation attributes of the parent and instead
reverted to the "NETWORK SERVICE" account (which, of course, doesn't have
access to the share). After talking to a Microsoft engineer, I discovered
that this occurred because the default application pool I was using
("DefaultAppPool", defined in IIS 6.0) always uses the "NETWORK SERVICE"
account when a new thread is created despite the credentials of its parent.

Luckily, the account for the pool can be changed. But, instead of doing
that, I decided to create a new application pool, assign the pool my domain
account and then assign the virtual directory the newly created application
pool (replacing the reference to the default pool). Once I did that,
everything worked fine.

One note about changing a virtual directory to use a new application pool;
you need to add back the permission for your domain account to access the
registry key "ASPNET_SETREG" (if you are using "aspnet_setreg.exe" to encrypt
your username and password).

While everything works now; ideally, it seems to me that the new thread
should have received the parent's impersonation credentials and that the
"NETWORK SERVICE" account should have only been used for the default pool if
impersonation had not been specified. Regardless, I have a workable
solution, so, I probably don't care anymore about what I think should have
happened…

Thanks again.

--Charles

"richlm" wrote:

> Are you sure this is not related to configuration of delegation?
>
> Even if the logged-on-user has access to the share, a process running-as or
> impersonating the user does not, by default, have the same level of network
> access.
>
> In Windows server 2000 domains, delegation is either on or off for each user
> account.
>
> In domains raised to "Windows 2003" functional level it can be configured
> for each server/service for each user.
>
> Try following KB articles for more info
> http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/a9fd0aa2-301c-42b3-a7b1-2595631c389f.mspx
> (or search google with - including quotes - "Allow a user to be trusted for
> delegation")
>
> Also http://support.microsoft.com/kb/810572
>
>
>
.



Relevant Pages

  • Re: Access to the path is denied: Assembly Permission Problem
    ... > It was a thread permission problem not a GAC permission problem. ... the account for the pool can be changed. ...
    (microsoft.public.dotnet.security)
  • Re: Incoming E-Mail - cant create contact in OU
    ... central admin pool different than the web app. ... that account a little (if the web app is compromised or something, ... So I started with giving the app pool account domain admins permissions then ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Incoming E-Mail - cant create contact in OU
    ... already have the application pool delegated rights to the OU. ... In my experience it is because you didn't quite delegate enough rights to ... the account in the OU. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Incoming E-Mail - cant create contact in OU
    ... I too am worried about giving the app pool (and remember, ... local admin rights to the server hosting incoming email. ... If your app pool account is also the farm account, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: ASP using ADSI
    ... Kerberos auth (which you need for delegation) requires users in AD. ... I've just done all the ASP ... account in every bind operation. ... My environment is an NT4 domain that is being migrated to W2K3 AD domain. ...
    (microsoft.public.windows.server.active_directory)