Login failure

May 3, 2011 at 3:53 AM

I can't get past the login screen. Message: "There was an error."  Background info: The application did not fully install.  No database installation occurred.  I forced this install by running the queries manually.  Something is not setup correctly and I cannot identify it.  SQL Express string:   <add name="anmcs" connectionString="Data Source=mrjuice-pc\SQLEXPRESS; Initial catalog=SAVC1 ;Integrated Security=True" providerName="System.Data.SqlClient" />

Coordinator
May 3, 2011 at 8:31 AM

Check Prerequisites:
ASP.NET 3.5 or newer and IIS 7.0 or newer

And check you have the host name and credentials with DBO access to the database.

For the db, go to sql management studio and execute this query:

exec sp_grantlogin 'NT Authority\Network Service' 
use SAVC1
exec sp_grantdbaccess 'NT Authority\Network Service' 
exec sp_addrolemember 'db_owner', 'NT Authority\Network Service'

exec sp_grantlogin 'IIS APPPOOL\DefaultAppPool' 
use SAVC1
exec sp_grantdbaccess 'IIS APPPOOL\DefaultAppPool'

May 4, 2011 at 3:43 AM

Thanks.  I changed apppool from default to one that uses ASP.NET 4 in IIS manager.  Not sure if I'm making progress. A server error page displays after login attempt now.  The error code is: 500.19.  This is the config error listed: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined.

As far as I can tell I have the prereqs and credentials.  I don't know enough about the credential and dbo access area yet to tell for sure.  Would be great to see an example of what that info looks like.

Coordinator
May 4, 2011 at 8:51 AM

It is an issue with ASP.NET 4.0

Open your Web.config and try to delete or comment out the <sectionGroup name="system.web.extensions"...>

May 4, 2011 at 12:08 PM

Thanks again. More progress. I can get to this page now IF I browse default.aspx from within Vis Studio 8: http://localhost:49181/anm/homepage.aspx.  From there it is letting me login.  When I browse to the site location directly from IE8 or FireFox 3.6.17 I get the install page again.  When I try to install, I get the do you have the credential etc message again.

Coordinator
May 4, 2011 at 3:15 PM

Check if you have Full Control to the folder for the Users.

And grant permissions to the db for Users IIS APPPOOL and NT Authority\Network Service.

May 4, 2011 at 9:41 PM

I believe I have those.  Interestingly, I created a page with a gridview of the categories table.  It will open and display the table's contents if browsed from inside VS 8.  It redirects to the install page when I try to open with a browser.  It also redirects when browsed from IIS manager.

Coordinator
May 5, 2011 at 7:38 AM

Open install.aspx.cs and remove try/catch. In this way you can get more information on the error.

May 6, 2011 at 4:02 AM

I tried commenting out one and both sets of try/catch.  It either had no effect or gave a redirect error.  I have made so many adjustments in IIS that I no longer can browse files from within VS8 - I get the redirect error message. Here is the latest error I get when I try to browse from within IIS:

The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server

I made sure these features/services were turned on and control files.  Still get the error.

I have other sites on this machine with lesser permissions that work fine.  What is in this app that is so troublesome or complicated?  I have tried basic, Windows, and anonymous authentication with no success. Folder permissions for a multitude of users are set to full. I either get the "install" page or an error page.

As you can see I am trying very hard to make it work.  I have to conclude that there is something that needs to be simplified or made more flexible in the app.  I am running Win 7 Ultimate 64bit, ASP.NET 4, IIS 7.5 on and Intel machine.  What more can you ask for?

Coordinator
May 6, 2011 at 7:30 AM
mrjuice wrote:

 

The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server


This issue occurs because the requested Internet Server API (ISAPI) resource or the requested Common Gateway Interface (CGI) resource is restricted on the computer that is running IIS 7.0.

 

To resolve this issue, configure the restriction on the ISAPI and CGI Restrictions page to allow the requested ISAPI resource or the requested CGI resource. To do this, follow these steps:

  1. Click Start, type Inetmgr in the Start Search box, and then click Inetmgr in the Programs list.

    If you are prompted for an administrator password or for confirmation, type the password, or click Continue.
  2. Locate the level that you want to configure.
  3. In Features view, double-click ISAPI and CGI Restrictions.
  4. Right-click the restriction that restricts the requested ISAPI resource or the requested CGI resource, and then click Allow.
May 6, 2011 at 7:12 PM

I had done that.  I think part of the problem is there is no mdf file to attach to the database.  Cannot grant dbo access without a file it seems.  I ran the scripts early on thinking this set up the SQL Express files.  Apparently not.

May 7, 2011 at 5:24 AM

I have successfully completed the install on localhost.  I deleted the previous database and tables and started with a fresh one using default permissions.  My first attempt was with an existing database.  Still should have worked since the config was likely the same.  Must not have been though.  Recommend starting with new database.  The IIS v4 may be a gotcha for some.  Now to learn how to modify and incorporate the app into my own projects.  Thanks for your help and patience.