anyone got a code first Entity Framework with Vidahost

Associate
Joined
19 Jul 2006
Posts
1,847
Just wondered if anyone here is using Vidahost Cloud and running an MVC 4 Entity framework with a code first database?

Everything is working lovely on a local machine. However having got them to create me a mssql username and password and changing my connection string in the web config i cant connect.

The web app runs as I can get to the first page, but when I click on the link that initially builds the database ( if blank) and connects to it i get a
A network-related or instance-specific error occurred while establishing a connection to SQL Server.
Im taking this is either something to do with my connection string or the database not been set up correctly?
 
Associate
Joined
16 Apr 2007
Posts
2,208
Just wondered if anyone here is using Vidahost Cloud and running an MVC 4 Entity framework with a code first database?

Everything is working lovely on a local machine. However having got them to create me a mssql username and password and changing my connection string in the web config i cant connect.

The web app runs as I can get to the first page, but when I click on the link that initially builds the database ( if blank) and connects to it i get a
Im taking this is either something to do with my connection string or the database not been set up correctly?
So its erroring when you have your code local but db on vidahost?
If so possibly a firewall issue?
 
Associate
OP
Joined
19 Jul 2006
Posts
1,847
No running it locally on my machine with visual studios and mssql express it works.

I have published the project and ftp it to the server the site will load the home page and the default about page. but when I click on a link that logs on to the db this is where the error comes. the db should be created by the code on vidahost when this link is first clicked.
 
Soldato
Joined
18 Oct 2002
Posts
15,411
Location
The land of milk & beans
It'll be your connection string. It cannot find the instance of the server to connect to, so either the server/instance name is wrong or the server itself is unreachable. The former is much
more likely.

If it was to do with the user you're connecting as being unauthorised you'd see a different error.
 
Back
Top Bottom