Purpose of ClientSettingsProvider.ServiceUri in app.config

Solution 1:

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.

Solution 2:

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