Results 1 to 5 of 5

Thread: [02/03] Server Error in '/PresentationLayer' Application

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    28

    [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 >.<

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    28

    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:
    1. Public Class ViewMR
    2.     Inherits System.Web.UI.Page
    3.     Dim a As New CAPS_BIZ1.Service1
    4.  
    5. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    6.         'Put user code to initialize the page here
    7.         vdg_mrl.DataSource = a.populateViewMR
    8.         vdg_mrl.DataBind()
    9.  
    10.     End Sub
    11.  
    12. End Class

    n i made sure tt i entered something in advance in the database
    any1 here know wat's going on?

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Aug 2006
    Posts
    28

    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.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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
  •  



Click Here to Expand Forum to Full Width