简体   繁体   中英

How to Access the Service method when service is added using “Add Web Reference” in Visual Studio 2010?

I am trying to access the webservice methods hosted on my machine. I added the reference using "Add Web Refernce". When i try to create the object of the service but visual studio dont let me do so.....here`s the settings in he web.config

<applicationSettings>
    <Refernce.Properties.Settings>
        <setting name="Refernce_Hippa_HipaaService" serializeAs="String">
            <value>http://localhost/MDHipaaWS/HipaaService.asmx</value>
        </setting>
    </Refernce.Properties.Settings>
</applicationSettings>

i have imported the refernce in code behind but it still don`t let me create the object..

Right click References within your project structure. Click "Add Service Reference". In the address field input your url, and click "Go". Inspect services in the listbox, then click OK when finished.

VIsual studio will then create a set of classes which you can use to communicate with your web service.

I would recommend using Service reference. See link below.

Check out this answer .

您也可以使用SvcUtil.exe生成服务的代理类。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM