Solved

Problem Building the Proxy

Posted on 2008-09-30
5
1,296 Views
Last Modified: 2013-12-17
Experts,

I'm working on an example program involving Windows Services using the WCF.  It's time to generate the proxy code, but I'm having issues.

First, I can't find svcutil.exe anywhere.  That being the case, I tried to generate the proxy code using Visual Studio 2008.  After I put in the local path (I'm running all of this on my local machine), I get too many errors to go into.  Does anyone have some clue as to what might be missing?
0
Comment
Question by:NigelRocks
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:alaran
ID: 22607006
svcutil.exe is in the Windows SDK, as described here: http://msdn.microsoft.com/en-us/library/aa347733.aspx

Personally I much prefer using VS to generate the proxies, so what kind of errors are you getting?
Are you adding the services as a "Service Reference" or as a "Web Reference"?
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 22607771
I'm still not seeing where to download svcutil.exe.  Does it run from a regular DOS prompt?

Here's whats in the "details" of the error message:

There was an error downloading 'http://localhost:8080/MagicEightBallService'.
The request failed with the error message:
--
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault></s:Body></s:Envelope>
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:8080/MagicEightBallService'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:8080/MagicEightBallService.  The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
0
 
LVL 4

Expert Comment

by:alaran
ID: 22613104
Google it, and you will find... here are some links: http://en.wikipedia.org/wiki/Microsoft_Windows_SDK#Obtaining_the_SDK

svcutil.exe is a command prompt utility, yes.
It is part of the Windows SDK, and is not a separate download.

As for the errors:
At what point do these erors occurr? Is it during proxy generation after you do an "Add service reference" in visual studion?
Or is it after that, and you try to execute som code calling the generated proxy?
0
 
LVL 1

Author Comment

by:NigelRocks
ID: 22624561
The error occurs when I put in the host address in the "Add Service Reference" window and hit "Go".
0
 
LVL 4

Accepted Solution

by:
alaran earned 500 total points
ID: 22631868
Running on IIS the URL should be to a .svc file (http://localhost:8080/MagicEightBallService.svc).
Put the URL you put in in a browser and see what happens.

For Add Service reference to work your service must publish metadata (WSDL), it seems as it might be interpreting the request from the add service reference dialog as an action. On IIS you should get the WSDL form http://localhost:8080/MagicEightBallService.svc?wsdl.

There must be a metadata endpoint in your service so the proxy buildet in VS has a description of the service from which to build the proxy.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now