Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

In the Trenches

Joe's Thoughts

Setting up IIS to use a UNC network share

I’ve looked everywhere and have not found a good source for this information, so I figured I would write about it here in a quick note.

My problem, I have a new server, I created several virtual servers, and I grouped the virtual servers together with their own AD. I then setup IIS on one of those servers, I created a standard website and I went to the “Home Directory” tab and selected the “A share located on another computer” option. Entered in the network directory (\\server\share) and clicked the “Connect As…” button.  I then enter in the login and password of an account on the host machine to access the network share.

Now everything is going along pretty well, but here’s a little more info. The host machine is in a workgroup, it’s my home machine and I want to have several sets of virtual server domains.  I can run quite a few of them with dual (physical) quad core 2ghz AMD 64bit processors and 32gigs of ram plus 2tbs of space. Though I left the host in a workgroup to keep it neutral (I thought).

So how does one pass though the security that was entered in the above tab? I kept getting server 500 errors and couldn’t figure out why. I had the account setup on the host; everything was setup fine on the virtual box. Hmmm then I read this little note:

“Pass-Through Authentication in a Workgroup Environment

 

In a workgroup environment, all user accounts are local. Pass-through authentication using Basic authentication can still function, as long as both the IIS and file servers have user accounts with identical user names and passwords. This configuration quickly becomes an administrative burden and consequently is not widely implemented. For these circumstances, designating a single user account designed specifically for use with the UNC connection is likely the best choice.

 

 

This was found via this link: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/remstorg.mspx#EVC

So, a nice simple issue, but I’m running a domain and a workgroup and talking between the two. No matter it seems that they are treated the same. Hence I created an account on the local virtual web server that is named exactly the same as the one on the host (same password). Boom another error. I had to give write access to the “c:\windows\.........\Temporary ASP.NET Files” folder for the local account on the virtual web server. Then all was well with the world. I’m up and running.

Now since this is just for my experimenting and home stuff, I wouldn’t advise anyone to do this for a production environment.

I also want to take this time to talk about another tool.

I created a base image and then used differencing disks for all my virtual servers. Well this made them all have the same SID when I went to add them all to a domain. I had to use this tool found here:

http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx

Called NewSID.exe, I ran it on each of the virtual servers and boom all was well. So if anyone has this problem when setting up their test environments, I hope this is of some use.

Published Friday, February 01, 2008 10:55 PM by jfuentes

Comments

No Comments
Anonymous comments are disabled

About jfuentes

Jose Fuentes is the Co-Founder of the Capital City .NET Users Group of Florida, he helped organized and build the community and community web site (www.tlhdotnet.net). He’s an active MVP (Most Valuable Professional) for Microsoft, and strongly involved in the .NET community. He gives presentations and loves helping others with problems. You can find many of his posts and work on www.aspalliance.com, www.planet-source-code.com and www.windowsforms.com. He’s an active columnist for the asp alliance and Co-Authored in the ASP.NET Cook Book and currently working on a Smart Client book. His experience in .NET spans back to the early days of the first beta and he has a passion to spread the word to as many welcoming and un-welcoming ears that he can. Specializes in VB.NET and windows applications (rich client/smart client), also very knowledgeable of VS 2005 (been in beta since July 2003, after being invited to Microsoft). He’s very handy with MS SQL server 2000 and MSDE.