skip to Main Content

We have 2 servers. 10.30.1.1 is the application server and 10.30.1.2 is the storage server. Now, we need to read and write files from application server to storage server folder. We are simply using File.Writexxx and File.Readxxx methods but getting permission errors (DirectoryNotFoundException). Our app is deployed in IIS.

As per App Pool Identity we can use <domainname><machinename>$,
` https://learn.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities#accessing-the-network but our servers are on workgroup not on domain.

2

Answers


  1. Create a user logon + password on the 1.2 – not a domain logon, but a simple user logon on/for that computer.

    Then create a user on 1.1 – same name + password.

    Then in app pool, specify that user.

    enter image description here

    The result is that your code behind should be able to freely use + update files on 1.2.

    Login or Signup to reply.
  2. I think you need to give IIS App Pool Identity permission to access the shared folder. Right click on the shared folder and select Properties > select the Security tab > click the Edit button > click the Add button > enter a name for the IIS App Pool Identity > click the Check Names button to verify Name > Click the OK to add the user to the user or group list > Grant the user read/write permissions.
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search