No matter what I try and do when it comes to WCF Routing I constantly get this error (via WCF Test Client). I cannot then see any Methods within my service(s)?
At first I just assumed it was my code, so I've downloaded almost all examples I could find of WCF + Routing and just ran those as-is. Same error happens!
I've checked the Event Viewer Logs etc to see if there is an error sneaking into there? nothing. I've tried Googling and Searching here for others (as surely i'm not alone) nothing.
Note:
- I am using IIS7 with AppFabric Installed.
- I am using .NET 4.0
- I am using WCF Service Application Template (default in VS2010)
- I am 开发者_如何学JAVAlosing my mind over this one :)
This one has me absolutely lost as to what is going on?
Here's what the WCF Test Client brings back -
The WCF 4 routing service will not expose the metadata of your "actual" service unless you expose it via a filtered endpoint or on a separate URL. The wcf test client isn't smart enough to figure that out at any rate.
What I would suggest, if you want to test your routing functionality is use something like soapui. You can then use it to modify the service address to which you send your request to.
If you want to expose your service metadata via the router this article should help.
http://www.devproconnections.com/article/net-framework-402/Routing-Service-Metadata/
HTH
When I got this error it was because I did the contract-first approach and made my own WSDL and then used it to create the interface for the service.
WCF Test Client will dynamically create the WSDL and then the contract name it dynamically assigns did not match the one I manually setup.
Once I changed my web.config to have the externalMetadataLocation
attribute filled in the serviceMetadata
element and pointed it to my static WSDL everything was fine.
精彩评论