1. Roland Smith
  2. SnapDevelop
  3. Friday, 17 September 2021 15:23 PM UTC

I'm working on a demo that needs to read a file. If the file is located on the machine IIS is running on, it works. I would like to access the file from a server on the network. Using a UNC file name doesn't work because IIS doesn't normally have network access.

I have searched the web but all the hits are over ten years old and not very informative or have links to Microsoft pages that no longer exist.

Does anyway know of a good way to do this?

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 17 September 2021 15:49 PM UTC
  2. SnapDevelop
  3. # 1

Maybe I`m missing the problem (and yes I`m a noob on this stuff), but did you try this?

https://stackoverflow.com/questions/35987477/give-iis-on-one-server-read-access-to-folder-on-another-server

 

Comment
  1. Roland Smith
  2. Friday, 17 September 2021 18:03 PM UTC
I tried assigning my network account to the AppPool and it doesn't work. I am able to get it to work using Impersonate but that would require hard coding the password in the code.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 17 September 2021 19:42 PM UTC
Roland .. I have done this successfully via the App Pool but needed to use a User ID with "Raised" *Domain* priviledges. Which most likely, you probably do not have.
  1. Helpful
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Friday, 17 September 2021 15:35 PM UTC
  2. SnapDevelop
  3. # 2

Hi Roland,

One way I would approach this problem would be to expose the file to the network with a Web Server, and, on the service, retrieving it with an HTTP request (with HTTPClient). Of course, if you don't want to expose the file to ALL the network I would set up a firewall rule to only allow incoming connections from a specific network address.

Hope this helps.

Regards,
Francisco

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.