开发者

How do I get the EntLib database settings to stay deleted?

I'm using EntLib 5.0 for logging and exception handling, but not for data access.

Everytime I delete the 'database settings' app block using the entlib designer, it re-adds itself after I rebuild the applicati开发者_如何学Con. It wouldn't be a problem and I'd just leave it except that it creates LocalSqlServer and LocalMySqlServer instances automatically and throws "LocalMy[DB]Server (Connection String): Connection string is a required value" on the next build.

I've just deleted it before every other build, but that's obviously pretty annoying.

So again, how can I delete it such that it'll stay deleted?


You need to edit your machine.config.

This issue started for me, after I installed Wordpress/MySQL via Web Matrix.

It added this line into my .NET 2.0 machine.config file:

<add name="LocalMySqlServer" connectionString="" />

So all you need to do is open it up in a text editor and comment out that line!

In my case, the file was here: c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

And I commented out two providers, e.g.:

<!--    <add name="OraAspNetConString" connectionString=" " />
    <add name="LocalMySqlServer" connectionString="" /> -->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜