Author: CSDeveloper | Posted on: 5/13/2010 5:38:14 AM | Views : 418

I'm developing a website where I will be using Windows Authentication.
So far I have the connection to the SQL Server in the webconfig file in the appSettings Tag like so,
<appSettings>
    <add key="ConnString" value="Data Source=WPHVD185022-LT8\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"/>
  </appSettings>
I have discovered that I can get the windows username via asp.net like so,
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
I will use some string functions to seperate the DOmain Name and username.
The winows usernames will be in a windows ad group and that group will be granted access to the sql server so that they can access the database via the application.
I wish to display an error to the asp.net application if a user doesn't ha ...

Go to the complete details ...