Ask a Question related to ASP Database, Design and Development.
-
Jeff Cooper #1
VERY frustrated -- can't connect to MSDE
Ok, appologies and thanks in advance for this, but it can't just be me.
Why can't I seem to get the simple examples in Microsoft's own ASP.Net book
to work? Here's the scoop:
I have VS.Net 2003 Professional installed. I installed MSDE from Microsoft's
site, setting the sa password as part of the setup command line (they don't
tell you that's necessary for some reason, they just say "go here and
download it" -- HA!)
Anyway, MSDE is installed. I then use the osql command to install the pubs
database. Seems to go ok for the most part.
Then, I enter the example from the book, build it, view it and get:
System.Data.SqlClient.SqlException: Login failed for user MYPC\ASPNET'.
The code from the book is:
<WebMethod(Description:="Returns the Pubs Authors table.")> _
Public Function GetAuthors() As DataSet
Dim dsAuthors As New DataSet
Dim Conn As New SqlConnection
Dim da As SqlDataAdapter
Dim ConnString As String
Dim SQL As String
ConnString = "server=MYPC;database=pubs;" & _
"Trusted_Connection=yes"
SQL = "select * from Authors order by au_LName, au_FName"
Conn.ConnectionString = ConnString
da = New SqlDataAdapter(SQL, Conn)
da.Fill(dsAuthors, "Authors")
Return dsAuthors
End Function
I've read a lot in newsgroups about "Integrated Windows authentication" and
I'm not sure if that's relevant to my situation. I have a checkbox for it
in the IIS Console (which has it's own confusions for me), but where do I
set it for MSDE? It seems this is distributed without any kind of GUI which
is fine but I have no idea where to find the command-line equivilant of
"Disable Integrated Windows Authentication." On top of that, I'm not even
sure if disabling it will work. But I'm grasping at straws.
So, in short (to late!) I'd like to know: Does this actually work? If so,
could someone PLEASE send me a list of what I'm missing and/or other
requirements the writers don't bother to mention? At this point, I don't
even care if Integrate Authentication is on or off (though I'd probably
prefer it off since, coming from a VB6/Sybase background I'm used to
entering sa= and pwd= in my connection strings).
Just as an aside, here's a list of things I've tried already:
- Added ASPNET to the logins for the Pubs database using oSql. (I found a
site which listed all sorts of procedures to run to add the user, roles,
etc).
- Added <identity impersonate="true"></identity> to web.config, but that
just changes the error message to "Login failed for user MYPC\IUSR_MYPC".
- Uninstalled/re-installed MSDE.
- Went into the registery and changed
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ MSSQLServer\Loginmode to
0.
BTW: the ms site says I should also have a registry key called
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\[instance...
something-or-other]. I don't. What is this an instance of and what should
I be looking for .. I never explictely created an instance of the server. I
just installed it, rebooted, and it was running. Anyway, I changed Loginmode
to 0, then appended the connection string with user=sa;password=mypassword.
Got the exact SAME error - I thought I would at least get a different one.
- Pulled out several of my eyebrow hairs while laughing like a hyena.
Sorry to drone on. But I can't think of what else to do.
Thanks for listening. Any help would be greatly appreciated.
Jeff
Jeff Cooper Guest
-
Dreamweaver MX and MSDE
I currently have MSDE running on my computer and I have tried to get dreamweaver to connect to it but for the life of me I cannot seem to nail it.... -
Use MSDE in application
Dear all I want to know that can i use MSDE as database server for deploying application. Is it necessary to buy any licence if I use MSDE as... -
DBs and SPs in MSDE installation
MSDE is a equevelant of the more powerfull SQL Server. Therefore looking for tables and storedprocedures in Access (=oledb) is not wath you aspect... -
MSDE and SQL Server
Hello, I am going to be getting my feet wet with SQL Server soon and trying to prepare to convert the clients dbs. In looking for info, I... -
MSDE/SP3 MemoryLeakage
I very much doubt it is a memory leak. Search this group for many similar queries, essentially SQL server will take almost all available memory and... -
Bob Barrows #2
Re: VERY frustrated -- can't connect to MSDE
This is a classic asp newsgroup. While you may be lucky enough to find a
dotnet-savvy person here who can answer your question, you can eliminate the
luck factor by posting your question to an appropriate group. I suggest
microsoft.public.dotnet.framework.adonet.
Bob Barrows Guest



Reply With Quote

