0

I have a visual studio solution with 3 projects: DAL, BL & WebApplication1. As you probably assume, the latter is the interface.

I have a connectionString setting defined in the DAL project.

I have published my solution to my web hosting. Everything works fine, but it seems like my website doesn't connect to the database.

I can run WebService commands and get results using the BL, and every result I get that uses the DAL projects is like the DAL cannot connect to the database.

I have already updated the connectionString value to the value given to my by "myLittlePanel".

How can I achieve a connection to the database, or at least have a deeper understanding of the problem I'm facing?

(C#.net, visual studio 2012, Plesk panel & myLittleAdmin for SQL Server)

3
  • Well you could always add logging around the opening of the connection and catch any exceptions? Commented Jan 17, 2017 at 19:30
  • 1
    It is not exactly clear how that connectionString is defined in the DAL project or what the issue(exception) is, but it may be this problem -stackoverflow.com/questions/1742929/… Commented Jan 17, 2017 at 19:30
  • The exception is: "System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'myUser'"; I believe there's a problem with my connection string - how can I get the right one? Commented Jan 17, 2017 at 19:43

1 Answer 1

1

Ok, I understood what my problem was. I didn't have a 'password' attribute in the connectionString... Now I added it and everything works. :)

Sign up to request clarification or add additional context in comments.

1 Comment

1 upvote for not waiting until someone gave you the answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.