Re: Can't connect to DB

From: Sandy (anonymous_at_discussions.microsoft.com)
Date: 10/22/03

  • Next message: Mary Chipman: "Re: Minimal permissions with an Access Database and 2000 server ?"
    Date: Wed, 22 Oct 2003 12:06:40 -0700
    
    

    Hi Andrea!

    Thanks for replying.

    I did find out what the problem was from Chris at
    the .framework.adonet site. Turns out there were two
    things wrong - I had to:

    1. Switch off anonymous access on Directory Security tab
    in IIS (the I_User part), click okay.
        Go back to Directory security. It now reads "Use the
    following Windows user account . . . with reference to the
    Windows user name and password. Check box in front of
    Enable Anonymous Access.
    2. Insert <identity impersonate="true" /> in xml page.

    Thought I would include this in case you come across it in
    the future, you can pass the word on to dummies like me.

    Thanks again.

    Sandy

    >-----Original Message-----
    >Hi,
    >have you tried with this connection string?
    >"Data Source=local;Initial Catalog=PUBS;Integrated
    Security=SSPI;"
    >
    >I changed the "Data Source=localhost" with "Data
    Source=local".
    >
    >Andrea
    >
    >"Sandy" <anonymous@discussions.microsoft.com> wrote in
    message
    >news:0a5001c39811$47c00b60$a001280a@phx.gbl...
    >> Hi!
    >>
    >> I am trying to open a connection to a SQL Server
    database
    >> using just the Framework, Notepad and the browser. I
    keep
    >> getting the error message "SQL Server does not exist or
    >> access is denied."
    >>
    >> I am using the following for the connection:
    >>
    >> Dim conPubs As SqlConnection
    >> ConPubs = New SqlConnection ("Data
    >> Source=localhost;Initial Catalog=PUBS;Integrated
    >> Security=SSPI;")
    >> ConPubs.Open()
    >>
    >> In Page_Load of the script. I can take the same notepad
    >> aspx page and put it into Visual Studio .NET and it
    >> connects without a problem.
    >>
    >> I'm using Windows Server 2003 and my SQL Server 2000 is
    >> set up with windows authentication. I am not on a
    >> network - just studying this stuff on my home computer.
    >>
    >> THIS IS DRIVING ME CRAZY! I have read many many pages
    on
    >> security and nothing seems to be giving me what I
    need. I
    >> would guess on some level there is probably some stupid
    >> little box that has to be checked or unchecked . . .
    Where
    >> ever that could be . . .
    >>
    >> Any help anyone can give me will be immensely
    appreciated!
    >>
    >> Sandy
    >>
    >
    >
    >.
    >


  • Next message: Mary Chipman: "Re: Minimal permissions with an Access Database and 2000 server ?"

    Relevant Pages

    • Re: connection sql server with asp.net
      ... On directory security, click ... account is created in Windows by Microsoft .NET Framework. ... To be sure of using the correct connection string syntax, ... To get the udl file to open, create a blank textfile named as ...
      (microsoft.public.sqlserver.connect)
    • Re: accessing database from webservice
      ... on the specific webservices ... directory security, on the customers server and nothing changed. ... > Check if you are using integrated security in the connection string. ...
      (microsoft.public.dotnet.framework.aspnet.webservices)
    • perplexing SQL authentication from ASP.net issue
      ... directory security is set to Integrated Windows Authentication only. ... MS SQL is set to accept both Windows and SQL ... SQL Server connection. ... I then built a connection string from a blank .udl file: ...
      (microsoft.public.sqlserver.security)
    • Re: Dynamic Access in a Web based application
      ... thanks for ur valuable help but still I cant achieve the purpose. ... does that mean that it still depends on the windows user. ... problems with the connection string I have used. ... > analysis service n according to his role when ever he requests the data ...
      (microsoft.public.sqlserver.olap)
    • SQL DATABASE ACCESS
      ... I want my vb6 app to access SQL in the following way: ... I've set up a special domain user that is also the dbo of the db I want to ... This user id and password is included in the connection string that I ... It's not using the windows user to connect to the db, ...
      (microsoft.public.sqlserver.server)