Jamie Taylor
Jamie Taylor

Reputation: 3530

connect to a WCF web service using asp.net

I'm new to WCF web services never done anything with them before and I'm being asked to create a page to connect to a WCF web service

I have no idea where to start and I've searched the internet with no success.

Does anybody have an example of an asp.net page connecting to a WCF web service?

I've set up the WCF web service on my server but do not have a clue on how to actually connect or query it to get my XML data back.

The WCF web service is set up as it's own URL and only has 2 files within the root one being the web.config.

I somehow need to query this URL and get some XML data back from it.

Any ideas?

Upvotes: 1

Views: 4770

Answers (2)

Johann Blais
Johann Blais

Reputation: 9469

You need to create a service reference from your asp.net project to your WCF project. Right-click on the ASP.NET and click on "add service reference", set the URL of the service and VS will generate a proxy class for you.

Asking your favorite search engine for "asp.net add service reference" should give you a good selection of starting points.

Upvotes: 2

Josh
Josh

Reputation: 2975

Look into WCF connections and web.config. This link should provide you some direction: http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic5

Upvotes: 0

Related Questions