Steven
Steven

Reputation: 1620

Directory browsing without using a web.config on IIS 7.5

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.

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).

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?

Upvotes: 1

Views: 1780

Answers (1)

Steven
Steven

Reputation: 1620

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.

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.

Upvotes: 1

Related Questions