Redigera

Dela via


ClientSettingsProvider.ServiceUri Property

Definition

Gets or sets the Web settings service location.

public:
 static property System::String ^ ServiceUri { System::String ^ get(); void set(System::String ^ value); };
public static string ServiceUri { get; set; }
static member ServiceUri : string with get, set
Public Shared Property ServiceUri As String

Property Value

The URI of the Web settings service.

Examples

The following example code demonstrates how to use this property to programmatically set the Web settings service location.

private void SetWebSettingsServiceLocation()
{
    ClientSettingsProvider.ServiceUri = 
        "http://localhost:55555/AppServices/Profile_JSON_AppService.axd";
}
Private Sub SetWebSettingsServiceLocation()
    ClientSettingsProvider.ServiceUri = _
        "http://localhost:55555/AppServices/Profile_JSON_AppService.axd"
End Sub

Remarks

You can set the ServiceUri property in your application code, but you will typically set the value in your application configuration file. This enables you to change the service location without recompiling your code.

When you set the service location programmatically, you must specify the complete service URI, which will always end with "Profile_JSON_AppService.axd".

Note

This class contains a link demand at the class level that applies to all members. A SecurityException is thrown when the immediate caller does not have full-trust permission. For details about security demands, see Link Demands.

Applies to

See also