Purpose of ClientSettingsProvider.ServiceUri in app.config

前端 未结 3 1183
你的背包
你的背包 2021-02-01 12:07

What does


    

do?

Since the

3条回答
  •  清歌不尽
    2021-02-01 12:59

    This has to do with ASP/Ajax Client Application Services (http://msdn.microsoft.com/en-us/library/bb384297(v=vs.100).aspx)

    I too encountered this code in my app.config file and was confused since I've developed our entire application from scratch, and didn't add this.

    What I discovered was that this line (and others under the tags) are added automatically to a project's app.config file when the "Enable client application services" checkbox is checked. It turned out mine was, though I still have no idea why or how this happened.

    To see if this option is selected in your project(s), right click on a project and select "Properties". Navigate to the "Services" tab and see if the checkbox is checked. If it is, uncheck it, and the XML you're seeing should disappear from your app.config file.

    IMPORTANT! - It seems there is a bug in VS2010 (and possibly other versions for all I know) where if you navigate to the "Services" tab, it will automatically check this box for you, adding the errant XML to your app.config file. So once you unckeck the box and save your project, navigate to a different tab in the properties section before closing it. You will also get an unnecessary reference to "System.Web.Extensions" added to your project. If you aren't using this for something else, you can remove it.

提交回复
热议问题