I'm using Visual Wev Developer 2012 and trying to connect to MySql Server on a shared hosting site. My connection string looks like this:
Server="myserverAddress";Port="3306";Database="myDatabaseName";uid="myUserName";Pwd="myPassword"
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
I've tried with and without the quotes. What am i doing wrong here? I would really appreciate any help with this.
So my project was using the default database (SQL Express) even though I didn’t have a connection string pointing to it. The EF uses convention to attach the default database if you don’t specify by using a constructor like this:
public class BloggingContext : DbContext
{
public BloggingContext()
: base("BloggingDatabase")
{
}
}
Then this:
<configuration>
<connectionStrings>
<add name="BloggingCompactDatabase"
providerName="System.Data.SqlServerCe.4.0"
connectionString="Data Source=Blogging.sdf"/>
</connectionStrings>
</configuration>
I found it all here… http://msdn.microsoft.com/en-us/data/jj592674.aspx.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加