简体   繁体   中英

How to call a web service from the other project or solution in ASP.Net C#

I want to call a web service using the JQuery-Ajax. I know in your local folder, you can do that, how about if I transfer my web service to other project. What is the code?

I tried to change the URL but it gives me a request method: OPTION.

You have search How to Consume Webservice to other project. For Example if you are running your webservice in your system, it will give you URL like this

http://localhost:54808/WebSite4/Service.asmx

http://127.0.0.1/WebSite4/Service.asmx

If you want to consume your webservice to other project you have to host your webservice or you need to have webserver to do this.

to consume your webservice you have to use Your system Network IP address

Example:

http://192.2.0.1/WebSite4/Service.asmx

by using this URL ,you can consume it in any other project according to you convenient.

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