Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi,
I have a web application (asp.net 2.0 and SQL Server 2005 on Windows 7). I host the application in IIS 7.0, for testing over the small intranet in my office. I use a login page for user authentication using aspnetdb. Users get authenticated and the application moves on to the home page. At this stage, a page opens, which retrieves data from server and displays in a gridview. Here I get an error message saying that the user does not have rights to access the data. I check the access rights given in the sql server and the connection string in IIS 7.0 for the application. The user is given rights to access the db as well as the relevant tables.

If I remove the login.aspx page and load the home page directly, there are no errors and everything works like a charm!

Where am I going wrong?

I am using a normal login control in the login.aspx page. Am I required to authenticate the user or application once again after the user's credentials are authenticated? If so, how do I do that?
Posted
Comments
db7uk 15-Jul-12 16:42pm    
Can you not use windows authentication for your intranet site? Users could be controlled by Active Directory which would also help with the server request authentication?

Are you using Impersonation? If so I would double check delegation. Is the DB server on the same server as the Web app?
GeoNav 16-Jul-12 3:04am    
I wanted to implement forms authentication, so that different personnel using same machine can access data
GeoNav 16-Jul-12 3:05am    
I am not using impersonation.
DB server is on the same machine as the web app. I have set the application pool to defaultApplicationPool

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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