c# - How does a web reference know what address to use? -
i have make call web service inside new c# class library project. web service not accessible me yet (different geographic location , closed network until release). have wsdl , have added web reference in new class library project wsdl.
my problem here not see can configure service address wsdl based on. it's fine developing against wsdl stub now, when release other development centre, need able set correct address service service call works.
is there common practice here? i.e. config file entry can add or something?
if added web reference using vs, automatically creating corresponding setting in .config file.
you can view / modify in settings.settings.
n.b. default vs sets setting generate default value (which based on original value use add reference, believe , gets buried somewhere in generated code file). can disable viewing project's properties --> settings, highlighting wsdl setting , in properties tab (docked window) set generatedefaultvalueincode = false.
once deployed, wsdl location can updated modifying relevant .config file value.
edit: web reference url behaviour property should set dynamic.
Comments
Post a Comment