简体   繁体   English

如何在web.config中更改实体框架的连接字符串

[英]How to change connection string in web.config for entity framework

I need to deploy WCF. 我需要部署WCF。 Database is SQL Server 2008 R2. 数据库是SQL Server 2008 R2。 Access to database is only possible from app server because of Windows Authenticaton (sql server authentication not work). 由于Windows Authenticaton(SQL Server身份验证不起作用),因此只能从应用程序服务器访问数据库。 I need to change my connection string to new data source i tried but not successfull. 我需要将连接字符串更改为尝试但未成功的新数据源。 i have connection address and everything what i need. 我有连接地址和我需要的一切。 My connection string : 我的连接字符串:

<connectionStrings><add name="MyEntities" connectionString="metadata=res://*/MyDatabase.csdl|res://*/MyDatabase.ssdl|res://*/MyDatabase.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=myMachine-LAPTOP;initial catalog=MyDatabaseName;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>

to delete connection string and generate new is not possible, because i have not access from dev computer and app server dont have visual studio to try it from there. 删除连接字符串并生成新字符串是不可能的,因为我无法从开发计算机访问,而应用服务器也没有Visual Studio从那里尝试它。 i need help how to change it. 我需要帮助如何更改它。

请尝试使用记事本打开配置文件来更改连接字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM