Re: Web Applicaiton using Trusted Connections to SQL on different machine?

From: Scott Townsend (scott-i_at_.-N0-SPAMplease.enm.com)
Date: 07/18/05

  • Next message: Deepak: "sa User is disabled"
    Date: Mon, 18 Jul 2005 07:50:31 -0700
    
    

    I've changed the Driver to Provider and set it to sqloledb. I get the Same
    Errors. And yes, you are correct, it was on the Open, not the Execute.

    Depending if I set the server to our backup Production SQL Server or the
    Production SQL Server I get the following:

    ---backup Production SQL Server
    Error Type:
    Microsoft OLE DB Provider for SQL Server (0x80040E4D)
    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

    ---Production SQL Server
    Error Type:
    Microsoft OLE DB Provider for SQL Server (0x80004005)
    Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    Server connection.

    Then I do a "Response.Write Request.ServerVariables("logon_user")" I get the
    proper Domain\UserID of who is logged into the Local Machine that I want
    passed to the Webserver to Pass then to the SQL Server.

    Thanks you,
      Scott<-

    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:ONzZn%23jhFHA.3568@TK2MSFTNGP10.phx.gbl...
    > Scott Townsend wrote:
    >> Thank you for your reply.
    >>
    >> I'm not sure if this is really .Net Related though. I get the Error
    >> if I use ASP.NET code to make the connection, or if i just use ASP
    >> code to make the connection.
    >>
    >> My ASP code looks like this:
    >>
    >> Set enm = Server.CreateObject("adodb.connection")
    >> enm.Open "Driver={SQL
    >> Server};Server=SERVER;Trusted_Connection=yes;Database=Northwind;"
    >
    > You should use the native OLE DB provider, not ODBC:
    >
    > enm.open "provider=sqloledb;Integrated Security=SSPI;" & _
    > "Data Source=SERVER;Initial Catalog=Northwind"
    >
    >
    >> Set rsUser = enm.Execute("SELECT * FROM customers")
    >> Set enm = Nothing
    >> I get the Error on the .Execute
    >>
    >
    > On the Execute? If it was a problem with the connection itself, the Open
    > statement would be throwing the error, not the Execute.
    >
    > What is the error?
    >
    > Bob Barrows
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >


  • Next message: Deepak: "sa User is disabled"

    Relevant Pages

    • Re: Classic ASP connectionstring to SQL Server 2005
      ... So this connection string is in the VB6 dll? ... What is the error message? ... Provider cannot be found. ... can you ping the sql server? ...
      (microsoft.public.inetserver.asp.db)
    • Re: Problem with the Legacy ASP files and the Sql Server Express
      ... It looks like it is not going to be an easy job getting it to work on the SQL Server 2005 and Express:(. ... 'Then you can execute the command and then retrieve the ID ... I am 100% sure this code works against any version of SQL Server, as long as the connection is OK and the SP has two parameters @varCompany as Input and @Return_Value as Output. ... I do not think your problem is due to difference of SQL Server2000 and SQL Server2005, unless your stored procedure has some thing that only works in SQL Server2000, not SQL Server 2005. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Export to Text File Fails from Server Box
      ... If you are on WKSTN1 and you pick up a package from SVR1 and press execute, ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... >I should have specified in my question that in re-creating the text> connection, I did point in to a file local to the SQL Server. ... When I click on the>>> Destination tab, there is an execute button. ...
      (microsoft.public.sqlserver.dts)
    • Re: Error while connecting remote SQL server
      ... There might be possoble you have defined aliases for the SQL server in your ... An error has occurred while establishing a connection to the server. ... (provider: Named Pipes Provider,error:40-Could not open ... (provider: Named Pipes Provider, error: 0 - No process is on the other ...
      (microsoft.public.dotnet.framework.adonet)
    • RE: Error while connecting remote SQL server
      ... SQL Server does not allow remote connections. ... (provider: TCP Provider, error: ... An error has occurred while establishing a connection to the server. ... (provider: Named Pipes Provider, error: 0 - No process is on the other ...
      (microsoft.public.dotnet.framework.adonet)