更改不同开发箱上的连接字符串 [英] Change connection string on different dev boxes

查看:71
本文介绍了更改不同开发箱上的连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在家用PC上构建了Lightswitch应用程序,然后将代码推送到bitbucket,然后将代码下载到我的工作机上,以给我的同事进行演示.但是数据库仍然在app \ ServerGenerated \ Web.config文件中映射到我的家用计算机, 据我所知,VS2010 Ultimate中无法更改此连接字符串.我必须手动跟踪文件并更改字符串.我现在担心如果将其重新签到BitBucket中,我将再次解决此问题 将来.

I built a Lightswitch app on my home pc, then pushed the code up to bitbucket, then downloaded the code to my work machine to give my coworkers a demo.  But the database remained mapped to my home machine in the app\ServerGenerated\Web.config file, and as far as I can tell, there is no way in VS2010 Ultimate to change this connection string. I had to track down the file manually and change the string.  I'm now worried that if I check this back in to BitBucket, I will be fighting this problem again in the future.

在LightSwitch中管理连接字符串的最佳方法是什么,以便多个人可以在应用程序上进行工作而又不会不断吵架?

What's the best way to manage the connection strings in LightSwitch so multiple people can work on the app without fighting each other constantly?

谢谢

 

推荐答案

连接字符串在Web中.配置.

The connection string is in web.config.

在为用户部署应用程序之前,您必须先更改web.config.

You will have to change the web.config prior to deploying the app for your users.

我假设您正在使用2层桌面部署,是吗?

I am assuming you are using the 2-Tier desktop deployment, yes?

如果使用3层部署,则可以在部署后在服务器上更改web.config.

If you use the 3-Tier deployment, you can change the web.config on the server after deployment. 


这篇关于更改不同开发箱上的连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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