Can't open Northwind

G

Guest

Can't open Northwind


I remembered doing walkthrough using Northwind. However it wasn't an http
project but a file project using the development server. Northwind allowed
me to add, edit and insert, and the web page looked fine.

I opened a simple project just to see whether I could get my sqlserver on
the internet. (vs studio 2005, sqlserver 2005)

I created the project in http location http://localhost/Northwind . I
dragged a sqldatasource to the page, configuring it to display ID and
ProductName. I clicked advanced, but noticed the generate insert, edit and
delete were grayed out. That told me something was wrong with my
authetification.

I configured my sqlserver 2005 to have integrated security.

I built the solution and website, then pressed cntl-F5. I got a login
error. Nowhere did the page ask me for username and password. First
questions - how do I get this to open up a web page, and how to I get it to
allow me to generate insert, edit and delete statements?

dennist685

Server Error in '/Northwind' Application
--------------------------------------------------------------------------------

Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\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: Cannot open database
"Northwind" requested by the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\ASPNET'.

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): Cannot open database "Northwind" requested by
the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +735123

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet 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.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 
C

Cowboy \(Gregory A. Beamer\)

Check the connection by going through the properties page. By default, the
wizard drops the password portion (for security reasons). I find it easier
to dink with the actual code, but, if I remember correctly, the wizard gives
you this option, as well.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
dennist685 said:
Can't open Northwind


I remembered doing walkthrough using Northwind. However it wasn't an http
project but a file project using the development server. Northwind
allowed
me to add, edit and insert, and the web page looked fine.

I opened a simple project just to see whether I could get my sqlserver on
the internet. (vs studio 2005, sqlserver 2005)

I created the project in http location http://localhost/Northwind . I
dragged a sqldatasource to the page, configuring it to display ID and
ProductName. I clicked advanced, but noticed the generate insert, edit
and
delete were grayed out. That told me something was wrong with my
authetification.

I configured my sqlserver 2005 to have integrated security.

I built the solution and website, then pressed cntl-F5. I got a login
error. Nowhere did the page ask me for username and password. First
questions - how do I get this to open up a web page, and how to I get it
to
allow me to generate insert, edit and delete statements?

dennist685

Server Error in '/Northwind' Application.
--------------------------------------------------------------------------------

Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\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: Cannot open
database
"Northwind" requested by the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\ASPNET'.

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): Cannot open database "Northwind" requested by
the login. The login failed.
Login failed for user 'YOUR-02910F1DF1\ASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +735123

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
+170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet 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.ExecuteSelect(DataSourceSelectArguments
arguments) +1770
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181

System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 
G

Guest

Thanks Gregory,

I tried the solution property page and the http property pages. Neither of
them allowed me to access the connection string. I played around with the
sqldatasource configuration. But the choice was using windows
authentification by default - my previous choice, or sqlserver configuration.
When I tried the later, I used my name dennist685 with no password. But the
test connection failed.

So I'm still in the same place.

dennist685
 
Joined
Jun 26, 2009
Messages
1
Reaction score
0
Cannot open database "Northwind" requested by the login. The login failed. > Login fa

Hi,

I also encountered this kind of problem
I want to share how I overcome this problem
here are the steps i follow after that I can fix that problem
1. open MS SQL Server Management Studio
2. expand the dbase you want to access (eg. Northwind)
3. expand security folder
4. right click on User, click new user
5. enter ASPNET into User name text box
6. enter YOUR-02910F1DF1\ASPNET in Login name
7. select db_datareader checkbox and db_datawriter checkbox under
Database role membership
8. Click Ok
9. Restart your SQL Server
10. Test your website again
I got this solution from here :flute:
imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top