CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2008
    Posts
    12

    Trouble with ConnectionString - What is my User ID and password

    Hi,

    I know the format is right, but what is my user ID and password. I get this error when I try to open the webpage on localhost:

    HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.

    I am using SQL Server 2005 express.

    I am running this on my computer, still working on the webpage, so no remote server or anything just want to access the webpage I have done on my PC.

    How do I find out what my username and password is. I am not sure if 127.0.0.1 is correct, but as I said I am running this on my computer. Its IE7.

    Thanks,

    Mike
    Last edited by Mike_Gore; October 18th, 2009 at 10:50 PM.

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: Trouble with ConnectionString - What is my User ID and password

    Quote Originally Posted by Mike_Gore View Post
    <add key="ConnectionString" value="Data Source=127.0.0.1\SQLEXPRESS;Initial Catalog=UDG;Persist Security Info=True;User ID=username;PWD=password;"/>
    Try changing in into localhost and see what happens

    <add key="ConnectionString" value="Data Source=localhost\SQLEXPRESS;Initial Catalog=UDG;Persist Security Info=True;User ID=username;PWD=password;"/>

  3. #3
    Join Date
    Feb 2008
    Posts
    12

    Re: Trouble with ConnectionString - What is my User ID and password

    tried localhost, didn't work.

  4. #4
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Trouble with ConnectionString - What is my User ID and password

    you connection string attribute for the password should be "Password" not "PWD". Though that is not causing your issue(but it will).

    as for what the username and password is, what did you set them as? During the setup of SQL Express, you are asked to put in a password for the "sa" account. So use "sa" as the username, and whatever you entered during the setup as the password.

    Is SQL Express running? Go to Start --> Control Panel --> Administrative Tools --> Services ... and look for the SQL Express service(s). Are they started?

    Also, what did you name your instance of SQL Express? During the setup, there was a screen that should have had 2 radio buttons. One said to use the instance name that is in the corresponding textbox. The other said to use the default name. Which did you choose?
    ===============================
    My Blog

  5. #5
    Join Date
    Feb 2008
    Posts
    12

    Re: Trouble with ConnectionString - What is my User ID and password

    there is one services called SQL Server Browser which is disabled. But I can't enable this process. Doesn't allow me to start this service. Could this be the cause? If so how do I enable it?

    I think I chose windows authentication, not sure. Can I get to that screen and select username and password, or would I have to reinstall it?
    Last edited by Mike_Gore; September 25th, 2009 at 09:12 AM.

  6. #6
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Trouble with ConnectionString - What is my User ID and password

    You will need to reinstall. After reinstall, try again(putting in the username and password), and see if that works or gives you a different error message.
    ===============================
    My Blog

  7. #7
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Trouble with ConnectionString - What is my User ID and password

    Authentication problems? Here's Beth Massi's blog showing how to do it:

    http://blogs.msdn.com/bethmassi/arch...-on-vista.aspx
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  8. #8
    Join Date
    Feb 2008
    Posts
    12

    Re: Trouble with ConnectionString - What is my User ID and password

    Thanks everyone. It is working now. :-)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured