| | |
databinding ( connection) Problem in web application
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jan 2009
Posts: 21
Reputation:
Solved Threads: 0
Hi till now i am used window application in which there is no problem in connection using following code
As i am not using userid & password instead i am using window authentication
But now i develop web application & used this code & also tried .NET toolbox oledbdataadpter & dataset but when I debug my application then the connection will be failed & show message
Server Error in '/webshoppe' Application.
--------------------------------------------------------------------------------
Login failed for user 'RAKESH-676DD0E1\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.OleDb.OleDbException: Login failed for user 'RAKESH-676DD0E1\ASPNET'.
Source Error:
Line 152: 'Put user code to initialize the page here
Line 153:
Line 154: OleDbDataAdapter1.Fill(DataSet11)
Line 155: End Sub
Line 156:
Source File: c:\inetpub\wwwroot\webshoppe\WebForm3.aspx.vb Line: 154
Stack Trace:
[OleDbException (0x80040e4d): Login failed for user 'RAKESH-676DD0E1\ASPNET'.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
webshoppe.WebForm3.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webshoppe\WebForm3.aspx.vb:154
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
please help.......
VB.NET Syntax (Toggle Plain Text)
Dim cnn As SqlConnection cnn = New SqlConnection("data source=RAKESH-676DD0E1;initial catalog=rw;integrated security=SSPI") cnn.Open() Dim da As SqlDataAdapter Dim dt As New DataTable da = New SqlDataAdapter("select * from publicity", cnn) da.Fill(dt) DataGrid1.DataSource = dt cnn.Close()
As i am not using userid & password instead i am using window authentication
But now i develop web application & used this code & also tried .NET toolbox oledbdataadpter & dataset but when I debug my application then the connection will be failed & show message
Server Error in '/webshoppe' Application.
--------------------------------------------------------------------------------
Login failed for user 'RAKESH-676DD0E1\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.OleDb.OleDbException: Login failed for user 'RAKESH-676DD0E1\ASPNET'.
Source Error:
Line 152: 'Put user code to initialize the page here
Line 153:
Line 154: OleDbDataAdapter1.Fill(DataSet11)
Line 155: End Sub
Line 156:
Source File: c:\inetpub\wwwroot\webshoppe\WebForm3.aspx.vb Line: 154
Stack Trace:
[OleDbException (0x80040e4d): Login failed for user 'RAKESH-676DD0E1\ASPNET'.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
webshoppe.WebForm3.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\webshoppe\WebForm3.aspx.vb:154
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
please help.......
I'm sure you using SQL Server 2000
So, the error is you didn't give some permission to ASP.NET user who trying access SQL instance, therefore it blocked.
From server security in SQL Server Enterprise Manager, logins right click and add ASPNET user with windows authentication type.
Try running the application again then tell me what happened.
So, the error is you didn't give some permission to ASP.NET user who trying access SQL instance, therefore it blocked.
From server security in SQL Server Enterprise Manager, logins right click and add ASPNET user with windows authentication type.
Try running the application again then tell me what happened.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Datagrid Total Column Problem
- Next Thread: How To Add Multiple Rows In A Datatable
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add advanced application array assignment basic binary box button buttons center click code combo connectionstring convert cpu data database databasesearch datagrid datagridview design designer dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder forms image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity pan peertopeervideostreaming picturebox picturebox2 port print printpreview record regex reports" reuse right-to-left save savedialog search serial socket sqldatbase sqlserver storedprocedure string temp textbox timer txttoxmlconverter useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf xml






