0

I have two servers. Application server and File server. I need to upload files directly to File server.so far what i have done is, when i upload i received "unknown user name and bad password error" .so i created an user name and password in file server like in the Application server (IUSR_ account. exact like in the application server). Now i receive "System.UnauthorizedAccessException: Access to the path \xxx\xx... is denied".Then i granted the network service user as full permission in File server shared folder. still i get the UnauthorizedAccessException. And one more, the application pool is running under the identity of network user. Help needed. Thanks in advance...

5
  • Probably becuase the Network service user is running under the server workgroup. Set up a user on the mapped drive server and on the IIS server with the same name and password on both Commented May 9, 2011 at 10:43
  • that is what i did it in both servers. After that only i got UnauthorizedAccessException. Commented May 9, 2011 at 10:44
  • 1
    Then why is the app pool running as network user and not the other one? Commented May 9, 2011 at 10:46
  • I changed to the user what i run under IUSR account. But the site went down.then i reverted back. Its production site... Commented May 9, 2011 at 10:59
  • 1
    You will have to run the app service as a custom user as the network service account does not have equal passwords on both servers and thus will not be authenticated. Don't change this password Commented May 9, 2011 at 14:00

1 Answer 1

1

Are the machines part of the same domain? In that case you give the machine account (called machinename$) of the app server access to the file server. Then you run the app server app pool under the "network service" account. You also have to access the file server with a complete unc path (\\server\share\directory) as mapped drives are tied to a specific user.

If you're not in a domain environment you need to add code so that the app server logs on to the file server when attaching the network share. Having the same username/password pair on both the client and server is something that works magically when logging on interactively, but for services that is not an option.

Sign up to request clarification or add additional context in comments.

2 Comments

Our servers is not in domain. its workgroup.I have clearly mentioned the UNC Path (\\192.168.10.20\Transcode_Central\EV_Process) Also i created an same username and password in file server as like in application server. Which is in the iis IUSR_MAchinename account
Given full permission on shared folder to network service,asp.net,iusr account that is newly created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.