Groups | Blog | Home
all groups > dotnet web services > june 2007 >

dotnet web services : deployment of a dll consuming a webservice


Andreas Cieslik
6/21/2007 12:00:00 AM
Hello,
What is the best and professional way to deploy a DLL that consumes the
customers webservice url instead of my coded webservice url of my local test
system? Is there a way to keep it dynamic?
Using the registry would be a first step....


..NET creates the following file Settings.Designer.cs automatically and
includes information to the used webservices :
namespace DocLibHandler.Properties {



[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator",
"8.0.0.0")]

internal sealed partial class Settings :
global::System.Configuration.ApplicationSettingsBase {


private static Settings defaultInstance =
((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new
Settings())));


public static Settings Default {

get {

return defaultInstance;

}

}


[global::System.Configuration.ApplicationScopedSettingAttribute()]

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]

[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]

[global::System.Configuration.DefaultSettingValueAttribute("http://localhost:5555/MSCRMServices/2006/CrmService.asmx")]

public string DocLibHandler_crmservice_CrmService {

get {

return ((string)(this["DocLibHandler_crmservice_CrmService"]));

}

}


[global::System.Configuration.ApplicationScopedSettingAttribute()]

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]

[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]

[global::System.Configuration.DefaultSettingValueAttribute("http://itxg-crm:44444/_vti_bin/Lists.asmx")]

public string DocLibHandler_lists_Lists {

get {

return ((string)(this["DocLibHandler_lists_Lists"]));

}

}

}

}

now the question is it possible to access registry entries from here?

Spam Catcher
6/26/2007 10:31:54 AM
"Andreas Cieslik" <a.cieslik@runtime.de> wrote in
news:uPEw3t9sHHA.4132@TK2MSFTNGP02.phx.gbl:

[quoted text, click to view]

In VS.NET set your web service to a Dynamic URL (Web References -->
Properties).

2003 - URL will be in app/web.config appsettings
2005 - URL will be in app/web.config applicationsettings section

[quoted text, click to view]

If you modify the proxy class - it'll get overriden each time you refresh
the web service definition. You're better off manually changing the URL in
AddThis Social Bookmark Button