Tuesday, 6 January 2015

How To Configure Asp.Net Application On IIS Steps

Install IIS
http://www.codeproject.com/Tips/365704/Install-IIS-on-Windows

Compile Application
Type Below code on asp.net command prompt

aspnet_compiler -p "Application Path" -v / "Destination Path"

Open IIS From Control Panel 

Control Panel\All Control Panel Items\Administrative Tools

OR
Run type
inetmgr       enter



Configure Application

Problum

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

http://stackoverflow.com/questions/15816924/http-error-403-14-forbidden-the-web-server-is-configured-to-not-list-the-conte
Add In WebConfig

<system.webServer>

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

403.14 the web server is configured to not list the contents of this directory

http://stackoverflow.com/questions/17510440/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-s

Setting In Application Pool Will Change


command%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe /i

or

command%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe /i

http://www.microsoft.com/en-in/download/confirmation.aspx?id=30653&cffa64c5-a636-96fc-e97a-0e907fcc4c04=True
(1:11:18 PM) http://localhost:8181/index.aspx



add In Web Config



<httpHandlers>
    <add verb="*" path="index.aspx" type="CloudConnectHandler" />
  </httpHandlers>
  </system.web>

  <appSettings>
    <add key="webpages:Enabled" value="true"/>
 
  </appSettings>

<system.webServer>
  <validation validateIntegratedModeConfiguration="false"/>
  <modules runAllManagedModulesForAllRequests="true">
    <remove name="ScriptModule" />
    <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" preCondition="managedHandler" />
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler" />
    <remove name="UrlRoutingModule-4.0"/>
    <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" preCondition="" />

  </modules>


  <handlers>


    <remove name="WebServiceHandlerFactory-Integrated" />
    <remove name="ScriptHandlerFactory" />
    <remove name="ScriptHandlerFactoryAppServices" />
    <remove name="ScriptResource" />
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </handlers>

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

No comments:

Post a Comment