使用 mklink 创建的符号链接不适用于 IIS7.5——Windows 7 [英] Symlink created with mklink not working with IIS7.5 -- Windows 7

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

问题描述

所以在我的 IIS 根目录 (c:inetpubwwwroot) 中,我创建了一个指向网络驱动器的符号链接:

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

mdlink/D truthuniversal "U:Truth Universal Full Sitepublic"

mdlink /D truthuniversal "U:Truth Universal Full Sitepublic"

符号链接创建得很好,如果我发出 cd truthuniversal 命令,而在 IIS 根目录中,我确实最终会进入U:Truth Universal Full Sitepublic"目录区.

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 Sitepublic" directory area.

我的问题是当我输入时:

My problem is that when I type:

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"

互联网信息服务 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天全站免登陆