How to add a “service reference” in a asp.net website?

本秂侑毒 提交于 2019-12-24 09:29:23

问题


I just found out that I get the "Add Service Reference" context menu option in a class library project but not in a "Web Site" project.

Now I am too far in this project and i need to use the Paypal Express Checkout option in my website. But when i add a web reference to the API, i do not get a reference.cs class. Is there another option to integrate the API. If yes, a code sample would be great help.


回答1:


The following links could be useful: http://www.asp.net/web-forms/tutorials/aspnet-45/getting-started-with-aspnet-45-web-forms/checkout-and-payment-with-paypal

The example uses HttpWebRequest to communicate with PayPal. Hope this helps.




回答2:


as Henk Holterman suggested in the comments above,The option to add a Service Reference is available in .Net Framewrok 3.5 and above.

I upgraded my site to framework 3.5 and it worked out the way i wanted it.



来源:https://stackoverflow.com/questions/19114444/how-to-add-a-service-reference-in-a-asp-net-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!