Forum Moderators: open
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.
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.
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.