|
-
Jan 11th, 2007, 03:28 AM
#1
Thread Starter
Junior Member
[02/03] Server Error in '/PresentationLayer' Application
hi
i'm using SQL 2005
n Microsoft Visual Basic.NET 2003
need some help 
now tryin 2 do a 3-tier project 4 de 1st time
tryin 2 get my datagrid 2 work, like when the page loads, de datagrid gets info from de database n show de info on de datagrid
tis is wat i get when i browse de page
Server Error in '/PresentationLayer' Application.
System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'justcaps'. The user is not associated with a trusted SQL Server connection.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at CAPS_datalayer.Service1.getDataSet(String strCoonection) in c:\inetpub\wwwroot\WebService1\CAPS_datalayer\Service1.asmx.vb:line 70
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at BusinessLayer1.CAPS_DATA.Service1.getDataSet(String strCoonection) in c:\inetpub\wwwroot\BusinessLayer1\Web References\CAPS_DATA\Reference.vb:line 42
at BusinessLayer1.Service1.populateViewMR() in c:\inetpub\wwwroot\BusinessLayer1\Service1.asmx.vb:line 113
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.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Login failed for user 'justcaps'. The user is not associated with a trusted SQL Server connection.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at CAPS_datalayer.Service1.getDataSet(String strCoonection) in c:\inetpub\wwwroot\WebService1\CAPS_datalayer\Service1.asmx.vb:line 70
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at BusinessLayer1.CAPS_DATA.Service1.getDataSet(String strCoonection) in c:\inetpub\wwwroot\BusinessLayer1\Web References\CAPS_DATA\Reference.vb:line 42
at BusinessLayer1.Service1.populateViewMR() in c:\inetpub\wwwroot\BusinessLayer1\Service1.asmx.vb:line 113
Source Error:
Line 112: <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/BusinessLayer1/Service1/populateViewMR", RequestNamespace:="http://tempuri.org/BusinessLayer1/Service1", ResponseNamespace:="http://tempuri.org/BusinessLayer1/Service1", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Line 113: Public Function populateViewMR() As System.Data.DataSet
Line 114: Dim results() As Object = Me.Invoke("populateViewMR", New Object(-1) {})
Line 115: Return CType(results(0),System.Data.DataSet)
Line 116: End Function
Source File: c:\inetpub\wwwroot\PresentationLayer\Web References\CAPS_BIZ1\Reference.vb Line: 114
codes in form
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim cap As New CAPS_BIZ1.Service1
vdg_mrl.DataSource = cap.populateViewMR
vdg_mrl.DataBind()
codes in the Service1.asmx
Code:
<WebMethod()> _
Public Function populateViewMR() As DataSet
Dim data As New CAPS_DATA.Service1
Dim ds As New DataSet
ds = data.getDataSet("SELECT * FROM modulerecords")
End Function
vdg_mrl -> datagrid name
justcaps -> database name
help appreciated >.<
-
Jan 11th, 2007, 04:45 AM
#2
Thread Starter
Junior Member
Re: [02/03] Server Error in '/PresentationLayer' Application
i jus tried connecting to SQL 2000 instead n the error for the above was not shown
however, tis time, my datagrid showed nothing
i changed my codes to tis for the presentation layer
VB Code:
Public Class ViewMR
Inherits System.Web.UI.Page
Dim a As New CAPS_BIZ1.Service1
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
vdg_mrl.DataSource = a.populateViewMR
vdg_mrl.DataBind()
End Sub
End Class
n i made sure tt i entered something in advance in the database
any1 here know wat's going on?
-
Jan 11th, 2007, 11:36 AM
#3
Re: [02/03] Server Error in '/PresentationLayer' Application
First, it would be much easier for me (us) to understand what you're saying if you spelled your words right. Even if English isn't your first language, 'n', 'ur' and 'de' are not mistakes, but are purposely done. They may work in chat, but on a forum like this, it gets very difficult for us to understand and read.
From what I managed to understand, it connects properly when you use SQL 2000, so my best guess is that justcaps is not a valid user in the SQL 2005 database you've created.
-
Jan 11th, 2007, 10:13 PM
#4
Thread Starter
Junior Member
Re: [02/03] Server Error in '/PresentationLayer' Application
sorry about my english
too used to using shortcuts
ya, as u said, it keeps on gives off errors about justcaps not a valid user and etc
but now i using SQL2000 in sch
up till now, i still have problems when the page loads but the datagrid is blank on my page
my codes are the same as my other 2 friends but for some reason. even if create the database from scratch again, the datagrid shows nothing.
-
Jan 15th, 2007, 09:34 AM
#5
Re: [02/03] Server Error in '/PresentationLayer' Application
First, check (in SQL 2000) if justcaps exists as a user.
Second, if he does, then step through your code to the line where the dataset is filled and check to see whether the dataset is actually being filled or not. Also run your SQL statement in Query Analyzer to see if any records are returned.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|