Partager via


VCFilter.UrlBehavior Property

Definition

Gets a value indicating whether the URL of a Web reference is hard-coded in the generated Visual Basic or Visual C# proxy code. This property is meaningful only for filters that have Web references.

public:
 property Microsoft::VisualStudio::VCProjectEngine::eWebRefUrlBehavior UrlBehavior { Microsoft::VisualStudio::VCProjectEngine::eWebRefUrlBehavior get(); };
public:
 property Microsoft::VisualStudio::VCProjectEngine::eWebRefUrlBehavior UrlBehavior { Microsoft::VisualStudio::VCProjectEngine::eWebRefUrlBehavior get(); };
[System.Runtime.InteropServices.DispId(2367)]
public Microsoft.VisualStudio.VCProjectEngine.eWebRefUrlBehavior UrlBehavior { [System.Runtime.InteropServices.DispId(2367)] get; }
[<System.Runtime.InteropServices.DispId(2367)>]
[<get: System.Runtime.InteropServices.DispId(2367)>]
member this.UrlBehavior : Microsoft.VisualStudio.VCProjectEngine.eWebRefUrlBehavior
Public ReadOnly Property UrlBehavior As eWebRefUrlBehavior

Property Value

An eWebRefUrlBehavior enumeration value.

Attributes

Remarks

The proxy code is the .vb or .cs file which is generated from the .wsdl file and is used to make the SOAP call to the Web service at run time. If the value of UrlBehavior is webrefUrlBehaviorDynamic, the URL value is stored with the project's dynamic properties. The project system adds a key to the App.config file (for Windows applications) or Web.config file (for Web applications).

An example of the key/value pair from an App.config file is shown below:

<configuration>

<appSettings><add key="SomeProject.localhost.Service1"

value="http://localhost/SomeWebService/Service1.asmx"/>

</appSettings>

</configuration>

By using a dynamic URL, you can specify different Web service locations for different project configurations. A common scenario is to use a local service for a debug configuration and a nonlocal service for a release configuration.

Applies to