Fox,
The only way a user can add a web reference to your WSDL is if they have a
WSDL document. The "Add Web Reference" dialog is essentially a wrapper to
the wsdl.exe tool. If you disable .NET from automatically generating a WSDL
for your web service and do not publish a WSDL, then the typical user will
not be able to create a client proxy to your web service. However, since
anyone can still call your web service if they know it's location, you
should still secure your web service with some kind of username and password
mechanism.
Disable WSDL generation by adding this to your web.config in <system.web>
<webServices>
<protocols>
<!-- This will disable the automatically generated WSDL and test page for
ASMX files. -->
<!--<remove name="Documentation"/>-->
</protocols>
</webServices>
Eric
"The Fox" <be******@hotmail.com> wrote in message
news:uM*************@tk2msftngp13.phx.gbl...
How to prevent user to add web reference to my web services?
Can I add password to web services so that only the users
who know the password can add a web reference?
Thanks in advance.