简体   繁体   中英

Having trouble adding asp.net projects on Visual Studio 2017

I am building two separate webpages, contained within two separate projects on Visual Studio 2017, using asp.net framework. I am trying to add my first project into my current solution, to link with my new project. I have no issues adding the project, but when I try to run the imported project, it is giving me the following message:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory

Most likely causes:

A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

It also states in the title bar:

IIS 10.0 Detailed Error - 403.14 - Forbidden

I can run the first project and the new project by themselves and everything works fine, but when they are in the same solution, only the original project seems to work. Can anyone help me?

I think you just need to set some configurations in the web.config

<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>

  <system.webServer>
    <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>

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