如何为不同位置的多台PC上的项目运行配置app.config? [英] how to configure app.config for for project run on multiple PC's on different location?

查看:52
本文介绍了如何为不同位置的多台PC上的项目运行配置app.config?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< configuration>

< configsections>



< connectionstrings>

< add name =LatTejDB>

connectionString =数据源= LOCUSC-PC;初始目录= NewData;集成安全性= True

providerName =System.Data。 SqlClient/>





< startup>< supportedruntime version =v4.0sku =。NETFramework,Version = v4.0>

<configuration>
<configsections>

<connectionstrings>
<add name="LatTejDB">
connectionString="Data Source=LOCUSC-PC;Initial Catalog=NewData;Integrated Security=True"
providerName="System.Data.SqlClient"/>


<startup><supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0">

推荐答案

试试这个



Try this

Data Source=IPAddress\\SQLEXPRESS; Network Library=DBMSSOCN; Initial Catalog=Databasename; User ID=userName; Password=password





之前启用sql server中的TCP / IP



before that enable TCP/IP in sql server


这篇关于如何为不同位置的多台PC上的项目运行配置app.config?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆