Asp.net mvc 5 deployment release on iis server

I am trying to publish / deploy my site on iis 7 server.

When I click run in visual studio, it works fine.

I followed the tutorial to use web deployment on my server. There are files, and everything looks fine.

but when I go to the site: http://10.0.0.12:8000/

I get: HTTP Error 403.14 - Forbidden,The Web server is configured to not list the contents of this directory.

I gave the site administrator credentials. And I checked that the default pages are configured.

What am I doing wrong?

enter image description here

Here is my configuration file:

<configuration>
<configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
 <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.1" />
 <httpRuntime targetFramework="4.5.1" />
</system.web>
<system.webServer>
<modules>
  <remove name="FormsAuthenticationModule" />
</modules>
</system.webServer>
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <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.0.0.0" newVersion="5.0.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.SqlConnectionFactory, EntityFramework" />
  <providers>
  <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
  </providers>
 </entityFramework>
</configuration>
+3
source share
2 answers

What you need to check and verify:

  • Set the attribute runAllManagedModulesForAllRequests="true"in the section <modules>in the web.config file:

    <modules runAllManagedModulesForAllRequests="true">
    
  • - ASP.NET 4.0, Integrated Pipeline
  • ASP.NET 4.0 IIS. , , (, Framework64 Framework, 32- ):

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -ir
    
+9

web.config wed xml, xml ,

 <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
               ....
    </handlers>
  <!--ENTER THE CODE HERE-->
  </system.webServer>

ur

<modules runAllManagedModulesForAllRequests="true">

, !

+1

All Articles