I am trying to eliminate the capability of displaying the details of a web
service by disabling WSDL generation in the web.config file. I have made the
following changes to the web.config:
<webServices>
<wsdlHelpGenerator href="helpPage.aspx"/>
<protocols>
<remove name="Documentation" />
</protocols>
</webServices>
My goal is to have simple text displayed when the user goes to the web page
i.e. enters https:/MyWebPage/WebPage.asmx. I want to disable the ability to
display the web details i.e. the user enters
https:/MyWebPage/WebPage.asmx?wsdl as this displays all the details of my web
service; which I want to hide.
Everything works fine if I do not have the statement
<remove name="Documentation" />
in the web.config file. However, when I add that line in an attempt to hide
the information displayed when the user adds the ?WSDL; I get the runtime
error below. How do I remove the ability to display the WSDL information
while still allowing my web site to display a help page? Why am I getting an
error?
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrorstag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrorstag should then have its "mode" attribute
set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</
--
Thank you.