.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

ASP File Error

I have a small ASP.NET app that I wrote and let me say loud and clear I am by no means an expert on ASP.NET or web servers. I just did enough to solve the problem I had.

It has been working fine for years. Today, all of a sudden its not able to open some text files it reads from a network drive. The error is "Logon failure: unknown user name or bad password.".

I am not directly using a name or password anywhere in my code, so I assume this is related to the ID under which the process executes. I have impersonation set in WEB.CONFIG to myself (Greg) and I know for sure the user specified is valid and can read all the files in question.

The user ID returned by WindowsIdentity.GetCurrent is 'Greg' so I believe impersonation really is working. Though the ID shown in Task Manager is ASPNET, and ASPNET probably doesn't have NTFS access to those files.

Any ideas appreciated. I have been googling around for a couple hours now and am starting to lose hope.
Greg Send private email
Tuesday, July 25, 2006
 
 
The ID in Task Manager that I am referring to is for ASPNET_WP.EXE which I believe is the thing that is actually executing the ASP.NET code underneath IIS. And if it matters its WINXP, IIS 6.0.
Greg Send private email
Tuesday, July 25, 2006
 
 
You might try modifying your local security policy (admin tools) and allow the ASPNET account to "Act As Part Of the Operating System".

The impersonation is probably failing because the ASPNET account doesn't have enough local rights.  I'm not sure why it would have worked in the past and has suddenly stopped.

Clearly there are potential security concerns in doing this step above...
GiorgioG Send private email
Tuesday, July 25, 2006
 
 
And don't forget to restart IIS (and possibly reboot) to get the setting to take effect.
GiorgioG Send private email
Tuesday, July 25, 2006
 
 
Just wanted to say THANKS Giorgio for taking the time to reply. Best wishes.
NetFreak Send private email
Wednesday, July 26, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz