在IIS 7.5上不使用web.config进行目录浏览

时间:2021-11-14 20:23:57

I'm trying to set up directory browsing for a file share to which my IIS server (7.5 on Windows 2008) has read-only access. I have tried configuring directory browsing using the IIS Manager, and also by directly editing the \Windows\system32\inetsrv\config\applicationHost.config file.

我正在尝试为我的IIS服务器(Windows 2008上的7.5)具有只读访问权限的文件共享设置目录浏览。我尝试使用IIS管理器配置目录浏览,也直接编辑\ Windows \ system32 \ inetsrv \ config \ applicationHost.config文件。

Despite my best efforts each time I attempt to view my virtual directory in IE I am met with a HTTP Error 500.19 (Cannot read configuration file) exception. It appears that IIS is attempting to locate a web.config file in the physical file share (which obviously doesn't exist).

尽管我每次尝试在IE中查看我的虚拟目录时都尽力而为,但我遇到了HTTP错误500.19(无法读取配置文件)异常。看来IIS正在尝试在物理文件共享中找到web.config文件(显然不存在)。

Given that my file share will only ever be read-only, is there any way to configure directory browsing on my virtual directory without the requirement for a web.config file in the physical directory?

鉴于我的文件共享只是只读,有没有办法在我的虚拟目录上配置目录浏览而不需要物理目录中的web.config文件?

1 个解决方案

#1


1  

After spending considerable time on this I finally conceded to the HTTP 500.19 error. Despite my best efforts to convince it otherwise, IIS insisted on the web.config being present in the file share.

在花了相当长的时间后,我终于承认了HTTP 500.19错误。尽管我尽最大努力说服它,但IIS坚持将web.config存在于文件共享中。

I ended up writing my own file system wrapper which essentially produced the same output as the default directory browser, and then deployed it with a dedicated service account with read access.

我最终编写了自己的文件系统包装器,它实际上产生了与默认目录浏览器相同的输出,然后使用具有读访问权限的专用服务帐户进行部署。

#1


1  

After spending considerable time on this I finally conceded to the HTTP 500.19 error. Despite my best efforts to convince it otherwise, IIS insisted on the web.config being present in the file share.

在花了相当长的时间后,我终于承认了HTTP 500.19错误。尽管我尽最大努力说服它,但IIS坚持将web.config存在于文件共享中。

I ended up writing my own file system wrapper which essentially produced the same output as the default directory browser, and then deployed it with a dedicated service account with read access.

我最终编写了自己的文件系统包装器,它实际上产生了与默认目录浏览器相同的输出,然后使用具有读访问权限的专用服务帐户进行部署。