Bojje
Bojje

Reputation: 417

Using connection string in VS2015 and using connection string in IIS to SQL Server

I'm having trouble with understanding connection string, and where what goes where.

I have a job where I have to go trough an old project and make some fixes (nothing major) but it's still big enough that I don't want to make the changes directly to the live server.

I recieved the source code, and created a copy (back-up) of the database to make changes and see if it works.(They have been using mvc if it helps to know..)

When I did some changes and wanted to test this locally trough IIS I ended up with some problem. When I started the website trough IIS it worked untill I clicked on a link and this happend.

enter image description here

I thought that my connection string was wrong from my research of this. But when I tried to log in to my database with a user, it worked just fine. From this conclusion I can only guess that my connection string is working and this is a code related problem?

But when I run this locally trough VS2015 I have no problem at all and everything works just fine. So I'm really lost to what is causing this problem.

Is there a change when using connection string in VS2015 and when using it in IIS to connect to the same Local SQL Server?

Upvotes: 0

Views: 89

Answers (1)

Bojje
Bojje

Reputation: 417

Note to self. Make sure you read trough other stackoverflow answers. Turns out that when I deployed my project it changed my web.config file on the deployed project. Changed it to the one I used in my source code. Worked like a charm.

Format of the initialization string does not conform to specification starting at index 0

Upvotes: 1

Related Questions