1

I'm new in ASP and IIS and I trying to solve this problem for 2 days but still can't get it.at 1st, I created a ASP login page and the user information store in Web Site Administration Tool (VS2008 Project>ASP.NET Configuration) It works fine as I can log in to my aspx page when I debug it.

Next, I turn on the window feature (IIS under item World Wide Web Services >> Application Development Features all are selected except CGI)

Then, I publish my login page and go to C:\inetpub\wwwroot\web.config add few lines

<connectionStrings>

    <add name="connect" connectionString="Data Source=USER-PC\SQLEXPRESS;Initial Catalog=school;Persist Security Info=True;User ID=sa;Password=password" providerName="System.Data.SqlClient" />
    <add connectionString="data source=.\SQLEXPRESS;IntegratedSecurity=True;AttachDBFilename=|DataDirectory|ASPNETDB.MDF;User Instance=true" name="ConnectionString" providerName="System.Data.SqlClient" />
    <add name="ptiConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|pti.mdf;IntegratedSecurity=True;User Instance=True" providerName="System.Data.SqlClient" />

</connectionStrings>

Next, I open up IIS Manager enable ASP.NET Impersonation and i try to browse to localhost and I still unable to access to my login page
I also enable Form Authentication but still the same , can't login. Can Anyone help me ??

Milind Anantwar
  • 81,290
  • 25
  • 94
  • 125
khheng
  • 147
  • 1
  • 9

1 Answers1

0

Did you install IIS after you installed ASP.NET? If so, you'll need to register ASP.NET with IIS - see my answer here: Hosting ASP.Net MVC 4 SPA web Application in IIS

Community
  • 1
  • 1
levelnis
  • 7,665
  • 6
  • 37
  • 61
  • after i type "aspnet_regiis -i", i got another problem HTTP Error 500.19 - Internal Server Error ; Error code : 0x800700b7 – khheng Jan 02 '13 at 10:02
  • What's the rest of that error message? You've probably got an error in your web.config file somewhere. See this post: http://stackoverflow.com/questions/929131/how-do-i-resolve-http-error-500-19-internal-server-error-on-iis7-0 – levelnis Jan 02 '13 at 10:25
  • Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x800700b7
    Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
    Config File \\?\C:\inetpub\wwwroot\web.config
    Requested URL http://localhost:80/
    Physical Path
    Logon Method Not yet determined
    Logon User Not yet determined
    – khheng Jan 02 '13 at 10:30
  • There's your answer: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined – levelnis Jan 02 '13 at 10:36
  • Well, if there's a duplicate system.web.extensions/scripting/scriptResourceHandler section, you need to look in your web.config file and remove the duplicate entry. Maybe you have 2 system.web.extensions sections or duplication within that section – levelnis Jan 02 '13 at 11:03
  • Hmm, looks ok to me - looks like you're using asp.net 3.5 - which version of the framework is the IIS application pool running under? If you're using 3.5, the framework version needs to be 2.0 – levelnis Jan 02 '13 at 11:44
  • I have make some changes on the Application Pool...set DefaultAppPool to v2.0 .Net framework
    I can browse to localhost again but I still can login to the page
    – khheng Jan 02 '13 at 12:27