|
 |
aspx_beginners thread: How to access a file over the network
Message #1 by "Richard Krol" <rich@r...> on Thu, 25 Jul 2002 11:00:11 -0400
|
|
I am trying to access a file using a stream reader from a network location
and get an error
System.IO.IOException: Logon failure: unknown user name or bad password.
Could someone help me remedy this proplem. thank you. rich
Message #2 by "Michael Spiering" <mspier@n...> on Thu, 25 Jul 2002 10:54:28 -0500
|
|
Does the aspnet_wp user have access to the share?
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 9:00 AM
To: aspx_beginners
Subject: [aspx_beginners] How to access a file over the network
I am trying to access a file using a stream reader from a network location
and get an error
System.IO.IOException: Logon failure: unknown user name or bad password.
Could someone help me remedy this proplem. thank you. rich
Message #3 by "Richard Krol" <rich@r...> on Thu, 25 Jul 2002 12:16:16 -0400
|
|
I setup a separate security account for the IIS website and ASP.Net
Application.
Both are using this new account.
Do I have to use the ASPNET user account?
-----Original Message-----
From: Michael Spiering [mailto:mspier@n...]
Sent: Thursday, July 25, 2002 11:54 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
Does the aspnet_wp user have access to the share?
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 9:00 AM
To: aspx_beginners
Subject: [aspx_beginners] How to access a file over the network
I am trying to access a file using a stream reader from a network location
and get an error
System.IO.IOException: Logon failure: unknown user name or bad password.
Could someone help me remedy this proplem. thank you. rich
Message #4 by "Michael Spiering" <mspier@n...> on Thu, 25 Jul 2002 13:10:35 -0500
|
|
There should be no reason that you are forced to use the default account for
ASP. My guess is still that you aren't using the account you think you are.
You could check this value at the point where you are accessing the file:
System.Security.Principal.WindowsIdentity.GetCurrent().Name
There is an impersonate method in WindowsIdentity that might help you.
Michael
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 10:16 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
I setup a separate security account for the IIS website and ASP.Net
Application.
Both are using this new account.
Do I have to use the ASPNET user account?
-----Original Message-----
From: Michael Spiering [mailto:mspier@n...]
Sent: Thursday, July 25, 2002 11:54 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
Does the aspnet_wp user have access to the share?
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 9:00 AM
To: aspx_beginners
Subject: [aspx_beginners] How to access a file over the network
I am trying to access a file using a stream reader from a network location
and get an error
System.IO.IOException: Logon failure: unknown user name or bad password.
Could someone help me remedy this proplem. thank you. rich
Message #5 by "Richard Krol" <rich@r...> on Thu, 25 Jul 2002 19:39:40 -0400
|
|
Michael ok it is returning the user account,but I granted everyone on the
remote machine access to the file for testing purposes but it is still
coming up with the error? Do you have any other ideas. Thanks Rich
-----Original Message-----
From: Michael Spiering [mailto:mspier@n...]
Sent: Thursday, July 25, 2002 2:11 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
There should be no reason that you are forced to use the default account for
ASP. My guess is still that you aren't using the account you think you are.
You could check this value at the point where you are accessing the file:
System.Security.Principal.WindowsIdentity.GetCurrent().Name
There is an impersonate method in WindowsIdentity that might help you.
Michael
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 10:16 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
I setup a separate security account for the IIS website and ASP.Net
Application.
Both are using this new account.
Do I have to use the ASPNET user account?
-----Original Message-----
From: Michael Spiering [mailto:mspier@n...]
Sent: Thursday, July 25, 2002 11:54 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
Does the aspnet_wp user have access to the share?
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 9:00 AM
To: aspx_beginners
Subject: [aspx_beginners] How to access a file over the network
I am trying to access a file using a stream reader from a network location
and get an error
System.IO.IOException: Logon failure: unknown user name or bad password.
Could someone help me remedy this proplem. thank you. rich
Message #6 by "Michael Spiering" <mspier@n...> on Thu, 25 Jul 2002 20:17:13 -0500
|
|
Well, I am running out of ideas, for sure.
You could try auditing the directory and/or file to see if the event log
gives a better hint at what is going on. Right-click on the file, select
properties, click security, click advanced, click auditing, click add, etc.
Then use the event log to look at security messages. This would also
involve using the policy editor to change the audit policy for object
access, if it is not already allowed.
Do you have a section in your Web.config file that looks something like
this?
<system.web>
...
<identity impersonate="true"
userName="account-name"
password="bigSecret"
/>
...
</system.web>
Can you log on as the test user and access the file using Windows Explorer?
Have you checked that the account is on the domain (not just a local user)?
I'll be curious to learn who's not included in Everyone. It sure seems like
that should work ...
Michael
-----Original Message-----
From: Richard Krol [mailto:rich@r...]
Sent: Thursday, July 25, 2002 5:40 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to access a file over the network
Michael ok it is returning the user account,but I granted everyone on the
remote machine access to the file for testing purposes but it is still
coming up with the error? Do you have any other ideas. Thanks Rich
|
|
 |