'the connection property in the web.config file is missing' message appearing in Visual Studio Web Developer 2010 Express
I've been working with a number of web application projects for a few weeks no开发者_如何学编程w. These have been C# MVC web apps using LINQ to SQL.
In the last few days when I've been opening Visual Studio it has been presenting me with the following dialogue.
The connection property in the web.config file is missing or incorrect. The connection string from the .dbml file has been used in its place.
I have no idea why I'm getting this. I've not changed the Web.Config or anything in the database. It is affecting all projects, even ones I've not opened for weeks.
The only thing I've seen on the web is this: http://www.stuffthatjustworks.com/How+To+Fix+LINQ+To+SQL+DBML+Issue+The+Connection+Property+Of+The+Webconfig+File+Is+Missing+Or+Incorrect.aspx
However, it feels like a complete VS uninstallation and a registry hack is a bit extreme.
Anyone come across this before, knows why it happens and knows how to fix it?
Thanks,
I have figured out the solution of this problem. I am using VS2010 Ultimate, SqlServer 2008 R2, .Net 4.0.
- Step 1: Right click on the .DBML file and select "Run Custom Tool".
- Step 2: Set "Application setting = false" in the connecton properties of your DataContext.
- Step 3: press "Save All".
精彩评论