Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: I am having trouble getting SQL to connect

  1. #1
    klorenc@ltp.org is offline Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Default I am having trouble getting SQL to connect

    I have read all I can find and spoken with our last admin on how to configure my db conn. I need help getting my Multi Store on my local virtual machine. Attached is the error statement. All info in there dbconn is accurate. My server is advantage/ecommerce. My db name is AspDotNetStorefront. My user name is LITURGY/klorenc and the password is correct although left out for obvious reasons. Please help.

    Kevin Lorenc
    LTP.org

    Here is the web.config


    <add key="DBConn" value="data source=ltpadvantage\ecommerce;initial catalog=AspDotNetStorefront; user id=LITURGY\klorenc; password=; persist security info=True;packet size=4096" />
    Attached Images Attached Images  

  2. #2
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Well it's difficult to diagnose remotely but clearly your server is telling you that the login information you provided is incorrect and the login failed.

    Some ideas:

    - Is your database configured to support remote connections
    - Run SQL Server Management studio and connect using the same details
    - Double check that the user id is correct, or ask for a new database specific id to be set up

    Adam

  3. #3
    klorenc@ltp.org is offline Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Default I have validated all fields and sql connectivity

    I am logging into my SQL server remotely on my VM, and all other data matches. Here is a snapshot of my dbconn.


    <add key="DBConn" value="data source=ltpadvantage\ecommerce;initial catalog=AspDotNetStorefront; user id=LITURGY\klorenc; password=; persist security info=True;packet size=4096" />
    The password is filled in. TY for any help or advice.
    Attached Images Attached Images   

  4. #4
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Check the dbconn strings within the web.config file.

  5. #5
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Did you add that login as a user on the AspDotNetStorefront database? If you can log into SSMS with just LITURGY\klorenc then it should exist in there as a login already, but you need to add that as a user to the specific DB as well.

  6. #6
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    OK, guessing a bit here:

    In the example you've given, you've used Windows Authentication. Normally the connection strings for Windows Auth look something like this:

    connectionString="Server=MyServer;Database=MyDb;Tr usted_Connection=Yes;"

    The connection will be made using the process identity of the IIS service (usually NETWORK SERVICE)

    When you've specified your own name in the connection string, I'm not sure if this is going to work because the store won't be running as you.

    As I said, I'm guessing a bit but I'm sure it's something simple.

  7. #7
    klorenc@ltp.org is offline Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Default Dead on

    Windows authentication tries to grab my vm name which is klorencbeta, and even though I have tried to get it to use sql authentication, thats when all of the errors from above happen.

  8. #8
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Ah ok, well it sounds like we're getting close to the cause of your problem.

    Personally, I'd be trying to get a SQL Server username/pass and use that for the authentication.

  9. #9
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    I second what webopius says. SQL server authentication is the best method, in my opinion, for using in sql connections. The main reason is that you are not requiring the network to be up to authenticate your domain user/pass.

  10. #10
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    I Also agree with the above.

    Also not sure if this is relative but try changing "password=; persist " to

    password=;persist

    Not sure if the space after the ; makes an issue