asp.net mvc 4 - Strange MVC Error Using GearHost -


when run program on local machine works fine. however, when try interact database via gearhost, nugget of error:

description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.

exception details: system.componentmodel.win32exception: system cannot find file specified.

everywhere have gone, forums connection string error.

if case here connection string:

<add name="gamestoreentities" connectionstring="metadata=res://*/models.gamesmodel.csdl|res://*/models.gamesmodel.ssdl|res://*/models.gamesmodel.msl;provider=system.data.sqlclient;provider connection string=&quot;data source=(localdb)\v11.0;attachdbfilename=|datadirectory|\gamestore.mdf;integrated security=true;multipleactiveresultsets=true;app=entityframework&quot;" providername="system.data.entityclient" /> 

if has idea wrong connection string, appreciate feedback.

gearhost not seem have support localdb.

so have create database on admin panel , use credentials of default user created write connection string. create new user database , use credentials instead.

either way new connection string should this

<add name="gamestoreentities" providername="system.data.sqlclient" connectionstring="data source=databasehost;initial catalog=databasename;integrated security=false;user id=username;password=password;multipleactiveresultsets=true" /> 
  • where replace databasehost hostname database. see @ bottom of page after creating database.
  • you password clicking uncover(eye) button after creating database

  • if have data in localdb want sync database have created on gearhost can use data comparison , schema comparison tools in visual studio update target database.

Comments