Unknown user name or bad password

G

Gerald Trainer

I have a procedure in an asp.net page that creates a file. As long as I
point it to a share on the server on which the site resides, it works.
However, if I point it to a share on a different server, I get
"System.IO.IOException: Logon failure: unknown user name or bad password."
when the page attempts to create the file. The path is specified in
web.config.

As for the site, anonymous authentication is turned off (this is an intranet
site), and I have tried both basic authentication and NTLM, but have gotten
the same error.

All the articles I have read have directed me to allowing UNC pass-through
for a virtual directory, but that doesn't apply here.

What do I need to do get this page to write to a share on a remote server?

Any insight is appreciated.

Sincerely,

Gerald Trainer
The NPD Group, Inc.
 
P

Peter O'Reilly

The problem is the "other" server is not recognizing the local ASP.NET
worker process account. You need to apply impersonation. Please have a look
at these Microsoft Knowledge Base Articles (http://support.microsoft.com):

article 810204:
PRB: Per Request Impersonation Does Not Work on Windows 2000 with ASP.NET

article 306158
INFO: Implementing Impersonation in an ASP.NET Application
 
G

Gerald Trainer

Thanks, Peter! That almost gets me there. I found the aspnet_setreg
utility to encrypt the user name and password in the registry. But now,
when I try to run my app, it tells me "Error reading the password from the
registry." I'm not sure where to look to find the error. I will post this
question in a different thread.

Thanks again!

Gerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top