简体   繁体   中英

Invoke ASMX Web Service without Visual Studio

There are two PCs: In PC1, I have created ASMX Web Service and Hosted in local IIS.

My URL is like

XXX.XXX.X.103:82/WebService.asmx

Now, there is no Visual Studio in PC2, I just installed Framework 4.5.

How do I invoke and test that ASMX Web Service using only Framework?

Because when I run that URL in browser, I got the list of Services but not able to test it. How to solve with using only ".NET Framework"?

Here is the screen shot:

在此处输入图片说明

I am not getting this "Test Method" in PC2 and "Invoke Button".

Ok, I got the answer:

Here is the code that I added in " Web.Config ".

<webServices>
    <protocols>
      <add name="HttpGet"/>
      <add name="HttpPost"/>
    </protocols>
 </webServices>

如果您要测试的Web服务方法的输入上有任何nullable参数,则不会显示“ Invoke按钮。

ASMX services are designed to run in IIS. When using Visual Studio, a light weight IIS ( Cassini ) is used.

You will need to install IIS onto PC2.

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