I'm sorry if this has been asked and answered elsewhere. I'm a complete newbie and I need a bit of hand holding...
I've tried setting up a basic databound datagrid using the MSDE SQL server. I get a login Failed error when I try to display the page in the browser inside VS.NET 2003. I don't get any errors until I actually try to preview the page in the browser. Sorry for the long post below... which is the full error message. What, from what you see, can I do to fix this?
Please be forewarned that I have never used MSDE before or SQL server for that matter (I'm a MySQL guy making the switch!). For that reason I am a little confused about this error because I thought everything was ok because in Visual Studio the DataAdapter previewed with no errors and there were no build errors. I was able to drag the authors table over from the Northwind db, create a dataset and fill it from its dataAdapter.
Server Error in '/asp-practice' Application.
Login failed for user 'PHILIP\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 'PHILIP\ASPNET'.
Source Error:
Line 134: 'Put user code to initialize the page hereLine 135: If Not Page.IsPostBack ThenLine 136: SqlDataAdapter1.Fill(AuthorsDS1)Line 137: DataBind()Line 138:
Source File: c:\inetpub\wwwroot\asp-practice\WebForm1.aspx.vb Line: 136
Stack Trace:
[SqlException: Login failed for user 'PHILIP\ASPNET'.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 asp_practice.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\asp-practice\WebForm1.aspx.vb:136 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032your connection string appears to be set to use integrated authentication (i.e. the credentials of the current user)
while developing, the current user is you: 'PHILIP\yourLogin'
when the web page runs however, the user account that is used is ASPNET
ie: ('PHILIP\ASPNET')
the ASPNET account needs to be given access to your SQL database.|||I have the same error, but I use SQLExpress Server.
It hasn't any GUI.
How can I set ASPNET user for SQLExpress server and which password have I to use?
No comments:
Post a Comment