简体   繁体   中英

Add a website to IIS on localhost

I was trying to add my ASP.NET website in IIS 7.5 on my local computer. I followed these steps in IIS Manager.

  • Right-click sites>Add website and specify the physical path. (I chose the app pool as Default app pool)
  • Right-click on the WebSite just added>Manage>Browse.

On trying to browse the website, I am getting this error

The requested page cannot be accessed because the related configuration data for the page is invalid

Here's the screenshot:

http://i.stack.imgur.com/r7BPj.jpg

It sounds like the process your IIS App Pool is running under does not have read access to the directory you specified.

The IIS App Pool is probably running under Network Service or ASP .NET 4.0 account depending on the version of .NET you're using.

Try navigating to the physical directory and changing the security properties to give Network Service and ASP .NET 4.0 (if it exists on your computer) Read access.

In the new website window under "Location" click on "Browse" to see the different Server options including IIS Server . User can select the server as IIS server instead of "File System", then the "Location" option will be "HTTP" instead of "File System".

  • New Website
  • Under Locations Click on "Browse"
  • Click on "Local IIS" and then select the "IIS Virtual Directory"(IIS vitual Directory which is directory created by the user while configuring IIS server)
  • Open

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM