Friday 18 March 2016

IIS Configuration Setting

Error 1 :
HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Solution :
1.run the command prompt as administrator
2.type the line in the command prompt below any one

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

or

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

dont change the directory of cmd
========================================================================
Error 2:
Login Failed to user.

Solution :
Go to Application Pools --> Select your site--> Advance Setting --> Process Model --> Identity (change to LocalSystem)
========================================================================
Error 3:
Cannot open database requested by the login. The login failed. Login failed for user
‘NT AUTHORITY\NETWORK SERVICE’.
OR
‘NT AUTHORITY\SYSTEM’.

Solution :
Go to SSMS(SQL Server Management Studio) --> Security --> Logins
Serach for "NT AUTHORITY/SYSTEM" --> Properties --> User Mapping -->Select your database name --> set role as "db owner"
========================================================================
Error 4 : Permission Issue
Access denied.

Solution :
Go to "C:\inetpub\wwwroot" properties --> Select "Security Tab" --> select "Edit" --> "Add" --> "Advanced"--> "Find Now" --> search for "IIS_Users(ComputerName\IIS_User)" --> OK --> Apply & Close.
========================================================================
Error 5 :
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Solution :
In IIS Manager --> Select your "Site Name"--> Directory Browsing (In IIS Section) --> Enable it(Right side Panel)


If Directory Browsing not shown in IIS then enable it from Control Panel
1. Control Panel --> Programms --> Turn Windows Features on off
2. Expand Internet Information Services --> World Wide Web Services --> Common HTTP Features --> Check Directory Document
========================================================================
Error 6 : Configuration Error
<compilation targetFramework="4.0" debug="true">

Solution :
Very Common issue.
1. Application Pools --> YourSiteName --> Basic Setting --> .NET Framework Version --> change it to v4.0
========================================================================