How to disable/modify the default test pages for asmx web services?

M

Maxwell2006

Hi,



When I run a web service project, ASP.NET shows me a default web method
invoke page.



How can I disable/modify the default test (or method invoke) page of the
ASP.NET web services?



Thank you,

Max
 
S

Steven Cheng[MSFT]

Hi Max,

Welcome to the MSDN newsgroup.

As for the ASP.NET webservice's default test/invoke page, it is used for us
to call the webservice through http get/post method which is very simple.
If you do not want to expose these interfaces, you can use the following
configuration element to disable them(assume that you're using asp.net 2.0):

=========================
<webServices>
<protocols >
<remove name="HttpGet"/>
<remove name="HttpPost"/>
<remove name="HttpPostLocalhost"/>

</protocols>
=====================

Also, we can also replace the default webservice description helper page
with ourown page through the below element:

#<wsdlHelpGenerator> Element
http://msdn2.microsoft.com/en-us/library/ycx1yf7k(VS.80).aspx

In addition ,here is a msdn article describe the common configuration
options for ASP.NET webservice:

#Configuration Options for XML Web Services Created Using ASP.NET
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconConfigurationOptionsForASPNETWebServices.asp

Hope this helps.


Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

You're welcome Max,

Have a nice day!

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top