Order of webmethods
Hi,
I've whole bunch of web methods in my web service and they are all appearing in random order instead of the order specified in the cs file. Can somebody tell me if there is any attribute or setting that will let us specify the order, please? Thanks for your time!
Regards,
Swamy
Hi
Swamy Kanakala,
OK, here is my finding. In VS2003, the order remains the same as the .CS file.
In VS2005, this has been changed the WebServices are listed in alphabetical order.
So, its not really random but alphabetical order and I dont see anyway to change this behavior.
Regards,
Vikram
Hi,
Yes, I tried with the method names which you have provided. Like I already mentioned, it got listed in alphabetical order which is different from the .CS source code listing.
Regards,
Vikram
No, its not the case. I'm using .NET 1.1 and if we crosss certain limit (around 10), the order is getting random. The methods are appearing neither in alphabetical order nor in the order specified in source file. You must be using WSE? Please let me know. Thanks!
Regards,
Swamy
Hi,
Your observation is correct. It is not even 10, its just pure random in case of .NET 1.1. In v2.0, its listed alphabetically. You can get it to list alphabetically in .NET v1.1. Follow the steps below:
1. Locate and open the following file:
\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\DefaultWsdlHelpGenerator.aspx
2. Search for the following line in the aspx page:
Hashtable methodsTable = new Hashtable();
3. Comment out that line and replace it with the following:
//Hashtable methodsTable = new Hashtable();
SortedList methodsTable = new SortedList();
4. Save the file.
Now the order of the webmethods would appear in alpgabetical order.
Regards,
Vikram
Yeah, I've just found it on web. Thanks anyway for your help!
http://www.dotnet247.com/247reference/a.aspx?u=http://www.dotnet247.com/247reference/msgs/12/62668.aspx
http://dotnetjunkies.com/WebLog/razor/archive/2004/03/28/10229.aspx