<connectionStrings>
<add name="MarketingMateEntities" connectionString="metadata=res://*/MarketingMate.csdl|res://*/MarketingMate.ssdl|res://*/MarketingMate.msl;provider=System.Data.SqlClient;provider connection string="Data Source=192.168.1.200;Initial Catalog=MarketingMate;Persist Security Info=True;User ID=sa;Password=XXX;MultipleActiveResultSets=True;Connect Timeout=120" providerName="System.Data.EntityClient"/>
</connectionStrings>
如上,设置Connect Timeout
MVC3的配置文件不支持 这样的写法- -.
@刘小备: 配置跟mvc,还是winform,webform都没有任何的关系
@chenping2008: 要报错啊
@chenping2008:
@chenping2008: 就这几个属性了
<add name="AdventureWorksEntities" connectionString="metadata=.\AdventureWorks.csdl|.\AdventureWorks.ssdl|.\AdventureWorks.msl; provider=System.Data.SqlClient;provider connection string='Data Source=localhost; Initial Catalog=AdventureWorks;Integrated Security=True;Connection Timeout=60; multipleactiveresultsets=true'" providerName="System.Data.EntityClient" />
在web.config中配置,按一楼的做就行