0

I have the following situation, and I need some help to setup properly

I have two VPS (hosted with the same provider, maximumasp). Server A is 2008R2, set with WORKGROUP, and server B is 2012, set with domain, maximumasp.local.

On server A I have an old web app, which uses a special folder, c:\MyUploads, to store uploaded files. App is using this using an appSetting. It will be kept running for a while for safety / compatibility reasons.

I installed a new version of the application on server B, running under AppPoolIdentity. Both instances of the app (A and B) will connect to the same database, so I need them to share also the access to upload folder c:\MyUploads.

How should I setup the app on machine B to access the folder c:\MyUploads ? My idea is to share the folder as \A\MyUploads, and then map it to server B. But the problem is, I don't know to give Read/write to c:\MyUploads on machine A to IIS AppPools\ on machine B

I was trying a test, and shared the c:\MyUploads to Everyone, ReadWrite. I was able to access it from machine B using \\MyUploads But when app from machine B tried to access a file, it gave error.

Any idea how can I accomplish this? Some advice on best practices for such situation would be great.

Thank you

bzamfir
  • 367
  • 3
  • 9

1 Answers1

1

The only way I can think of doing this securely would be to change the application pool to use an actual user account, and to have both servers have the account with identical passwords. The application would then be able to access shares on the other server without issue or re-authentication.

  1. Create a local account on Server A called "WebAppSvc" with password "abc123"
  2. Create an account in the domain called "WebAppSvc" with password "abc123" with no password expiration
  3. Set the IIS application on Server A to run as WebAppSvc
  4. Share a folder off of the domain server and allow access to the DOMAIN\WebAppSvc account
  5. Update the IIS Application App.config to use the UNC path of the domain server
Mitch
  • 2,363
  • 14
  • 23