Question : Setting up a virtual directory in IIS 7 with Vista Home Premium

I've been following directions on this page ( http://msdn.microsoft.com/en-us/library/ms751432.aspx ) and I can't get past the step about "Directory Browsing" in the second section. When I double click on it as instructed, I get this error message:
Filename\\?\C:\inetpub\wwwroot\servicemodelsampls\web.config
Error: Cannot read configuration file.

Which makes sense since web.config doesn't exist there unless it got created automatically. So I tried locating "servicemodelsamples," but I couldn't find it, presumably because it's virtual.

How do I get past this block?

Thanks

Answer : Setting up a virtual directory in IIS 7 with Vista Home Premium

Creating virtual directories has changed since IIS 6 because IIS 7 introduces delegated administration, meaning IIS needs to read the web.config in the virtual directory folder before you can browse the virtual directory. So IIS has to use the process identity (usually Network Service) to read the web.config file.

Try the following instructions to configure a virtual directory for directory browsing in IIS7:

1) Create or select the virtual directory in Internet Information Services (IIS) Manager
2) Double-click Authentication and select the appropriate authentication methods for the Vdir (default is Anonymous)
3) Select the Vdir again and double-click Directory Browsing. Click the Enable action
4) Right-click the Vdir and select Edit Permissions. Configure the NTFS permissions for the target folder and ensure that Network Service has read access to the folder

If you don't grant the Network Service account read rights on the Vdir, you'll get the following error when accessing it:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

From the following web site

Configuring Virtual Directories with Directory Browsing in IIS7
http://www.expta.com/2008/03/configuring-virtual-directories-with.html
Random Solutions  
 
programming4us programming4us