Recently I needed to add a reference to a classic (.Net 2.0) web service inside a new project that was being created via Visual Studio 2008.
Now, I have not done a lot of work with WebServices in the past 6-9 months, but thought it would be cake. Please keep in mind, the service I wanted to connect to was NOT a WCF Service, it was a standard ASMX service.
Below is what I thought would work, but did not
- Attempt to Add A Service Reference
- Choose Services in Solution (my Project is in the same solution file).
- View the generated service implementation.
- WCF Style code implementation
What you will notice from step 4 is that the way you go about implementing this service is in the WCF style. This is not what I was looking for. I was wanting to reference this like all the other code in our projects.
Below is what DID work
- Attempt to Add A Service Reference
- Need to click the Advanced button
- Need to add the service as a Web Reference
- Finally need to search for and find your web service

- Lastly, if you have done everything correctly, you should see the following.
Now I know that the preferred service type is now WCF, but come-on not everyone is using WCF just yet. Adding a traditional web service reference is way too much friction. Why is not possible to add a reference from the solution explorer? Really can anyone answer me that.
Till next time,
[----- Remember to check out DimeCasts.Net -----]
Posted
07-21-2008 12:55 PM
by
Derik Whittaker