swaggerwcf
swaggerwcf copied to clipboard
Unclear instuction WebServiceHost / Self Host
Not an issue but a clarification.
How do you implement self-hosted exactly?
Add an endpoint to your App.config
file.
is this in a new file called App.config
? I notice that fresh WCF project doesn't have App.config
<services>
<service name="SwaggerWcf.SwaggerWcfEndpoint">
<endpoint address="http://localhost/docs" binding="webHttpBinding" contract="SwaggerWcf.ISwaggerWcfEndpoint" />
</service>
</services>
And create a WebServiceHost
Create a WebServiceHost
var swaggerHost = new WebServiceHost(typeof(SwaggerWcfEndpoint));
swaggerHost.Open();
where do you put this line above?
there is a sample project ./src/SwaggerWcf.Test.Service
there is a sample project ./src/SwaggerWcf.Test.Service
Thank you Justin. I already checked and tried the sample project before posting this. but I don't think Self Hosted
was implemented on it.
Also in the test project. The core wcf gives error something like.
does not have a Binding with the None MessageVersion. 'System.ServiceModel.Description.WebHttpBehavior' is only intended for use with WebHttpBinding or similar bindings.
I'm not sure if that's a normal behavior.
The api-docs
works as expected in swagger though.
I submitted a sample project, I hope this will help you. https://github.com/justin0522/swaggerwcf_issues_201