15,901,035 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Wes Payne (Top 2 by date)
Wes Payne
1-Nov-13 20:01pm
View
It looks like someone else managed a more complete copy from the same source. Thanks, though!
Wes Payne
1-Nov-13 20:00pm
View
Thank you for responding! If there was a file attachment, I could not find it.
With only the sample configuration to go with, I am not sure that I understand the answer. I think I have a potential interpretation that is close. Please help me clarify.
1. As with my code, you add a service node to the configuration that may or may not have the same name as the class that implements the service contract, and references a ServiceBehavior (MyServiceBehavior).
2. You add that ServiceBehavior to the configuration (behaviors->servicebehaviors->behavior). I assume this is where I would set all of the service-specific behaviors I would want, as I did in my example with "secureBehavior".
3. Within the service you define a single endpoint, which I imagine covers all requests for that service. This endpoint is bound to "webHttpBinding" type, but no specific binding of that type. The endpoint has no name and an empty address, but references a behavior.
4. You add that EndpointBehavior to the configuration (behaviors->endpointbehaviors->behavior). It has a single, empty webHttp node but no other defined nodes or attributes besides the behavior name (MyWeb).
So it looks like we're adding a single endpoint for the entire REST-ful, routed service, just to have the endpoint so that we can add the webHttpBinding to it. And there is no need to set up a full binding configuration.
I assume that, once this is all done, I won't have HTTP 404 occur with every request if the service should have the same name as the class which implements its service contract.
Also, it looks like somebody else tried to copy from the same place you did. If this is copied from elsewhere, could I have a link to the full document in order to establish more context?