Forum Moderators: open

Message Too Old, No Replies

File Access on another server

Accessing files from another server

         

qlipoth

8:54 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



I have two web servers. An internal one and an external. My internal has a page which generates PDF's that are to be viewed from the outside.

I have a Asp.Net page (C#) on the external server which is supposed to access those files via a share set up onthe internal one.

Problem: I can't access the share.

IUSER_ExternalServer and ASPNet on ExternalServer are local accounts, and therefore won't be the same on the internal server.

Tried giving "Everyone" access. No Good.
Tried giving "Anonymous Users" access. No good.

Can't seem to find any way in .net to log on as another user, can't think of a way to change the directory permissions to make them work.

aspdaddy

9:50 pm on Jun 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What actaul error are you getting?

Its not clear from your description whether its an authentication or server publishing issue.

qlipoth

11:56 pm on Jun 20, 2005 (gmt 0)

10+ Year Member



I don't have access to the error at the moment (Its at work, and I'm home for the day), but it is almost certainly an authentication problem.

The error is some form of "Access Denied" message on the line where I call for a directory listing of the share.

TheNige

4:05 am on Jun 21, 2005 (gmt 0)

10+ Year Member



There is a "2 hop" limit when accessing different machines on the network with NT authentication through IIS. That is, you access the 1st webserver from a client....that is considered the "2 hops" already...I know it sounds like 1 hop....but do a search on the topic.

Some ways to get around this run your IIS with the same user accounts on both machines with the same passwords...this can be done in the IIS MMC. Or you can run IIS on both with the same NT Domain user account.

The way we do it here at work is we created a .Net class and put a COM wrapper on it so we could run the class under any security account that we wanted in COM. This allows us to access files on many of our file servers by running the COM under a domain account that has the rights.

You could also create a webservice to send over the files that you need on demand from server to server.

qlipoth

6:11 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



I ended up cheating:

Built a service on the internal server that fires every 10 minutes and copies the files to a secured directory on the external one.

That way, the file can be created by the web page on internal, read by the page on external, and security (In the form of a "do not pass go") is maintained between the two.