Purpose of ClientSettingsProvider.ServiceUri in app.config

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

What does


    

do?

Since the

相关标签:
3条回答
  • 2021-02-01 12:46

    Is the setting referenced anywhere in your code?

    If not, you can probably remove it. If it is, only you can determine what the impact of removing it may be.

    Please note that this could be used be a third party assembly and it may still look for it and throw an exception if it does not exist. This would be simple to spot (your application will fall over)

    0 讨论(0)
  • 2021-02-01 12:58

    it is used by ClientFormsAuthenticationMembershipProvider.

    You can remove it if you do not use that model but it should be there if you use it even if it is empty.

    Check my answer here - ASP.NET Membership Authentication through Service

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题