How to add a Web service reference in a C # class library

Source: Internet
Author: User

This article is not a profound article, but only a small part of VS2008 application, but a small part of you will not necessarily, or you try:

I for the distributed development application is not much, this time there is a project to apply the Web service, my development environment is vs2008, the reason why do not choose the current hot WCF, I have the following reasons:

1: The team responsible for the development of Web service for VS2008 application is not much, not to expect coveted WCF.

2: The project development time is limited, you are not allowed to take the project to do experiments.

3: The project changes little, the Web service is enough to deal with demand.

Since our project is directly upgraded from 1.1 to 3.5, upgrade, the Web project directly into the class library, so no matter how much changes in the environment, as long as the compatibility of low-level version, all the original files are available, for example, 1.1 to create a Web page, there will be a RESX resource file, But the page created in 3.5 is Designer.cs, if you upgrade later, as long as the relevant new file types created, and then added to the class library, so you can enjoy the advanced version of the function, said the more ambiguous, do not know whether you understand.

Now to do is to reference the Web service in such a class library, intuitively think, just add a reference does not it? Is that really the case?

Let's say how to refer to a Web application project:

First: Right-click on the Web project, as shown in Figure I.

Second: Click Add Web Reference, figure two below.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.