0

I have a "special question".
We have a public web-portal (accessible public over the internet).
The data (including images) are stored on an (internal) (MS)SQL-Server and the queried from the portal. The portal is running on an IIS (Visual Webgui -> AJAX).
In addition, a user of the webportal also can upload .pdf's with detail-descriptions.
These .pdf's are stored on a FileShare of the (internal) SQL-Server
On the portal, the .pdf's are loaded (streamed) directly from the FileShare on the SQL-Server (via File-Access).

We now create app's (Xamarin.Forms) to access the data over a (JSON) webservice. => This works nice (including load and show the images). I now want, to enable the app also to load and show the .pfd's on the touch-devices. As I don't want add this stuff to the webservice, search a way, to accces the .pdf's via uri from the apps.
So the problem is, that in don't know, how to make the share on the (internal) SQL-Server accessible in an easy (and secure) way from the internet.
Target (my cool Idea;-):
I have an url from the webporta, that is alleady accessible over the firewall - E.G. www.xx.ch => Now I search a "magic" way to enable the webserver to access the fileshare (internally) and add the "url" to the fileshare to the "space" of the webserver. E.G. add url "documents" to the space of the webserver and the call uri: "http://www.xx.ch/documents/xxx.pdf" from the app.

Does someone know hat to do that (or something similar:-)?

Thanks a lot for any feedback. Fredy

e

FredyWenger
  • 2,236
  • 2
  • 32
  • 36

1 Answers1

0

I (proudly) have found the solution myself.
As I have opened the question - I also have to describe the solution...

In short:
- Add a Virtual Directory on IIS:
- In IIS select sites - site of the portal
- right click mouse - add virtual directory
- named DatenAblage
- pointing to the UNC-Path on the Fileserver
- click the new Virtual Directory ("DatenAblage")
- doubleclick on Icon "Authentification" (in the middle pane)
- Select "Anonymous Authentification" (have to be Enabled) and click "Edit" under "Actions" (on the right side)

Important (I have tried hours, before I have findout that):
- Set Anonymous user identity to "Application pool identity

That's it (was it in my case).

I first have done this on Intranetserver (very easy, if the trick Set Anonymous" (see above) is known.
Then, I have done the same steps on Internetserver (in DMZ).

After that, I am able to load a .pdf via http://www.sitename.ch/DatenAblage/xx.pdf (if it exists;-) from public internet.
Notes:
In my case, the firewall was already configured for running the public portal.
Public IP -> FW -> DMZ-IP Web-Server -> Internal IP
DMZ-IP Web-Server -> Internal IP SQL- and Fileserver (with the Share to "DatenAblage").

Hope this helps someone (as I was helped in the past in this - b.t.w. very useful portal)
Greetings from Switzerland

FredyWenger
  • 2,236
  • 2
  • 32
  • 36