Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting IIS 6 Webserver to a File Server to upload files 1

Status
Not open for further replies.

emerc

Programmer
Mar 11, 2004
8
IE
Anybody with any ideas on how to set up connection between my Webserver in a DMZ environment, and my File Server which will be behind the Firewall. We have a production environment and I dont want to store attachments like .doc, or .pdfs on the webserver so I want to store them now on a Share on a machine in a differnt domain/location behind the firewall.

I have stored these on the webserver already but now have to change. I have set up my Share on the Fileserver but now am trying to work out how I connect to it via code to drop my files in and get them whenever I need to.

Impersonation ? Delegation ? I have seen on MS Site but looks rather overkill. Anybody done this ?
 
It will be better if you permanently map a drive on the Web server and then use that drive letter to write files there.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
I dont think Server.MapPath will work though as both machines are on different domains ? I assumed Server.mapPath worked solely with machines on same domain ie. Your Lan.
 
If your file server it's on diferent domain... then you could have security issues not to mention you can get errors in your web server due to the file transfer which should be made by the asp and not by the server (Mapping drives).


________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Yip, your right there. I am getting asked for a UserName and Password when I am trying togo through. I have set up a Local Account UserName on the webserver - call it Watson. I have also set up the same local account on the File Derver - called it Watson also. Web server use Anonymous Auth. The share on Fileserver is shared out with the Watson user account.

I think that above is OverKill . I am stuck big time. I thought that this is an Every Day procedure with Companies/Corporations !
 
Can you access your file server with those credentials? From web server?

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
I can access my File Server easily as from my Webserver in the DMZ, i can access it by \\10.1.1.1 - say that is its Internal IP Address which the webserver knows as the Firewall doesnt lock down as much as it should so as its our DMZ - i can connnect to the machine and pass files around - I KNOW that this will not be the case in our Production environment as the hosts will lock down all communication between both. That is why I am wondering how to do it.

Programmically ! I am stumped. I only use Impersonation above as Microsoft said on their site - this is a way to do it.
 
You cant then map a Drive (a share from your file server with username and password)?
Since you can access \\server sharenames then you can map a drive from windows (right click on MyComputer Map Network Drive) and use that drive. Doesnt matter if your IUSR_machine name has no rights on that share name cuz it wont mater since your user and password used for maping the drive has access to it.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Let me try that Shadow and I will come back to you. Thanks for assistance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top