问题描述
asp.net mvc3有两个项目,一个是前端,另一个是后端,用于管理数据库.
前端项目的路径为D:\ MyProject \ ArticleCMS \ ArticleCMS
Web.config路径:D:\ MyProject \ ArticleCMS \ ArticleCMS \ Web.config
后端项目的路径为D:\ MyProject \ ArticleCMS \ ArticleManage
Web.config路径:D:\ MyProject \ ArticleCMS \ ArticleManage \ Web.config
并且数据库文件的路径为D:\ MyProject \ ArticleCMS \ ArticleCMS \ App_Data \ ArticleCMS.mdf
在我的前端项目Web.config中,connectionStrings
There are two project by asp.net mvc3 ,one is frontend and the other is backend to manage the database.
Frontend project ''s path is D:\MyProject\ArticleCMS\ArticleCMS
Web.config path : D:\MyProject\ArticleCMS\ArticleCMS\Web.config
Backend project ''s path is D:\MyProject\ArticleCMS\ArticleManage
Web.config path: D:\MyProject\ArticleCMS\ArticleManage\Web.config
and the database file ''s path is D:\MyProject\ArticleCMS\ArticleCMS\App_Data\ArticleCMS.mdf
In my frontend project Web.config ,the connectionStrings
<connectionStrings>
<add name="ArticleCMSEntities" connectionString="metadata=res://*/Models.ArticleCMS.csdl|res://*/Models.ArticleCMS.ssdl|res://*/Models.ArticleCMS.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\ArticleCMS.mdf;integrated security=True;connect timeout=30;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
</connectionStrings>
在后端项目Web.config中,connectionStrings应该是什么?
thx for help
In the backend project Web.config, the connectionStrings should be what?
thx for help
推荐答案
这篇关于两个项目使用一个数据库文件,如何在两个项目中配置connectionStrings?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!