|
-
May 31st, 2007, 04:57 AM
#1
Thread Starter
Addicted Member
[2005] Logon failure: unknown user name or bad password
Hi,
I'm getting an "Logon failure: unknown user name or bad password" error when I try to view my ASP.NET page through IIS or IE7. Everything works fine when I debug it using VWD 2005 Express.
What the code is doing is checking for the existence of a specific folder within System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), and if it doesn't exist, create it.
In VWD, it creates the folder if necessary, and copies a couple of XML files into it.
Outside VWD, it doesn't create the folder, and highlights the line to copy files into it as being the problem - probably because the folder doesn't exist.
I suspect that it is running the code through IIS or IE7 as user: IWAM_[Machine Name], but debugs the code in VWD as me.
Any ideas how I get around this problem?
-
May 31st, 2007, 07:02 AM
#2
Re: [2005] Logon failure: unknown user name or bad password
if you are running on winxp make sure the ASP.NET account has read/write permissions for that directory if on win2k or win2k3 make sure that NETWORK SERVICES (i think that right) has read/write permissions for that directory
-
Jun 1st, 2007, 09:42 AM
#3
Thread Starter
Addicted Member
Re: [2005] Logon failure: unknown user name or bad password
Thanks for your reply.
I've noticed that the problem seems to be to do with the network location of the source xml files I want to copy to the local hard disk.
If I change the source to a local location, IIS and IE7 work fine.
I only want to copy them to a local location because I seem to have problems trying to access the source xml on the network drive.
Any ideas?
-
Jun 1st, 2007, 09:43 AM
#4
Re: [2005] Logon failure: unknown user name or bad password
Does the directory containing the XML file have read/write permissions for the project?
-
Jun 4th, 2007, 03:17 PM
#5
Re: [2005] Logon failure: unknown user name or bad password
You're right, when in debug mode, the security context is you. And you have permission to perform those actions. When running under otherwise, it will use ASPNET or NETWORK SERVICE. Give both of these accounts full permissions on the folders to which you want to write something or create something.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|