Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 13th, 2006, 05:49 PM
Registered User
 
Join Date: Apr 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lagyossarian
Default Problems deploying webpage

My ASP.NET application runs fine within the VS2005 IDE; but, when I deploy to my local machine to try to run it under IIS and calling it up in a browser, I'm getting the following exception:

Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +734979
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
   System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
   System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1770
   System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +92
   System.Web.UI.WebControls.ListControl.PerformSelec t() +31
   System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
   System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
   System.Web.UI.WebControls.ListControl.OnPreRender( EventArgs e) +26
   System.Web.UI.Control.PreRenderRecursiveInternal() +77
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Control.PreRenderRecursiveInternal() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

 I'm a novice at this and really need some help. What stupid newbie mistake am I making here? Thanks in advance for any guidance/assistance rendered.

 
Old April 17th, 2006, 05:01 PM
Registered User
 
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm new to this too, but if you may have to change the database connection string when you deploy your app to a different server. Check that the uid and pwd parameters are correct. Since you get a login failed message, you probably have the server name right, but something wrong with the credentials.

Light a candle, don't curse the dark.
 
Old April 19th, 2006, 05:30 AM
Registered User
 
Join Date: Feb 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to samir_katore
Default

You are getting this error because connection string dosen't contain UserID And Password. so add it.
if you want to create connection string do the following:
Create text file on desktop, rename it path.udl. double click it. here connect to your databse. give user id and password,possibly User Id sa, and password that you have given at the time of installation of sql sever. Click test connection.
After suceed open path.udl file in notepad. u will see the redimate connection string use it in your application.

bye.


samir





Similar Threads
Thread Thread Starter Forum Replies Last Post
WebPage status cdaye99 VBScript 2 August 7th, 2008 08:57 AM
Webpage template help surendran Classic ASP Basics 2 June 8th, 2007 11:12 AM
print a webpage debjanib ASP.NET 2.0 Professional 1 January 1st, 2007 01:07 PM
To Load a webpage Nitu kumar RSS and Atom 0 April 3rd, 2006 04:39 AM
Deploying Files problems jha_arindam .NET Framework 1.x 0 December 22nd, 2005 01:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.