访问远程服务器IIS7上的虚拟目录时出现运行时错误



映射到远程服务器上文件夹的虚拟目录出现问题。基本上,我想做的是通过对web服务器的请求来获取位于远程服务器上的xml文件,例如http://example.com/Archive/file.xml,其中"Archive"是指向远程服务器上某个文件夹的虚拟目录。我不是使用应用程序/直通身份验证。

当虚拟目录指向web服务器计算机上的本地文件夹时,一切正常。

我有另一个网站在同一台服务器上运行,不同的是,另一个站点(映射到远程服务器的虚拟目录运行良好)是一个Web Forms站点,而我遇到问题的是一个.NET MVC站点。我的第一个想法是,为MVC站点配置的路由有些可疑,但在这种情况下,当存档映射到本地文件夹时(我想),它就不起作用了。

那么,问题是,我错过了什么?它似乎是IIS配置中的某个内容。。。

Web服务器设置:Windows server 2008 Standard,IIS7,在.NET MVC 上运行的站点

文件服务器设置:Windows server 2008标准

(两台服务器位于同一子网,可以在192.168.0.X上相互连接)


编辑:在将web.config添加到远程服务器上的文件夹后,我收到了此错误。据我所知,权限配置正确:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
Parser Error Message: An error occurred loading a configuration file: Failed to start monitoring changes to '\fileserverc$inetpubwwwrootArchivefileDir' because access is denied.
Source Error: 

[No relevant source lines]

fileDir中的web.config如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
    </staticContent>
</system.webServer>

在Windows事件查看器中,我发现以下应用程序错误:

Failed to start monitoring changes to '\fileserverc$inetpubwwwrootArchivefileDir' because access is denied.

这只是我发现这个老问题并记得它是如何解决的更新:

问题出在我们的内部DNS服务器上,自推出以来一直是一个难题。访问其IP上的远程目录反而解决了问题。

干杯!