Url Behaviour – Asp.NET web service
Views (159)
When adding a webreference to a webservice in visual studio we can set the Url Behaviour property inside visual studio.
In visual studio 2003 by default it is set to static and in visual studio 2005 it is set default to dynamic.
Static means the url is set in the code within the generated proxy class Reference.cs.
Normally this file doesn’t show up in visual studio. Using Show All Files option in visual studio displays this file.
This is what would be there in generated proxy class for Url Behaviour Static
public CrmService() {
this.Url = “http://d-3324:5555/mscrmservices/2006/crmservice.asmx”;
And in case of Dynamic we will find a corresponding entry for the url in our application config file.
<applicationSettings>
<WindowsFormsApplication1.Properties.Settings>
<setting name=“WindowsFormsApplication1_CrmSdk_CrmService“ serializeAs=“String“>
<value>http://d-3324:5555/mscrmservices/2006/crmservice.asmx</value>
</setting>
</WindowsFormsApplication1.Properties.Settings>
</applicationSettings>
This was originally posted here.

Like
Report
*This post is locked for comments