Results 1 to 4 of 4

Thread: databinding ( connection) Problem in web application

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    4

    databinding ( connection) Problem in web application

    Hi till now i am used window application in which there is no problem in connection using following code


    Code:
     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()
     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

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    I Hope this should be moved to ASP.Net

    I Hope this should be moved to ASP.Net
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: databinding ( connection) Problem in web application

    From the Error Message I understood that your SQL Does Not Permit the
    RAKESH-676DD0E1\ASPNET
    user to login..

    Make sure that the Security Tab of the SQL Server has that particular login added there
    Attached Images Attached Images  
    Please mark you thread resolved using the Thread Tools as shown

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    4

    Re: databinding ( connection) Problem in web application

    Thanks man i already solved my problem by this method.
    thanks again for ur help

    Bye

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