I am using sql server 2000 with asp.net 3.5 to build a web page which uses windows authentication to allow only 2 or 3 users. Everything is done and it works fine in my local machine but giving problem when I deployed it in the server.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'EPSUK\KB$'.
This is the exception it displays on the page. The page open with a search button and text box. When I enter the some data and search then the data is populated and binded to the gridview. Opening the search page works fine but then I click on search button it gives the error. I am using a dropdown on the search page which populates fine.
In web.config I am using the windows authentication with the below
I got it working by changing the connection strings to use a user name which is created in the sql enterprise manager and giving access to the procedures which is required for my page to work.
Windows authentication is also working based on the user allowed to access the page. Only this is when ever I access the procedures in sqlserver it access with the user I've created as I am logging with it. But how can I give access to the windows logged
in user to access them so that when audit the changes, I can easily identify the user.
Thanks in advance.
Marked as answer by swapna.anu on May 10, 2011 02:46 PM
swapna.anu
Contributor
2658 Points
745 Posts
SQL Server 2000 with asp.net windows authentication
May 10, 2011 10:11 AM|LINK
Hi
I am using sql server 2000 with asp.net 3.5 to build a web page which uses windows authentication to allow only 2 or 3 users. Everything is done and it works fine in my local machine but giving problem when I deployed it in the server.
This is the exception it displays on the page. The page open with a search button and text box. When I enter the some data and search then the data is populated and binded to the gridview. Opening the search page works fine but then I click on search button it gives the error. I am using a dropdown on the search page which populates fine.
In web.config I am using the windows authentication with the below
<system.web> <authorization> <allow users="EPSUK\SAnumalsetty"></allow> <deny users="*" /> </authorization> </system.web>Please help me how can I resolve this issue. Thanks in advance.
swapna.anu
Contributor
2658 Points
745 Posts
Re: SQL Server 2000 with asp.net windows authentication
May 10, 2011 11:22 AM|LINK
Hi
I got it working by changing the connection strings to use a user name which is created in the sql enterprise manager and giving access to the procedures which is required for my page to work.
Windows authentication is also working based on the user allowed to access the page. Only this is when ever I access the procedures in sqlserver it access with the user I've created as I am logging with it. But how can I give access to the windows logged in user to access them so that when audit the changes, I can easily identify the user.
Thanks in advance.
swapna.anu
Contributor
2658 Points
745 Posts
Re: SQL Server 2000 with asp.net windows authentication
May 10, 2011 02:46 PM|LINK
Hi
I am getting the user using the below code in C# and passing it as a parameter to my procedure for audit purpose
Hope this helps some one who is facing the same problem.
Thanks.