4
votes

So while in my IIS root directory (c:\inetpub\wwwroot) I've created a symlink to a network drive using:

mdlink /D truthuniversal "U:\Truth Universal Full Site\public"

The symlink was created just fine, and if I issue the cd truthuniversal command, while in the IIS root dir, I do indeed end up in the "U:\Truth Universal Full Site\public" directory area.

My problem is that when I type:

http://localhost/truthuniversal 

in my browser's address bar IIS does not serve the index page which resides in the public directory. Instead, I get the following error:

Server Error in Application "DEFAULT WEB SITE"

Internet Information Services 7.5 Error Summary HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Please advise.

-TU

2
u mean, MKLINK.exe ?Bernhard

2 Answers

10
votes

You need to create a virtual directory mapping to that directory in IIS in order for it to serve up the page. In IIS, right click on "Default Website", then click "Add Virtual Directory". Also, doing this, there is no reason why you even need the symlink. Just map it to the target to begin with.

4
votes

I agree that virtual directory in IIS may be what you want, but if you want to minimize IIS maintenance, consider this:

Instead of directory symbolic link: mklink /D
try directory junction: mklink /J

This worked for me and the web apps are able to write to the same directory.

mklink /J App_Data d:\shared\App_Data

worked for me on Windows Server 2008 R2.