Adding a Web reference results in the following code in the App.cofig file for the corresponding project:
<sectiongroup name= "ApplicationSettings" type= "System.Configuration.ApplicationSettingsGroup, System, version= 4.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 ">
<section name= "BS. Eap. BizMgt.Properties.Settings "Type=" System.Configuration.ClientSettingsSection, System, version=4.0.0.0, culture= Neutral, publickeytoken=b77a5c561934e089 "requirepermission=" false "/>
</sectionGroup>
..................
<BS.EAP.BizMgt.Properties.Settings>
<setting name= "Bs_eap_bizmgt_ipersoncard_petrochina" serializeas= "String" >
<value>http://10.27.213.172:8080/PetroChinaService/PetroChina</value>
</setting>
<setting name= "Bs_eap_bizmgt_getvisitservice_reportsso" serializeas= "String" >
<value>http://10.88.248.111:/dm/cxf-services/reportsso</value>
</setting>
</BS.EAP.BizMgt.Properties.Settings>
</applicationSettings>
</configuration>
The Red Word section is the referenced Web service address:Http://10.88.248.111/dm/cxf-services/ReportSSO
To manually increase the port 88 problem resolution
The following applies from: http://www.cnblogs.com/BruceLee521/archive/2012/03/28/2420776.html
Webservice through the map port to the external network, call the error resolution
Environment:
WebService deployment to intranet machine, address: http://aaa.bbb.ccc.ddd/xkzjk/LicensesService.asmx
Mapping to an extranet address via port: http://eee.fff.ggg.hhh:88/xkzjk/LicensesService.asmx
The first question a colleague encounters:
The following error is quoted in Visual Studio WebService:
The following error is reported in Visual Studio 2008:
Unable to download following files from.
http://eee.fff.ggg.hhh:88/xkzjk/LicensesService.asmx?wsdl
Do you want to skip these files and continue?
The following error is reported in Visual Studio 2010:
An error (Details) occurred and attempting to find services at ' Http://eee.fff.ggg.hhh:88/xkzjk/LicensesService.asmx '
The metadata contains a reference that cannot be resolved: "HTTP://EEE.FFF.GGG.HHH:88/XKZJK/LICENSESSERVICE.ASMX?WSDL".
An error occurred while downloading "http://eee.fff.ggg.hhh:88/xkzjk/LicensesService.asmx?wsdl".
Request failed due to HTTP status 503: Service temporarily unavailable.
The metadata contains a reference that cannot be resolved: "HTTP://EEE.FFF.GGG.HHH:88/XKZJK/LICENSESSERVICE.ASMX?WSDL".
The metadata contains a reference that cannot be resolved: "HTTP://EEE.FFF.GGG.HHH:88/XKZJK/LICENSESSERVICE.ASMX?WSDL".
If the service is defined in the solution, try building the solution and adding the service reference again.
Reason:
Developers do not understand the WebService, WSDL do not know what to do, the reference address is less? WSDL, the first problem is solved.
The second question a colleague encounters:
Call the specific WebService method to always report the following error
Request failed due to HTTP status 503: Service temporarily unavailable.
Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code.
exception Details: System.Net.WebException: Request failed due to HTTP status 503: Service temporarily unavailable.
Analysis:
Specifically to look at the abnormal internal information:
Responseuri={http://eee.fff.ggg.hhh/xkzjk/licensesservice.asmx}, began not to look carefully, and later looked for a long time, found that less than the external network map port 88.
Reason:
When referencing WebService in Visual Studio 2008, the following sections are automatically added in Web. config
<applicationSettings>
<Test.Web.Properties.Settings>
<setting name= "Test_web_licservice_licensesservice" serializeas= "String" >
<value>http://eee.fff.ggg.hhh/xkzjk/LicensesService.asmx</value>
</setting>
</Test.Web.Properties.Settings>
</applicationSettings>
The app's settings are added to the project's Settings.settings file, and the proxy class uses the variables for that setting.
When referencing WebService in Visual Studio 2010, the following sections are automatically added in Web. config
Endpoint address= "Http://eee.fff.ggg.hhh/xkzjk/LicensesService.asmx"
binding= "BasicHttpBinding" bindingconfiguration= "Licensesservicesoap"
contract= "Servicereference1.licensesservicesoap" name= "Licensesservicesoap"/>
Defines some basic information about the webservice.
Please note that Visual Studio has removed the port. Manually add the top 88 port problem resolution in Web. config.
Summary: The first question is because the principle of webservice is not clear. The second principle of referencing WebService in Visual Studio is unclear and only works, and now many people do not understand the basic theoretical knowledge of webservice, that is, to come up with Visual Studio reference, and then invoke.