简体   繁体   中英

Visual Studio 2015 ASP.NET web deploy to Godaddy not seeing correct index file

I have uploaded my ASP.NET MVC project to Godaddy using web deploy. Since my project is MVC it has a 'Views' folder where the index file is located. The problem is that when someone navigates to mydomain the server loads the wrong index file.

In short, when someone navigates to www.mydomain.com they are directed to: rootdirectory/httpdocs/index.html

Where I want them directed is: rootdirectory/httpdocs/views/home/index.cshtml

Any help would be appreciated.

I figured it out. The solution is to get rid of the default index file from the hosting service. In this case, Godaddy. Then modify the Web.config file in the Visual Studio project.

Add:

<customErrors mode="Off"/>
<trust level="Full"/>

inside the tag within the Web.config file.

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