0

I am building an application using ASP.NET MVC and everything works fine on my local setup (localhost). I'm using GoDaddy for hosting and when I try to register as a user for my application, I get this error:

Unable to complete operation. The supplied SqlConnection does not specify an initial catalog or AttachDBFileName.

So I checked my web.config and it does actually provide those two arguments/parameters in the connection string:

 <add name="DefaultConnection"
  connectionString="Data Source=ip-of-database;
  AttachDbFilename=|DataDirectory|\project-20151104031949.mdf;
  Initial Catalog=project-20151104031949;User Id=user; Password=password"
   providerName="System.Data.SqlClient"/>

I am using the Entity Framework (code first).

I looked at this Stackoverflow question as well as the documentation for ASP.NET deployment but either of them didn't really help.

Any suggestions?

Community
  • 1
  • 1
Jonathan
  • 135
  • 1
  • 10
  • I would think that GoDaddy would have some good examples of connection strings. However, I don't think that you would attach to the mdf, you should specify a server\instance and initial catalog (which you have). –  Jun 04 '16 at 21:50
  • Clue: https://www.godaddy.com/help/find-your-connection-strings-3323 –  Jun 04 '16 at 21:51
  • https://www.godaddy.com/help/find-your-connection-strings-3323 But I don't have access to that because it's a shared account. I tried the mdf out of desperation. – Jonathan Jun 04 '16 at 21:53
  • @RudyTheHunter I just finished commenting that I looked at that when you commented the link. – Jonathan Jun 04 '16 at 21:55

0 Answers0