views:

290

answers:

1

Ok so I'm using ASP.NET MVC. I'm supposed to upload a file and write it to a network share.

I'm getting "Logon failure: unknown user name or bad password." when I try to write to the network location.

I solved it on my machine by impersonating the file server account, added this to web.config:

<identity impersonate="true" userName="xx" password="xx"/>

But when we made the build on the server, the admin suggested to run the App Pool under a custom identity instead of my solution (don't ask why), that in theory would be the same thing... But it wasn't, we got the "Logon Failure" exception again.

What is the difference between these two methods and why doesn't the later work?

Thanks in advance!

A: 

Change the application pool to run under the account that has access to the network share, or create a new application pool which these credentials.

thekaido

related questions