0

We have a network drive (OS: Linux) and need to read data files. in Visual studio api runs smooth with this location (\172.x.x.x\folder\file.csv) but when we deploy this in IIS it throws a below error.

"One or more errors occurred. (The user name or password is incorrect. : '\172.x.x.x\folder\file.csv') (The user name or password is incorrect. : '\172.x.x.x\folder\file.csv')"

Network Location is Linux based enviroment, Development and Deployment is in IIS

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
  • 2
    Visual studio runs as you, IIS app pools do not (by default). Sounds like a permission issue – Crowcoder Feb 24 '22 at 12:35
  • 1
    It's running as a different user. Use Process Explorer to figure out as who IIS runs and grant him permissions. – Thomas Weller Feb 24 '22 at 12:36
  • Can you please share IIS Pool Settings ? I have tried all settings but no luck – user2549975 Feb 24 '22 at 12:37
  • Keep in mind it is very easy to introduce a security issue when you just want something to work. You should have a strategy for resource access, but [this is what you want to read about](https://learn.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities) – Crowcoder Feb 24 '22 at 12:44
  • You should not be installing file on IIS server for uses to access. Use a File Server instead where you can change access list. A IIS is meant to be secure so clients have limited access to the IIS System Resource. Client connect by default with GUEST privilege's. – jdweng Feb 24 '22 at 12:47
  • @jdweng the question literally says "a network drive" in the first sentence. – Crowcoder Feb 24 '22 at 12:54
  • @Crowcoder : it also says when we DEPLOY to IIS. – jdweng Feb 24 '22 at 12:57
  • @jdweng I take that to mean the application that works from visual studio, not the files. – Crowcoder Feb 24 '22 at 12:58
  • @Crowcoder : I can't tell where the Network drive is located. From description is could be on the IIS server. – jdweng Feb 24 '22 at 13:04
  • [Does this answer useful to you ?](https://stackoverflow.com/a/56065529/7687666) – Jason Pan Feb 25 '22 at 13:59

0 Answers0