SQL Server does not exist or access denied

Discussion in 'ASP .Net' started by Ravikanth[MVP], Jul 14, 2003.

  1. Hi

    Are you using named instances of SQL Server?
    First check whether u r able to connect to SQL Server to
    SQL Enterpraise manager


    HTH
    Ravikanth



    >-----Original Message-----
    >I am running an asp.net application on my development
    >machine (Win2K, .NET framework). This prog connects to

    a
    >SQL Server (on another machine).
    >When I run the following code it errors with the

    following
    >message: "SQL Server does not exist or access denied"
    >
    >Dim strConnect As String = Application("CONN")
    >Dim cnIntranet As New SqlConnection(strConnect)
    >Try
    > cnIntranet.Open()
    >Catch ex As SqlException
    > Response.Write(ex.Message & "<BR>")
    > Return
    >End Try
    >
    >'Where
    >'Application("CONN")
    >= "server=servername;database=dbname;uid=loginname;pwd=ab

    cd
    >efg"
    >
    >However if I copy the project up to the production
    >Intranet server (Win2k) it works fine (pointing at the
    >same sql server as when it doesn't work).
    >I haven't done anything on the SQL server to allow

    access
    >from the production Intranet server but it works from
    >there, but not my local IIS.
    >
    >I know this is probably a basic security problem but
    >having searched the internet I can't find a soln.
    >
    >Regards
    >.
    >
     
    Ravikanth[MVP], Jul 14, 2003
    #1
    1. Advertising

  2. Thanks for reply. I am able to connect to this sql server
    by many others means (query analyzer, enterprise mgr and
    also the same .net app when running from production
    server). It's only when I run it from LOCAL iis it doesn't
    work.
    If by "named instance" you mean using the actual name as
    opposed to IP address? then yes, I'm using the actual name
    of the server.

    >-----Original Message-----
    >Hi
    >
    >Are you using named instances of SQL Server?
    >First check whether u r able to connect to SQL Server to
    >SQL Enterpraise manager
    >
    >
    >HTH
    >Ravikanth
    >
    >
     
    Fiona Wallace, Jul 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bassel Tabbara [MSFT]

    RE: SQL Server does not exist or access denied

    Bassel Tabbara [MSFT], Jun 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,398
    Bassel Tabbara [MSFT]
    Jun 25, 2003
  2. Natty Gur
    Replies:
    4
    Views:
    618
    Fiona Wallace
    Jul 15, 2003
  3. John Toop
    Replies:
    0
    Views:
    430
    John Toop
    Jul 22, 2003
  4. gg
    Replies:
    0
    Views:
    383
  5. Marc
    Replies:
    2
    Views:
    376
Loading...

Share This Page