How do I provide access to files on a different server?

How do I provide access to files on a different server?

am 20.02.2007 22:56:09 von bstauffer

Hello, and thanks in advance to anyone who's got any ideas on this.

I have a web server with a web site that is supposed to provide access
to documents. The documents are stored on a different server than
the web server.

The website is running an ASP.Net 2.0 web application which contains a
treeview control for displaying the documents. When a user clicks on
a document link in the treeview, the document is opened in a popup
window. The document is referenced with a UNC path. This all works
fine for people ON our network.

But people from outside out network receive a "Cannot find 'file://
somepath/doc.pdf'. Make sure the path or internet address is
correct." message.

The site allows anonymous access and the account used for anonymous
access is a domain account with sufficient privileges on both the web
and document servers. The web.config file uses "identity
impersonate=true".

If anyone can shed any light on this please let me know. Thank you.

RE: How do I provide access to files on a different server?

am 21.02.2007 15:13:48 von rusty

You have to have a virtual directory for files on a different server or files
in a different directory than the Web Site root. Just a thought.

"bstauffer@oldrepublictitle.com" wrote:

> Hello, and thanks in advance to anyone who's got any ideas on this.
>
> I have a web server with a web site that is supposed to provide access
> to documents. The documents are stored on a different server than
> the web server.
>
> The website is running an ASP.Net 2.0 web application which contains a
> treeview control for displaying the documents. When a user clicks on
> a document link in the treeview, the document is opened in a popup
> window. The document is referenced with a UNC path. This all works
> fine for people ON our network.
>
> But people from outside out network receive a "Cannot find 'file://
> somepath/doc.pdf'. Make sure the path or internet address is
> correct." message.
>
> The site allows anonymous access and the account used for anonymous
> access is a domain account with sufficient privileges on both the web
> and document servers. The web.config file uses "identity
> impersonate=true".
>
> If anyone can shed any light on this please let me know. Thank you.
>
>

Re: How do I provide access to files on a different server?

am 21.02.2007 18:26:13 von David Wang

The custom web application that you are using is not written correctly
to support your usage because it is using file://somepath/doc.pdf to
reference resources. That is the reason why people *outside* your
network cannot retrieve it - because those people do not have access
*into* your network's UNC shares due to security.

The solution? Either:
1. Open up your network's UNC shares to the outside (bad, bad, bad
idea from security perspective)
2. Fix the web application to actually provide access to files on a
different server

One solution is to:
1. Create a virtual directory on IIS which provides access to files on
a different server
2. Change the web application to return navigate and return URLs from
this virtual directory *instead* of what it currently returns

This way, the web application returns clickable links to HTTP URLs,
which works for people both inside and outside your network. And the
HTTP URL is under an IIS UNC virtual directory which provides HTTP
access to resources on another server that IIS has internal access to.

Here is documentation on how to do #1. You will have to provide the
code to do #2 since it is your custom web application.

http://www.microsoft.com/technet/prodtechnol/windowsserver20 03/technologies/webapp/iis/remstorg.mspx



//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//




On Feb 20, 1:56 pm, bstauf...@oldrepublictitle.com wrote:
> Hello, and thanks in advance to anyone who's got any ideas on this.
>
> I have a web server with a web site that is supposed to provide access
> to documents. The documents are stored on a different server than
> the web server.
>
> The website is running an ASP.Net 2.0 web application which contains a
> treeview control for displaying the documents. When a user clicks on
> a document link in the treeview, the document is opened in a popup
> window. The document is referenced with a UNC path. This all works
> fine for people ON our network.
>
> But people from outside out network receive a "Cannot find 'file://
> somepath/doc.pdf'. Make sure the path or internet address is
> correct." message.
>
> The site allows anonymous access and the account used for anonymous
> access is a domain account with sufficient privileges on both the web
> and document servers. The web.config file uses "identity
> impersonate=true".
>
> If anyone can shed any light on this please let me know. Thank you.