SQL Server 2000 with asp.net windows authenticationhttp://forums.asp.net/t/1679754.aspx/1?SQL+Server+2000+with+asp+net+windows+authenticationTue, 10 May 2011 14:46:40 -040016797544413411http://forums.asp.net/p/1679754/4413411.aspx/1?SQL+Server+2000+with+asp+net+windows+authenticationSQL Server 2000 with asp.net windows authentication <p>Hi</p> <p>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.</p> <pre class="prettyprint">Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'EPSUK\KB$'.</pre> <p>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.</p> <p>In web.config I am using the windows authentication with the below</p> <pre class="prettyprint"> &lt;system.web&gt; &lt;authorization&gt; &lt;allow users="EPSUK\SAnumalsetty"&gt;&lt;/allow&gt; &lt;deny users="*" /&gt; &lt;/authorization&gt; &lt;/system.web&gt;</pre> <p>Please help me how can I resolve this issue. Thanks in advance.</p> 2011-05-10T10:11:38-04:004413504http://forums.asp.net/p/1679754/4413504.aspx/1?Re+SQL+Server+2000+with+asp+net+windows+authenticationRe: SQL Server 2000 with asp.net windows authentication <p>Hi</p> <p>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. </p> <p>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.</p> <p>Thanks in advance.</p> 2011-05-10T11:22:19-04:004413756http://forums.asp.net/p/1679754/4413756.aspx/1?Re+SQL+Server+2000+with+asp+net+windows+authenticationRe: SQL Server 2000 with asp.net windows authentication <p>&nbsp;</p> <p>Hi</p> <p>I am getting the user using the below code in C# and passing it as a parameter to my procedure for audit purpose</p> <pre class="prettyprint">HttpContext.Current.User.Identity.Name.ToString();</pre> <p>Hope this helps some one who is facing the same problem.</p> <p>Thanks.</p> 2011-05-10T14:46:40-04:00