开发者

Edit connectionstring of Web.config in webservice (ASPNET)

开发者 https://www.devze.com 2022-12-10 09:49 出处:网络
I\'m using webservice for my Desktop application(C#). I want to edit my database connectionstring programmatically in web.config(in web service) through C#. How to do this? Any s开发者_开发问答imple i

I'm using webservice for my Desktop application(C#). I want to edit my database connectionstring programmatically in web.config(in web service) through C#. How to do this? Any s开发者_开发问答imple idea?


ConfigurationManager.ConnectionStrings["connName"].ConnectionString = "new connectionstring";


Take a look at WebConfigurationManager.

0

精彩评论

暂无评论...
验证码 换一张
取 消