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

From: S. Justin Gengo (sjgengo_at_aboutfortunate.com)
Date: 09/11/03


Date: Thu, 11 Sep 2003 09:43:52 -0500


Lori,

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

Here's the right one:

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

Sincerely,

-- 
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
                             Nietzche
"Lori" <__---LoriG----_@yahoo.com> wrote in message
news:bjq0u6$kldqf$1@ID-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----_@yahoo.com> wrote in message
> news:bjq07b$ljgdk$1@ID-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" <sjgengo@aboutfortunate.com> wrote in message
> > news:eNMgDwGeDHA.1748@TK2MSFTNGP10.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:
> > >
> > > http://support.microsoft.com/default.aspx?scid=KB;EN-US;q176378
> > >
> > > Sincerely,
> > >
> > > -- 
> > > S. Justin Gengo, MCP
> > > Web Developer
> > >
> > > Free code library at:
> > > www.aboutfortunate.com
> > >
> > > "Out of chaos comes order."
> > >                              Nietzche
> > >
> > >
> > > "Lori" <__---LoriG----_@yahoo.com> wrote in message
> > > news:bjpt0d$li3vt$1@ID-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.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: New to Merge/Replication
    ... ADO.NET 3.0 includes "Synchronization Services" that does not require IIS. ... Hitchhiker's Guide to Visual Studio and SQL Server ... It was my deepest hope that Merge/Replication between SQL Compact Edition and SQL Server 2005 Enterprise Edition would have it's own sync services NOT dependent on IIS. ... You can use merge replication with SQL Server on your main desktop serving as the publisher with SQL Compact on PPC, TabletPC, or other desktops as subscribers, so that would probably be the easiest solution for you. ...
    (microsoft.public.sqlserver.ce)
  • Re: Help on synch to SQL server
    ... from SQL CE to SQL Server from your smart-device application's code. ... This can occur whenever the device has a network path to IIS, ... Unlike merge replication between SQL Servers where you can use RMO ... Ideally I would like to use Sql CE to synch with a SQL ...
    (microsoft.public.sqlserver.ce)
  • Re: SMS_MP_CONTROL_MANAGER error 4960
    ... When I try to restart the IIS it says nothing.... ... Manually restart the SMS Agent Host service on the MP. ... MP encountered an error when connecting to SQL Server. ... The Default Web Site is disabled in IIS. ...
    (microsoft.public.sms.setup)
  • RE: IUsr can not login
    ... I too am not sure what the IIS lockdown tool does (I am a SQL Server ... that had been assigned permission to login into SQL ... Amongst the NT account names will be the account/group that IIS ...
    (microsoft.public.sqlserver.security)
  • Re: Internet Information Services in MCE
    ... Per user Group Policy Restrictions for XP Home and XP Pro ... However, I am able to run SQL Server Dev Edition on my work laptop, which is ... I've installed the IIS component but I'm not sure I have a good ... I'm trying to install SQL Server 2005, ...
    (microsoft.public.windows.mediacenter)

Quantcast