I have created a login page and a table in sql server using windows authentication and a stored procedure to insert the values from login form
But when I click on the login button it shows the following error
Server Error in '/WebSite1' Application.
Login failed for user 'vikas-PCikas'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'vikas-PCikas'.
[SqlException (0x80131904): Login failed for user 'vikaskriti'.]
My connection string is as follows--------->>>>
string strcon = "Data source= -.; User id=vikas-PC\vikas; initial catalog =master";
Please help me in resolving the above error
Thanks
kritika Rana
Iam AjayPosted Apr 8, 2013, 6:19 AM
You server name is simply the name of the computer that you database is running on.
If it's running on the same computer that you are developing your program on then it will be that computers name.
Initial Catalog is the name of your database, and UserId and Password are the User ID and Password needed to access that database.
if your using windows authentication please use integrated security
example.....
myConnectionString = "Data Source=XYZ-484E\\sqlexpress;Initial Catalog=AdventureWorks;Integrated Security=SSPI;";
Iam Ajay
07207612471