使用mklink创建的符号链接不能与IIS7.5一起使用 - Windows 7 [英] Symlink created with mklink not working with IIS7.5 -- Windows 7

查看:683
本文介绍了使用mklink创建的符号链接不能与IIS7.5一起使用 - Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在我的IIS根目录(c:\inetpub \ www.root)中,我使用以下方法创建了一个网络驱动器的符号链接:

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

mdlink / D truthuniversalU:\ Truth Universal Full Site\public

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

符号链接创建得很好,如果我发出 cd truthuniversal 命令,而在IIS根目录中,我确实最终进入了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.

我输入的问题是:

http://localhost/truthuniversal 

我的浏览器地址栏中的

IIS不提供驻留在公共区域的索引页面目录。相反,我收到以下错误:

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:

应用程序DEFAULT WEB SITE中的服务器错误

Server Error in Application "DEFAULT WEB SITE"

Internet Information Services 7.5
错误摘要
HTTP错误404.0 - 未找到
您要查找的资源已被删除,名称已更改或暂时不可用。

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.

请告知。

-TU

推荐答案

您需要创建一个映射到IIS中该目录的虚拟目录,以便它为页面提供服务。在IIS中,右键单击默认网站,然后单击添加虚拟目录。此外,这样做,没有理由你甚至需要符号链接。只需将其映射到目标即可。

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.

这篇关于使用mklink创建的符号链接不能与IIS7.5一起使用 - Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆