Click here to Skip to main content
15,942,934 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created one asp site.I want to host the site in my local IIS.Below are the steps i am following:
1. Publish the site
2. Open IIS 7.0.Right click new -> add web site
3. Selecting my published path.Then ok.

But when i try to browse am getting below error.

HTTP Error 500.19 - Internal Server Error<br />
The requested page cannot be accessed because the related configuration data for the page is invalid.

Config Source

This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

This is the first time am hosting in IIS. What could be the reason ? How to fix this?

Below is my webconfig file
For more information on how to configure your ASP.NET application, please visit

    <add name="ApplicationServices">
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />

    <compilation debug="true" targetframework="4.0" />

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />

        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionstringname="ApplicationServices">
             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" />

        <clear />
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionstringname="ApplicationServices" applicationname="/" />

    <rolemanager enabled="false">
        <clear />
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionstringname="ApplicationServices" applicationname="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationname="/" />


     <modules runallmanagedmodulesforallrequests="true" />

I didn't do any changes here.
Updated 18-Aug-14 21:27pm
Vinay Mistry 19-Aug-14 5:08am    
May be you have missed something to configure your website while adding new website in IIS.

You can add your website in Default Web Site as a application.
Share this answer
Am Gayathri 19-Aug-14 5:13am    
I tried that also.but same error.
Make it permissions to default user and should set application pool identity to default user then its
Share this answer
1. Open control panel
2. Click on” program” link (not uninstall programs)
3. Click” turn windows features on/off” link
4. locate” Internet Information services IIS” in the pop up window and expand its node
5. Expand the” World Wide Web Service” node
6. Expand “Application Development Features” node
7. check the check box of”ASP.NET”
8. Then click ok button
Now you will see the account on the IIS manager and by default you see IIS account Now you should move you website from “my document” to another place the IIS have permission to access it (to any partition on your computer) Now browse your website from IIS manager and it should work.
Share this answer
Am Gayathri 19-Aug-14 3:59am    
Its not working.
Open Command prompt as Administrator
go to C:\Windows\Microsoft.NET\Framework\v2.0.50727
path and version may be change as per windows and .net version. you can use v3.0/v3.5/v4.0 as per your requirement.
use following command
aspnet_regiis -i

It will take just few seconds only.
Then run your Application.
Share this answer

Change the app pools identity from ApplicationPoolIdentity to 'Localsystem'.

IIS >> Application pools >> Select your Website Application pool >> Advance Setting

Then Try.
Share this answer
please refer
msdn Blogs[^]

Grant Read permission to the IIS_IUSRS group.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900