Professional Web Applications Themes

Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net - ASP.NET Security

I am only trying to connect to a local host . I am on Windows 2000 Server with sql 2000 server. My error is the classic "SQL server does not exist or access denied" I went to the MS site & they tell me what I know......"some" permissioning issue. I had this code working 2 months ago on a different server but now I cannot get it going now on a different machine I can setup ODBC connections every which way to this local server using Integrated mode access using different connectivity methods such as by using "local" or <machinename> ...

  1. #1

    Default Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net



    I am only trying to connect to a local host .
    I am on Windows 2000 Server with sql 2000 server.


    My error is the classic "SQL server does not exist or access denied"
    I went to the MS site & they tell me what I know......"some" permissioning
    issue.

    I had this code working 2 months ago on a different server but now I cannot
    get it going now on a different
    machine

    I can setup ODBC connections every which way to this local server using
    Integrated mode access
    using different connectivity methods such as by using "local" or
    <machinename> or 127.0.0.1 or <machine IP address>. I can also connect
    using SQL authentication for user sa or some other new user I created.
    So I am not sure about this access denied BS.

    I need to connect to Northwind & pubs dbs (the sample dbs that come with sql
    2000)
    Please post the complete page in (without code behind crap for now).

    I went to different sites & they have partial code & they cause different
    errors ( I am not a Vb.net guru)

    The page I used is something similar to below.

    I am just trying to connect & print the server name & SQL version etc

    '================
    Sub Page_Load(Source As Object, E As EventArgs)

    Dim strConnection1 As String = "server=localhost; database=Northwind; " & _

    "integrated security=true"

    Dim objConnection As New SqlConnection(strConnection)

    Dim strSQL As String = "SELECT FirstName, LastName, Country " & _

    "FROM Employees;"

    Dim objCommand As New SqlCommand(strSQL, objConnection)

    objConnection.Open()

    Response.Write("ServerVersion: " & objConnection.ServerVersion & _

    vbCRLF & "Datasource: " & objConnection.DataSource & _

    vbCRLF & "Database: " & objConnection.Database)

    dgNameList.DataSource = objCommand.ExecuteReader()

    dgNameList.DataBind()

    objConnection.Close()

    End Sub

    '==================

    Can someone tell me what is wrong & also ALL the authentication settings
    step by step I need in Windows 2000 server / SQL 2000 server ?
    This is just the freaking local machine & server. I cannot believe this is
    so hard.
    Last time someone in some newsgroup had me play with registry settings to
    make this work
    in addition to some other Windows 2000 user changes
    (Sorry I did not save it ...did not know this would be so bad)

    I would prefer a complete code page that does both Integrated Auth (as
    above) and also
    SQL auth (using Username / PW).
    (I know the actual call is a one or two line code but the exact format
    without syntax or other errors is the key)


    I don't have VS-7 so I cannot drag & drop the SQL connector control as
    someone suggested.







    Lori Guest

  2. #2

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    Lori,

    When you are connecting to SQL server in integrated security mode IIS is
    passing SQL server the account used to run the website. If you haven't
    changed the web site to use impersonation (you would do that in the
    web.config file) then the site is passing SQL server the anonymous login
    account which the website would normally run under. Depending on your needs
    their are multiple ways to configure this.

    Here's a good article to get you started:

    [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Lori" <__---LoriG----_> wrote in message
    news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    >
    >
    > I am only trying to connect to a local host .
    > I am on Windows 2000 Server with sql 2000 server.
    >
    >
    > My error is the classic "SQL server does not exist or access denied"
    > I went to the MS site & they tell me what I know......"some" permissioning
    > issue.
    >
    > I had this code working 2 months ago on a different server but now I
    cannot
    > get it going now on a different
    > machine
    >
    > I can setup ODBC connections every which way to this local server using
    > Integrated mode access
    > using different connectivity methods such as by using "local" or
    > <machinename> or 127.0.0.1 or <machine IP address>. I can also connect
    > using SQL authentication for user sa or some other new user I created.
    > So I am not sure about this access denied BS.
    >
    > I need to connect to Northwind & pubs dbs (the sample dbs that come with
    sql
    > 2000)
    > Please post the complete page in (without code behind crap for now).
    >
    > I went to different sites & they have partial code & they cause different
    > errors ( I am not a Vb.net guru)
    >
    > The page I used is something similar to below.
    >
    > I am just trying to connect & print the server name & SQL version etc
    >
    > '================
    > Sub Page_Load(Source As Object, E As EventArgs)
    >
    > Dim strConnection1 As String = "server=localhost; database=Northwind; " &
    _
    >
    > "integrated security=true"
    >
    > Dim objConnection As New SqlConnection(strConnection)
    >
    > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    >
    > "FROM Employees;"
    >
    > Dim objCommand As New SqlCommand(strSQL, objConnection)
    >
    > objConnection.Open()
    >
    > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    >
    > vbCRLF & "Datasource: " & objConnection.DataSource & _
    >
    > vbCRLF & "Database: " & objConnection.Database)
    >
    > dgNameList.DataSource = objCommand.ExecuteReader()
    >
    > dgNameList.DataBind()
    >
    > objConnection.Close()
    >
    > End Sub
    >
    > '==================
    >
    > Can someone tell me what is wrong & also ALL the authentication settings
    > step by step I need in Windows 2000 server / SQL 2000 server ?
    > This is just the freaking local machine & server. I cannot believe this is
    > so hard.
    > Last time someone in some newsgroup had me play with registry settings to
    > make this work
    > in addition to some other Windows 2000 user changes
    > (Sorry I did not save it ...did not know this would be so bad)
    >
    > I would prefer a complete code page that does both Integrated Auth (as
    > above) and also
    > SQL auth (using Username / PW).
    > (I know the actual call is a one or two line code but the exact format
    > without syntax or other errors is the key)
    >
    >
    > I don't have VS-7 so I cannot drag & drop the SQL connector control as
    > someone suggested.
    >
    >
    >
    >
    >
    >
    >

    S. Justin Gengo Guest

  3. #3

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net


    "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > If you haven't
    > changed the web site to use impersonation (you would do that in the
    > web.config file) then the site is passing SQL server the anonymous login
    > account which the website would normally run under.
    I have no idea what you mean. Is there an error in logic such as your
    sttement should read

    ======================
    > If you haven't
    > changed the web site to use impersonation (you would do that in the
    > web.config file) then the site is NOT passing SQL server the anonymous
    login
    > account which the website would normally run under
    =============================

    > Depending on your needs
    > their are multiple ways to configure this.
    >
    > Here's a good article to get you started:
    >
    > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]

    The above site shows how to do a DSN connection.
    I already said I am able to do a DSN conncection (but am not using it)

    If you look at my sample code, it is a DSNless conncection, is it not ?


    Lori Guest

  4. #4

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    And another thing.
    The Microsoft error message is so misleading.
    If there is a problem with IIS permissions why the hell does it say
    "SQL server does not exist ?" Very helpful if troubleshooting is it not , by
    misleading you ?
    Also "access denied" by whom by SQL server ? By 2000 Server ? By IIS ?
    Can they be anymore vague ?

    "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > Lori,
    >
    > When you are connecting to SQL server in integrated security mode IIS is
    > passing SQL server the account used to run the website. If you haven't
    > changed the web site to use impersonation (you would do that in the
    > web.config file) then the site is passing SQL server the anonymous login
    > account which the website would normally run under. Depending on your
    needs
    > their are multiple ways to configure this.
    >
    > Here's a good article to get you started:
    >
    > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    >
    > Sincerely,
    >
    > --
    > S. Justin Gengo, MCP
    > Web Developer
    >
    > Free code library at:
    > [url]www.aboutfortunate.com[/url]
    >
    > "Out of chaos comes order."
    > Nietzche
    >
    >
    > "Lori" <__---LoriG----_> wrote in message
    > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > >
    > >
    > > I am only trying to connect to a local host .
    > > I am on Windows 2000 Server with sql 2000 server.
    > >
    > >
    > > My error is the classic "SQL server does not exist or access denied"
    > > I went to the MS site & they tell me what I know......"some"
    permissioning
    > > issue.
    > >
    > > I had this code working 2 months ago on a different server but now I
    > cannot
    > > get it going now on a different
    > > machine
    > >
    > > I can setup ODBC connections every which way to this local server using
    > > Integrated mode access
    > > using different connectivity methods such as by using "local" or
    > > <machinename> or 127.0.0.1 or <machine IP address>. I can also connect
    > > using SQL authentication for user sa or some other new user I created.
    > > So I am not sure about this access denied BS.
    > >
    > > I need to connect to Northwind & pubs dbs (the sample dbs that come with
    > sql
    > > 2000)
    > > Please post the complete page in (without code behind crap for now).
    > >
    > > I went to different sites & they have partial code & they cause
    different
    > > errors ( I am not a Vb.net guru)
    > >
    > > The page I used is something similar to below.
    > >
    > > I am just trying to connect & print the server name & SQL version etc
    > >
    > > '================
    > > Sub Page_Load(Source As Object, E As EventArgs)
    > >
    > > Dim strConnection1 As String = "server=localhost; database=Northwind; "
    &
    > _
    > >
    > > "integrated security=true"
    > >
    > > Dim objConnection As New SqlConnection(strConnection)
    > >
    > > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    > >
    > > "FROM Employees;"
    > >
    > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > >
    > > objConnection.Open()
    > >
    > > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    > >
    > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > >
    > > vbCRLF & "Database: " & objConnection.Database)
    > >
    > > dgNameList.DataSource = objCommand.ExecuteReader()
    > >
    > > dgNameList.DataBind()
    > >
    > > objConnection.Close()
    > >
    > > End Sub
    > >
    > > '==================
    > >
    > > Can someone tell me what is wrong & also ALL the authentication settings
    > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > This is just the freaking local machine & server. I cannot believe this
    is
    > > so hard.
    > > Last time someone in some newsgroup had me play with registry settings
    to
    > > make this work
    > > in addition to some other Windows 2000 user changes
    > > (Sorry I did not save it ...did not know this would be so bad)
    > >
    > > I would prefer a complete code page that does both Integrated Auth (as
    > > above) and also
    > > SQL auth (using Username / PW).
    > > (I know the actual call is a one or two line code but the exact format
    > > without syntax or other errors is the key)
    > >
    > >
    > > I don't have VS-7 so I cannot drag & drop the SQL connector control as
    > > someone suggested.
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    >
    >

    Lori Guest

  5. #5

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    What I am trying say is this
    It would make more sense if the error message described that permission was
    denied at one of the
    possible 3 layers . Even the KB article does not make any references to the
    IIS layer.

    That said, I am not sure what user to add where in IIS

    And another thing.
    How would the SQL Auth. work ? Does it not go thru IIS also anyway,
    regardless ?


    "Lori" <__---LoriG----_> wrote in message
    news:bjq07b$ljgdk$1ID-158805.news.uni-berlin.de...
    > And another thing.
    > The Microsoft error message is so misleading.
    > If there is a problem with IIS permissions why the hell does it say
    > "SQL server does not exist ?" Very helpful if troubleshooting is it not ,
    by
    > misleading you ?
    > Also "access denied" by whom by SQL server ? By 2000 Server ? By IIS ?
    > Can they be anymore vague ?
    >
    > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > > Lori,
    > >
    > > When you are connecting to SQL server in integrated security mode IIS is
    > > passing SQL server the account used to run the website. If you haven't
    > > changed the web site to use impersonation (you would do that in the
    > > web.config file) then the site is passing SQL server the anonymous login
    > > account which the website would normally run under. Depending on your
    > needs
    > > their are multiple ways to configure this.
    > >
    > > Here's a good article to get you started:
    > >
    > > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    > >
    > > Sincerely,
    > >
    > > --
    > > S. Justin Gengo, MCP
    > > Web Developer
    > >
    > > Free code library at:
    > > [url]www.aboutfortunate.com[/url]
    > >
    > > "Out of chaos comes order."
    > > Nietzche
    > >
    > >
    > > "Lori" <__---LoriG----_> wrote in message
    > > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > > >
    > > >
    > > > I am only trying to connect to a local host .
    > > > I am on Windows 2000 Server with sql 2000 server.
    > > >
    > > >
    > > > My error is the classic "SQL server does not exist or access denied"
    > > > I went to the MS site & they tell me what I know......"some"
    > permissioning
    > > > issue.
    > > >
    > > > I had this code working 2 months ago on a different server but now I
    > > cannot
    > > > get it going now on a different
    > > > machine
    > > >
    > > > I can setup ODBC connections every which way to this local server
    using
    > > > Integrated mode access
    > > > using different connectivity methods such as by using "local" or
    > > > <machinename> or 127.0.0.1 or <machine IP address>. I can also
    connect
    > > > using SQL authentication for user sa or some other new user I created.
    > > > So I am not sure about this access denied BS.
    > > >
    > > > I need to connect to Northwind & pubs dbs (the sample dbs that come
    with
    > > sql
    > > > 2000)
    > > > Please post the complete page in (without code behind crap for now).
    > > >
    > > > I went to different sites & they have partial code & they cause
    > different
    > > > errors ( I am not a Vb.net guru)
    > > >
    > > > The page I used is something similar to below.
    > > >
    > > > I am just trying to connect & print the server name & SQL version etc
    > > >
    > > > '================
    > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > >
    > > > Dim strConnection1 As String = "server=localhost; database=Northwind;
    "
    > &
    > > _
    > > >
    > > > "integrated security=true"
    > > >
    > > > Dim objConnection As New SqlConnection(strConnection)
    > > >
    > > > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    > > >
    > > > "FROM Employees;"
    > > >
    > > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > > >
    > > > objConnection.Open()
    > > >
    > > > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    > > >
    > > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > > >
    > > > vbCRLF & "Database: " & objConnection.Database)
    > > >
    > > > dgNameList.DataSource = objCommand.ExecuteReader()
    > > >
    > > > dgNameList.DataBind()
    > > >
    > > > objConnection.Close()
    > > >
    > > > End Sub
    > > >
    > > > '==================
    > > >
    > > > Can someone tell me what is wrong & also ALL the authentication
    settings
    > > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > > This is just the freaking local machine & server. I cannot believe
    this
    > is
    > > > so hard.
    > > > Last time someone in some newsgroup had me play with registry
    settings
    > to
    > > > make this work
    > > > in addition to some other Windows 2000 user changes
    > > > (Sorry I did not save it ...did not know this would be so bad)
    > > >
    > > > I would prefer a complete code page that does both Integrated Auth (as
    > > > above) and also
    > > > SQL auth (using Username / PW).
    > > > (I know the actual call is a one or two line code but the exact format
    > > > without syntax or other errors is the key)
    > > >
    > > >
    > > > I don't have VS-7 so I cannot drag & drop the SQL connector control as
    > > > someone suggested.
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Lori Guest

  6. #6

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    Lori,



    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Lori" <__---LoriG----_> wrote in message
    news:bjq07b$ljgdk$1ID-158805.news.uni-berlin.de...
    > And another thing.
    > The Microsoft error message is so misleading.
    > If there is a problem with IIS permissions why the hell does it say
    > "SQL server does not exist ?" Very helpful if troubleshooting is it not ,
    by
    > misleading you ?
    > Also "access denied" by whom by SQL server ? By 2000 Server ? By IIS ?
    > Can they be anymore vague ?
    >
    > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > > Lori,
    > >
    > > When you are connecting to SQL server in integrated security mode IIS is
    > > passing SQL server the account used to run the website. If you haven't
    > > changed the web site to use impersonation (you would do that in the
    > > web.config file) then the site is passing SQL server the anonymous login
    > > account which the website would normally run under. Depending on your
    > needs
    > > their are multiple ways to configure this.
    > >
    > > Here's a good article to get you started:
    > >
    > > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    > >
    > > Sincerely,
    > >
    > > --
    > > S. Justin Gengo, MCP
    > > Web Developer
    > >
    > > Free code library at:
    > > [url]www.aboutfortunate.com[/url]
    > >
    > > "Out of chaos comes order."
    > > Nietzche
    > >
    > >
    > > "Lori" <__---LoriG----_> wrote in message
    > > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > > >
    > > >
    > > > I am only trying to connect to a local host .
    > > > I am on Windows 2000 Server with sql 2000 server.
    > > >
    > > >
    > > > My error is the classic "SQL server does not exist or access denied"
    > > > I went to the MS site & they tell me what I know......"some"
    > permissioning
    > > > issue.
    > > >
    > > > I had this code working 2 months ago on a different server but now I
    > > cannot
    > > > get it going now on a different
    > > > machine
    > > >
    > > > I can setup ODBC connections every which way to this local server
    using
    > > > Integrated mode access
    > > > using different connectivity methods such as by using "local" or
    > > > <machinename> or 127.0.0.1 or <machine IP address>. I can also
    connect
    > > > using SQL authentication for user sa or some other new user I created.
    > > > So I am not sure about this access denied BS.
    > > >
    > > > I need to connect to Northwind & pubs dbs (the sample dbs that come
    with
    > > sql
    > > > 2000)
    > > > Please post the complete page in (without code behind crap for now).
    > > >
    > > > I went to different sites & they have partial code & they cause
    > different
    > > > errors ( I am not a Vb.net guru)
    > > >
    > > > The page I used is something similar to below.
    > > >
    > > > I am just trying to connect & print the server name & SQL version etc
    > > >
    > > > '================
    > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > >
    > > > Dim strConnection1 As String = "server=localhost; database=Northwind;
    "
    > &
    > > _
    > > >
    > > > "integrated security=true"
    > > >
    > > > Dim objConnection As New SqlConnection(strConnection)
    > > >
    > > > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    > > >
    > > > "FROM Employees;"
    > > >
    > > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > > >
    > > > objConnection.Open()
    > > >
    > > > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    > > >
    > > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > > >
    > > > vbCRLF & "Database: " & objConnection.Database)
    > > >
    > > > dgNameList.DataSource = objCommand.ExecuteReader()
    > > >
    > > > dgNameList.DataBind()
    > > >
    > > > objConnection.Close()
    > > >
    > > > End Sub
    > > >
    > > > '==================
    > > >
    > > > Can someone tell me what is wrong & also ALL the authentication
    settings
    > > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > > This is just the freaking local machine & server. I cannot believe
    this
    > is
    > > > so hard.
    > > > Last time someone in some newsgroup had me play with registry
    settings
    > to
    > > > make this work
    > > > in addition to some other Windows 2000 user changes
    > > > (Sorry I did not save it ...did not know this would be so bad)
    > > >
    > > > I would prefer a complete code page that does both Integrated Auth (as
    > > > above) and also
    > > > SQL auth (using Username / PW).
    > > > (I know the actual call is a one or two line code but the exact format
    > > > without syntax or other errors is the key)
    > > >
    > > >
    > > > I don't have VS-7 so I cannot drag & drop the SQL connector control as
    > > > someone suggested.
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    S. Justin Gengo Guest

  7. #7

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    Lori,

    Sorry about that link. I copied and pasted the wrong one from my list.

    Here's the right one:

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetch12.asp[/url]


    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Lori" <__---LoriG----_> wrote in message
    news:bjq0u6$kldqf$1ID-158805.news.uni-berlin.de...
    > What I am trying say is this
    > It would make more sense if the error message described that permission
    was
    > denied at one of the
    > possible 3 layers . Even the KB article does not make any references to
    the
    > IIS layer.
    >
    > That said, I am not sure what user to add where in IIS
    >
    > And another thing.
    > How would the SQL Auth. work ? Does it not go thru IIS also anyway,
    > regardless ?
    >
    >
    > "Lori" <__---LoriG----_> wrote in message
    > news:bjq07b$ljgdk$1ID-158805.news.uni-berlin.de...
    > > And another thing.
    > > The Microsoft error message is so misleading.
    > > If there is a problem with IIS permissions why the hell does it say
    > > "SQL server does not exist ?" Very helpful if troubleshooting is it not
    ,
    > by
    > > misleading you ?
    > > Also "access denied" by whom by SQL server ? By 2000 Server ? By IIS ?
    > > Can they be anymore vague ?
    > >
    > > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > > news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > > > Lori,
    > > >
    > > > When you are connecting to SQL server in integrated security mode IIS
    is
    > > > passing SQL server the account used to run the website. If you haven't
    > > > changed the web site to use impersonation (you would do that in the
    > > > web.config file) then the site is passing SQL server the anonymous
    login
    > > > account which the website would normally run under. Depending on your
    > > needs
    > > > their are multiple ways to configure this.
    > > >
    > > > Here's a good article to get you started:
    > > >
    > > > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    > > >
    > > > Sincerely,
    > > >
    > > > --
    > > > S. Justin Gengo, MCP
    > > > Web Developer
    > > >
    > > > Free code library at:
    > > > [url]www.aboutfortunate.com[/url]
    > > >
    > > > "Out of chaos comes order."
    > > > Nietzche
    > > >
    > > >
    > > > "Lori" <__---LoriG----_> wrote in message
    > > > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > > > >
    > > > >
    > > > > I am only trying to connect to a local host .
    > > > > I am on Windows 2000 Server with sql 2000 server.
    > > > >
    > > > >
    > > > > My error is the classic "SQL server does not exist or access denied"
    > > > > I went to the MS site & they tell me what I know......"some"
    > > permissioning
    > > > > issue.
    > > > >
    > > > > I had this code working 2 months ago on a different server but now I
    > > > cannot
    > > > > get it going now on a different
    > > > > machine
    > > > >
    > > > > I can setup ODBC connections every which way to this local server
    > using
    > > > > Integrated mode access
    > > > > using different connectivity methods such as by using "local" or
    > > > > <machinename> or 127.0.0.1 or <machine IP address>. I can also
    > connect
    > > > > using SQL authentication for user sa or some other new user I
    created.
    > > > > So I am not sure about this access denied BS.
    > > > >
    > > > > I need to connect to Northwind & pubs dbs (the sample dbs that come
    > with
    > > > sql
    > > > > 2000)
    > > > > Please post the complete page in (without code behind crap for now).
    > > > >
    > > > > I went to different sites & they have partial code & they cause
    > > different
    > > > > errors ( I am not a Vb.net guru)
    > > > >
    > > > > The page I used is something similar to below.
    > > > >
    > > > > I am just trying to connect & print the server name & SQL version
    etc
    > > > >
    > > > > '================
    > > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > > >
    > > > > Dim strConnection1 As String = "server=localhost;
    database=Northwind;
    > "
    > > &
    > > > _
    > > > >
    > > > > "integrated security=true"
    > > > >
    > > > > Dim objConnection As New SqlConnection(strConnection)
    > > > >
    > > > > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    > > > >
    > > > > "FROM Employees;"
    > > > >
    > > > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > > > >
    > > > > objConnection.Open()
    > > > >
    > > > > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    > > > >
    > > > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > > > >
    > > > > vbCRLF & "Database: " & objConnection.Database)
    > > > >
    > > > > dgNameList.DataSource = objCommand.ExecuteReader()
    > > > >
    > > > > dgNameList.DataBind()
    > > > >
    > > > > objConnection.Close()
    > > > >
    > > > > End Sub
    > > > >
    > > > > '==================
    > > > >
    > > > > Can someone tell me what is wrong & also ALL the authentication
    > settings
    > > > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > > > This is just the freaking local machine & server. I cannot believe
    > this
    > > is
    > > > > so hard.
    > > > > Last time someone in some newsgroup had me play with registry
    > settings
    > > to
    > > > > make this work
    > > > > in addition to some other Windows 2000 user changes
    > > > > (Sorry I did not save it ...did not know this would be so bad)
    > > > >
    > > > > I would prefer a complete code page that does both Integrated Auth
    (as
    > > > > above) and also
    > > > > SQL auth (using Username / PW).
    > > > > (I know the actual call is a one or two line code but the exact
    format
    > > > > without syntax or other errors is the key)
    > > > >
    > > > >
    > > > > I don't have VS-7 so I cannot drag & drop the SQL connector control
    as
    > > > > someone suggested.
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    S. Justin Gengo Guest

  8. #8

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net


    "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    news:O6EeMLHeDHA.3224tk2msftngp13.phx.gbl...
    > Lori,
    >
    >
    ???

    Yes ?



    Lori Guest

  9. #9

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    I appreciate the link but honestly, it is a typical Microsoft link.
    They just thorough bits & pieces here & there.

    What I need is this (to achieve the simple goal)

    1. What I need to do at the Windows 2000 Server level ( User security
    settings, Registry or whatever)
    2. What I need to do at the IIS-5 level
    3. The asp.net code page using vb.net (or even c# is fine).

    I was hoping someone would already have the code page & tell me the
    corresponding settings
    for items 2 & 3 above on their machine to use the code.

    I have done enough "fishing" on this & getting tired of it.




    "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    news:eCg4FNHeDHA.2320TK2MSFTNGP12.phx.gbl...
    > Lori,
    >
    > Sorry about that link. I copied and pasted the wrong one from my list.
    >
    > Here's the right one:
    >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetch12.asp[/url]
    >
    >
    > Sincerely,
    >
    > --
    > S. Justin Gengo, MCP
    > Web Developer
    >
    > Free code library at:
    > [url]www.aboutfortunate.com[/url]
    >
    > "Out of chaos comes order."
    > Nietzche
    >
    >
    > "Lori" <__---LoriG----_> wrote in message
    > news:bjq0u6$kldqf$1ID-158805.news.uni-berlin.de...
    > > What I am trying say is this
    > > It would make more sense if the error message described that permission
    > was
    > > denied at one of the
    > > possible 3 layers . Even the KB article does not make any references to
    > the
    > > IIS layer.
    > >
    > > That said, I am not sure what user to add where in IIS
    > >
    > > And another thing.
    > > How would the SQL Auth. work ? Does it not go thru IIS also anyway,
    > > regardless ?
    > >
    > >
    > > "Lori" <__---LoriG----_> wrote in message
    > > news:bjq07b$ljgdk$1ID-158805.news.uni-berlin.de...
    > > > And another thing.
    > > > The Microsoft error message is so misleading.
    > > > If there is a problem with IIS permissions why the hell does it say
    > > > "SQL server does not exist ?" Very helpful if troubleshooting is it
    not
    > ,
    > > by
    > > > misleading you ?
    > > > Also "access denied" by whom by SQL server ? By 2000 Server ? By IIS
    ?
    > > > Can they be anymore vague ?
    > > >
    > > > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > > > news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > > > > Lori,
    > > > >
    > > > > When you are connecting to SQL server in integrated security mode
    IIS
    > is
    > > > > passing SQL server the account used to run the website. If you
    haven't
    > > > > changed the web site to use impersonation (you would do that in the
    > > > > web.config file) then the site is passing SQL server the anonymous
    > login
    > > > > account which the website would normally run under. Depending on
    your
    > > > needs
    > > > > their are multiple ways to configure this.
    > > > >
    > > > > Here's a good article to get you started:
    > > > >
    > > > > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    > > > >
    > > > > Sincerely,
    > > > >
    > > > > --
    > > > > S. Justin Gengo, MCP
    > > > > Web Developer
    > > > >
    > > > > Free code library at:
    > > > > [url]www.aboutfortunate.com[/url]
    > > > >
    > > > > "Out of chaos comes order."
    > > > > Nietzche
    > > > >
    > > > >
    > > > > "Lori" <__---LoriG----_> wrote in message
    > > > > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > > > > >
    > > > > >
    > > > > > I am only trying to connect to a local host .
    > > > > > I am on Windows 2000 Server with sql 2000 server.
    > > > > >
    > > > > >
    > > > > > My error is the classic "SQL server does not exist or access
    denied"
    > > > > > I went to the MS site & they tell me what I know......"some"
    > > > permissioning
    > > > > > issue.
    > > > > >
    > > > > > I had this code working 2 months ago on a different server but now
    I
    > > > > cannot
    > > > > > get it going now on a different
    > > > > > machine
    > > > > >
    > > > > > I can setup ODBC connections every which way to this local server
    > > using
    > > > > > Integrated mode access
    > > > > > using different connectivity methods such as by using "local" or
    > > > > > <machinename> or 127.0.0.1 or <machine IP address>. I can also
    > > connect
    > > > > > using SQL authentication for user sa or some other new user I
    > created.
    > > > > > So I am not sure about this access denied BS.
    > > > > >
    > > > > > I need to connect to Northwind & pubs dbs (the sample dbs that
    come
    > > with
    > > > > sql
    > > > > > 2000)
    > > > > > Please post the complete page in (without code behind crap for
    now).
    > > > > >
    > > > > > I went to different sites & they have partial code & they cause
    > > > different
    > > > > > errors ( I am not a Vb.net guru)
    > > > > >
    > > > > > The page I used is something similar to below.
    > > > > >
    > > > > > I am just trying to connect & print the server name & SQL version
    > etc
    > > > > >
    > > > > > '================
    > > > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > > > >
    > > > > > Dim strConnection1 As String = "server=localhost;
    > database=Northwind;
    > > "
    > > > &
    > > > > _
    > > > > >
    > > > > > "integrated security=true"
    > > > > >
    > > > > > Dim objConnection As New SqlConnection(strConnection)
    > > > > >
    > > > > > Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
    > > > > >
    > > > > > "FROM Employees;"
    > > > > >
    > > > > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > > > > >
    > > > > > objConnection.Open()
    > > > > >
    > > > > > Response.Write("ServerVersion: " & objConnection.ServerVersion & _
    > > > > >
    > > > > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > > > > >
    > > > > > vbCRLF & "Database: " & objConnection.Database)
    > > > > >
    > > > > > dgNameList.DataSource = objCommand.ExecuteReader()
    > > > > >
    > > > > > dgNameList.DataBind()
    > > > > >
    > > > > > objConnection.Close()
    > > > > >
    > > > > > End Sub
    > > > > >
    > > > > > '==================
    > > > > >
    > > > > > Can someone tell me what is wrong & also ALL the authentication
    > > settings
    > > > > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > > > > This is just the freaking local machine & server. I cannot believe
    > > this
    > > > is
    > > > > > so hard.
    > > > > > Last time someone in some newsgroup had me play with registry
    > > settings
    > > > to
    > > > > > make this work
    > > > > > in addition to some other Windows 2000 user changes
    > > > > > (Sorry I did not save it ...did not know this would be so bad)
    > > > > >
    > > > > > I would prefer a complete code page that does both Integrated Auth
    > (as
    > > > > > above) and also
    > > > > > SQL auth (using Username / PW).
    > > > > > (I know the actual call is a one or two line code but the exact
    > format
    > > > > > without syntax or other errors is the key)
    > > > > >
    > > > > >
    > > > > > I don't have VS-7 so I cannot drag & drop the SQL connector
    control
    > as
    > > > > > someone suggested.
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Lori Guest

  10. #10

    Default Re: Newbie needs code pages for SQL Server 2000 access from asp.net page using vb.net

    Actually it should read like this

    1. What I need to do at the Windows 2000 Server level ( User security
    settings, Registry or whatever)
    2. What I need to set at the SQL server 2000 level
    3. What I need to do at the IIS-5 level
    4. The asp.net code page using vb.net (or even c# is fine) & the project
    file including web.config file if any

    I ran into 100's code pages ( Item 4 ) that tells you how to connect but
    none of them address other layers
    (Items 1 thru 3 above)

    I am hoping some of you can tell me your machine configs for items 1 thru 3
    above.
    I think item 4 is ok with what I have. (And I suspect item 2 is OK 2 for me)
    It is the OS level or IIS settings that are always a pain.
    It is amazing how painful it is for even everything local to same machine


    "Lori" <__---LoriG----_> wrote in message
    news:bjqbou$ltkeg$1ID-158805.news.uni-berlin.de...
    > I appreciate the link but honestly, it is a typical Microsoft link.
    > They just thorough bits & pieces here & there.
    >
    > What I need is this (to achieve the simple goal)
    >
    > 1. What I need to do at the Windows 2000 Server level ( User security
    > settings, Registry or whatever)
    > 2. What I need to do at the IIS-5 level
    > 3. The asp.net code page using vb.net (or even c# is fine).
    >
    > I was hoping someone would already have the code page & tell me the
    > corresponding settings
    > for items 2 & 3 above on their machine to use the code.
    >
    > I have done enough "fishing" on this & getting tired of it.
    >
    >
    >
    >
    > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > news:eCg4FNHeDHA.2320TK2MSFTNGP12.phx.gbl...
    > > Lori,
    > >
    > > Sorry about that link. I copied and pasted the wrong one from my list.
    > >
    > > Here's the right one:
    > >
    > >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetch12.asp[/url]
    > >
    > >
    > > Sincerely,
    > >
    > > --
    > > S. Justin Gengo, MCP
    > > Web Developer
    > >
    > > Free code library at:
    > > [url]www.aboutfortunate.com[/url]
    > >
    > > "Out of chaos comes order."
    > > Nietzche
    > >
    > >
    > > "Lori" <__---LoriG----_> wrote in message
    > > news:bjq0u6$kldqf$1ID-158805.news.uni-berlin.de...
    > > > What I am trying say is this
    > > > It would make more sense if the error message described that
    permission
    > > was
    > > > denied at one of the
    > > > possible 3 layers . Even the KB article does not make any references
    to
    > > the
    > > > IIS layer.
    > > >
    > > > That said, I am not sure what user to add where in IIS
    > > >
    > > > And another thing.
    > > > How would the SQL Auth. work ? Does it not go thru IIS also anyway,
    > > > regardless ?
    > > >
    > > >
    > > > "Lori" <__---LoriG----_> wrote in message
    > > > news:bjq07b$ljgdk$1ID-158805.news.uni-berlin.de...
    > > > > And another thing.
    > > > > The Microsoft error message is so misleading.
    > > > > If there is a problem with IIS permissions why the hell does it say
    > > > > "SQL server does not exist ?" Very helpful if troubleshooting is it
    > not
    > > ,
    > > > by
    > > > > misleading you ?
    > > > > Also "access denied" by whom by SQL server ? By 2000 Server ? By
    IIS
    > ?
    > > > > Can they be anymore vague ?
    > > > >
    > > > > "S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
    > > > > news:eNMgDwGeDHA.1748TK2MSFTNGP10.phx.gbl...
    > > > > > Lori,
    > > > > >
    > > > > > When you are connecting to SQL server in integrated security mode
    > IIS
    > > is
    > > > > > passing SQL server the account used to run the website. If you
    > haven't
    > > > > > changed the web site to use impersonation (you would do that in
    the
    > > > > > web.config file) then the site is passing SQL server the anonymous
    > > login
    > > > > > account which the website would normally run under. Depending on
    > your
    > > > > needs
    > > > > > their are multiple ways to configure this.
    > > > > >
    > > > > > Here's a good article to get you started:
    > > > > >
    > > > > > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378[/url]
    > > > > >
    > > > > > Sincerely,
    > > > > >
    > > > > > --
    > > > > > S. Justin Gengo, MCP
    > > > > > Web Developer
    > > > > >
    > > > > > Free code library at:
    > > > > > [url]www.aboutfortunate.com[/url]
    > > > > >
    > > > > > "Out of chaos comes order."
    > > > > > Nietzche
    > > > > >
    > > > > >
    > > > > > "Lori" <__---LoriG----_> wrote in message
    > > > > > news:bjpt0d$li3vt$1ID-158805.news.uni-berlin.de...
    > > > > > >
    > > > > > >
    > > > > > > I am only trying to connect to a local host .
    > > > > > > I am on Windows 2000 Server with sql 2000 server.
    > > > > > >
    > > > > > >
    > > > > > > My error is the classic "SQL server does not exist or access
    > denied"
    > > > > > > I went to the MS site & they tell me what I know......"some"
    > > > > permissioning
    > > > > > > issue.
    > > > > > >
    > > > > > > I had this code working 2 months ago on a different server but
    now
    > I
    > > > > > cannot
    > > > > > > get it going now on a different
    > > > > > > machine
    > > > > > >
    > > > > > > I can setup ODBC connections every which way to this local
    server
    > > > using
    > > > > > > Integrated mode access
    > > > > > > using different connectivity methods such as by using "local" or
    > > > > > > <machinename> or 127.0.0.1 or <machine IP address>. I can also
    > > > connect
    > > > > > > using SQL authentication for user sa or some other new user I
    > > created.
    > > > > > > So I am not sure about this access denied BS.
    > > > > > >
    > > > > > > I need to connect to Northwind & pubs dbs (the sample dbs that
    > come
    > > > with
    > > > > > sql
    > > > > > > 2000)
    > > > > > > Please post the complete page in (without code behind crap for
    > now).
    > > > > > >
    > > > > > > I went to different sites & they have partial code & they cause
    > > > > different
    > > > > > > errors ( I am not a Vb.net guru)
    > > > > > >
    > > > > > > The page I used is something similar to below.
    > > > > > >
    > > > > > > I am just trying to connect & print the server name & SQL
    version
    > > etc
    > > > > > >
    > > > > > > '================
    > > > > > > Sub Page_Load(Source As Object, E As EventArgs)
    > > > > > >
    > > > > > > Dim strConnection1 As String = "server=localhost;
    > > database=Northwind;
    > > > "
    > > > > &
    > > > > > _
    > > > > > >
    > > > > > > "integrated security=true"
    > > > > > >
    > > > > > > Dim objConnection As New SqlConnection(strConnection)
    > > > > > >
    > > > > > > Dim strSQL As String = "SELECT FirstName, LastName, Country " &
    _
    > > > > > >
    > > > > > > "FROM Employees;"
    > > > > > >
    > > > > > > Dim objCommand As New SqlCommand(strSQL, objConnection)
    > > > > > >
    > > > > > > objConnection.Open()
    > > > > > >
    > > > > > > Response.Write("ServerVersion: " & objConnection.ServerVersion &
    _
    > > > > > >
    > > > > > > vbCRLF & "Datasource: " & objConnection.DataSource & _
    > > > > > >
    > > > > > > vbCRLF & "Database: " & objConnection.Database)
    > > > > > >
    > > > > > > dgNameList.DataSource = objCommand.ExecuteReader()
    > > > > > >
    > > > > > > dgNameList.DataBind()
    > > > > > >
    > > > > > > objConnection.Close()
    > > > > > >
    > > > > > > End Sub
    > > > > > >
    > > > > > > '==================
    > > > > > >
    > > > > > > Can someone tell me what is wrong & also ALL the authentication
    > > > settings
    > > > > > > step by step I need in Windows 2000 server / SQL 2000 server ?
    > > > > > > This is just the freaking local machine & server. I cannot
    believe
    > > > this
    > > > > is
    > > > > > > so hard.
    > > > > > > Last time someone in some newsgroup had me play with registry
    > > > settings
    > > > > to
    > > > > > > make this work
    > > > > > > in addition to some other Windows 2000 user changes
    > > > > > > (Sorry I did not save it ...did not know this would be so bad)
    > > > > > >
    > > > > > > I would prefer a complete code page that does both Integrated
    Auth
    > > (as
    > > > > > > above) and also
    > > > > > > SQL auth (using Username / PW).
    > > > > > > (I know the actual call is a one or two line code but the exact
    > > format
    > > > > > > without syntax or other errors is the key)
    > > > > > >
    > > > > > >
    > > > > > > I don't have VS-7 so I cannot drag & drop the SQL connector
    > control
    > > as
    > > > > > > someone suggested.
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Lori Guest

Similar Threads

  1. Access 2002 PDFWriter VBA Code w/WinXP does not work like Access 2000
    By Tony_VBACoder in forum Adobe Acrobat Windows
    Replies: 3
    Last Post: April 30th, 07:44 PM
  2. Replies: 3
    Last Post: April 20th, 11:56 PM
  3. Access 2000 or SQL Server 2000
    By Denis in forum ASP Database
    Replies: 1
    Last Post: January 25th, 03:38 PM
  4. ASP.NET access denied to SQL Server 2000
    By Jan Bannister in forum ASP Database
    Replies: 2
    Last Post: December 23rd, 06:47 PM
  5. Replies: 0
    Last Post: July 6th, 06:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139