How to change the connection settings of the lightwitch application in debug mode

please how to change the connection string of the lightwitch application for debugging purposes. I followed this post http://dougseven.com/2010/08/23/data-storage-in-visual-studio-lightswitch-2/

but I can make it work. anytime I change web.config in applicationroot / bin / debug, when I run the application in debug mode, the file is restored with the original value in the file.

I have no problem changing it when publishing the application.

and when I implement a change in the applicationdefinition.lsml file, it has no effect

+4
source share
2 answers

From the Andy Kung fanatic team :

If you are connecting to an external data source, you can right-click on this node object in Solution Explorer and select "Update Data Source" to change server information without re-creating your screens.

EDITED

... but it is not.

Instead of applicationroot/bin/debug/web.config should change applicationroot/ServerGenerated/Web.config .

Explanation:

If you go to the file view, in Data / ApplicationDefinition.lslm they are a link to your connection string:

Then in project\ServerGenerated\Web.config find the connection string:

 <connectionStrings> <add name="_IntrinsicData" ... /> <add name="e8f0cfed-653d-42fc-9617-bcaee11eed91" connectionString="HERE!!!!!! 
+2
source

A little late, but just in case ... If you right-click on the data source, select "Update Data Source", then WAIT to connect to the failure (if the source server is unavailable), click "Back" to go to the connection settings . Just update your connection settings and continue to work as usual.

0
source

Source: https://habr.com/ru/post/1445131/


All Articles