.Net Framework default generates friendly WSDL and we could put our custom WSDL if we like to. But how do we protect it from being displayed to public, should we decide to hold it private? A simple way is to set the Web.Config to remove documentation or another is to send the users to a friendly page.
One way is to add remove documentation protocol in the web.config.
<webServices>
<protocols>
<remove name="Documentation"></remove>
</protocols>
</webServices>
Another friendly way is to show a user-friendly page:
<webServices>
<wsdlHelpGenerator href="Sorry.aspx"></wsdlHelpGenerator>
</webServices>
Love coding!
UPDATE:
WCF Services simplifies these and takes it in a whole different direction. I will be posting some about WCF services later, but to the current topic on hiding WSDL in WCF srvices it's done by default. Take a look at serviceMetadata for more information.
No comments:
Post a Comment