VERY frustrated -- can't connect to MSDE

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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....
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may 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