-1

Я развернул свое первое приложение MVC в webbhotel, и после публикации в визуальной студии я перенаправляюсь на свой сайт, давал мне ошибку 403.Публиковать MVC solutuion в Webbhotel. 403 - Запрещено: доступ запрещен

enter image description here

WebConfig:

<?xml version="1.0" encoding="utf-8"?> 
    <!-- 
     For more information on how to configure your ASP.NET application, please visit 
     http://go.microsoft.com/fwlink/?LinkId=301880 
     --> 
    <configuration> 
     <configSections> 
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
     </configSections> 
     <connectionStrings> 

     <add name="MenuContext" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\RestaurantNila.mdf;Initial Catalog=aspnet-RestaurantNila-20141229051116;Integrated Security=True" 
     providerName="System.Data.SqlClient" /> 

     <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-RestaurantNila-20141229051116.mdf;Initial Catalog=aspnet-RestaurantNila-20141229051116;Integrated Security=True" 
      providerName="System.Data.SqlClient" /> 
     </connectionStrings> 
     <appSettings> 
     <add key="webpages:Version" value="3.0.0.0" /> 
     <add key="webpages:Enabled" value="false" /> 
     <add key="ClientValidationEnabled" value="true" /> 
     <add key="UnobtrusiveJavaScriptEnabled" value="true" /> 
     </appSettings> 
     <system.web> 
     <authentication mode="None" /> 
     <compilation debug="true" targetFramework="4.5" /> 
     <httpRuntime targetFramework="4.5" /> 
     </system.web> 
     <system.webServer> 
     <modules> 
      <remove name="FormsAuthentication" /> 
     </modules> 
     </system.webServer> 
     <runtime> 
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <dependentAssembly> 
      <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> 
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-5.2.2.0" newVersion="5.2.2.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> 
      </dependentAssembly> 
     </assemblyBinding> 
     </runtime> 
     <entityFramework> 
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> 
      <parameters> 
      <parameter value="mssqllocaldb" /> 
      </parameters> 
     </defaultConnectionFactory> 
     <providers> 
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
     </providers> 
     </entityFramework> 
    </configuration> 

Filestructure в webbhotel после печататься в VS

Filestructure at the webbhotel after publish in VS

Если я добавить index.html в public_html тогда я может s ee, что indexpage. Но как я могу сделать эту работу с помощью MVC. Не можете найти хорошие объяснения в Google.

Есть ли какая-то проблема с сущностью в этом решении?

Что я могу сделать для этого?

ответ

0

Я решил этот вопрос, изменив версию .Net в моем веб-отеле.

enter image description here