开发者

Sql server express and connection string in web.config

i have connection string s开发者_运维百科tored in web.config file but it is giving me the error.

<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DbProduct.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />

where is the bug in the connection string. i have stored my db DbProduct.mdf in app_data folder. i have never use SQLEXPRESS. so i need guide line. thanks


this AttachDbFilename=|DataDirectory|\DbProduct.mdf

should be AttachDbFilename=|DataDirectory|DbProduct.mdf

You don't need to add \

Have a look at this Using connection strings from web.config in ASP.NET v2.0

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜