Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: .NET
Expertise: Beginner
Feb 10, 2004



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Preserve the Sequence of Web Methods

The .NET Framework generates a service help page when accessing the asmx page for a Web service. This page lists the Web methods exposed by the Web service, but doesn't list these methods in the order they appear in the source code. This tip describes a minor modification which keeps Web methods in source code sequence.

The service help page is generated by DefaultWsdlHelpGenerator.aspx in

DefaultWsdlHelpGenerator.aspx uses a Hashtable to store the Web methods. Replace the Hashtable with a ListDictionary (in the System.Collections.Specialized namespace) as follows:
  1. Open DefaultWsdlHelpGenerator.aspx
  2. Search for 'Hashtable methodsTable' in the line which reads
    'Hashtable methodsTable = new Hashtable();'
  3. Change both occurrences of 'Hashtable' to:
  4. 'System.Collections.Specialized.ListDictionary' so that the line reads 'System.Collections.Specialized.ListDictionary methodsTable = new System.Collections.Specialized.ListDictionary();'
  5. Save the file.
Every service help page will now list Web methods in source code sequence.

Uwe Schmitz
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date