473,434 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

error when connecting to database question in asp.net

dk
this is the DSN connection string in web.confi

<add key="DSN" value="server=localhost;database=userDB;Integrated Security=SSPI" /

any idea regarding what is causing this following error message when the connection object trys to open
tia
d

Server Error in '/FormsAuth' Application
-------------------------------------------------------------------------------

Login failed for user 'CHODRON\ASPNET'.
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 'CHODRON\ASPNET'

Source Error:

Line 95: strCn=System.Configuration.ConfigurationSettings.A ppSettings["DSN"].ToString()
Line 96: SqlConnection cn=new SqlConnection(strCn)
Line 97: cn.Open()
Line 98: tr
Line 99:
Source File: c:\inetpub\wwwroot\formsauth\userdb.cs Line: 97

Stack Trace:

[SqlException: Login failed for user 'CHODRON\ASPNET'.
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction
System.Data.SqlClient.SqlConnection.Open(
FormsAuth.UserDB.SaveNewUser(String UserName, String LastName, String FirstName, String email, String PasswordHash, String Salt, Boolean MustChangePassword) in c:\inetpub\wwwroot\formsauth\userdb.cs:9
FormsAuth.User.SaveNewUser(String UserName, String LastName, String FirstName, String email, String Password, Boolean MustChangePassword) in c:\inetpub\wwwroot\formsauth\user.cs:16
FormsAuth.Register.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\formsauth\register.aspx.cs:7
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +10
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +1
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +3
System.Web.UI.Page.ProcessRequestMain() +127

Nov 18 '05 #1
1 1351
CMA
try using this connection string .....

<add key="DSN" value="server=localhost;database=userDB;uid=databa se user
name;pwd=database user password;Connection Lifetime=0"/>

if u need to hide the password, u have to use encrypted way to do it..

hope this helps,
CMA
"dk" <an*******@discussions.microsoft.com> wrote in message
news:C0**********************************@microsof t.com...
this is the DSN connection string in web.config

<add key="DSN" value="server=localhost;database=userDB;Integrated Security=SSPI" />
any idea regarding what is causing this following error message when the connection object trys to open? tia,
dk
Server Error in '/FormsAuth' Application.
-------------------------------------------------------------------------- ------
Login failed for user 'CHODRON\ASPNET'.
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 'CHODRON\ASPNET'.
Source Error:
Line 95: strCn=System.Configuration.ConfigurationSettings.A ppSettings["DSN"].ToString
(); Line 96: SqlConnection cn=new SqlConnection(strCn);
Line 97: cn.Open();
Line 98: try
Line 99: {
Source File: c:\inetpub\wwwroot\formsauth\userdb.cs Line: 97

Stack Trace:
[SqlException: Login failed for user 'CHODRON\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) System.Data.SqlClient.SqlConnection.Open()
FormsAuth.UserDB.SaveNewUser(String UserName, String LastName, String FirstName, String email, String PasswordHash, String Salt, Boolean
MustChangePassword) in c:\inetpub\wwwroot\formsauth\userdb.cs:97 FormsAuth.User.SaveNewUser(String UserName, String LastName, String FirstName, String email, String Password, Boolean MustChangePassword) in
c:\inetpub\wwwroot\formsauth\user.cs:168 FormsAuth.Register.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\formsauth\register.aspx.cs:72 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
6
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not...
7
by: deltalimagolf | last post by:
I now get the following error message after copying an asp.net application to the deployment web server. I don't have SQLExpress or any version of SQL 2005 installed. I found the "LocalSQLServer"...
2
by: arsisthesis | last post by:
Hi all, I have a curious problem with the ERROR 1044 and 1045: -system: OS X 10.4.3 (bash shell) -bash schell prompt: /~ kssun$ -I have set passwd to 'kssun' -I set path:...
3
by: Ann Marinas | last post by:
Hi there, I am currently developing an ASP.NET program that connects to a SQL Server 2000 database. I also have SQL Server 2005 Express installed on the same local machine. Prior to...
5
by: James | last post by:
Hello, I have written a simple logon page that redirects to another page when successful. All works fine on my computer but when I upload it I get the error message below. I have written it...
4
by: alegria4ever | last post by:
I have an Access 2000 database that links several tables from Oracle 9. For some reason or another, one of our user repeatedly gets the following error when accessing queries within this database:...
5
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting...
13
by: AAaron123 | last post by:
I downloaded the personal website starter kit and when I run it I get the error shown below. I found a way of using Launch Surface Area Configuration that is supposed to fix the remote setting...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.