Hello everyone,
New to Web Services. After some experiment, some basic questions.
1. What is the function of a code hehind file? Any benefits of have a separate asmx and asmx.cs file?
2. When we press F5 to debug, I it is not running on IIS. If IIS is not hosting the web services, which party hosts the web services when we use F5 to debug?
3. I am always confused what is the function and why we need [WebService]? I think [WebMethod] is enough since we expose web service through a public function, not through a class (marked with WebService attribute).
thanks in advance,
George

Ryan AlfordRank #1,411 · 1.2K reputationPosted Jul 13, 2008, 2:00 PM EDT
2. you can't DEBUG web services. you will need code to do the debugging by writing to a file or something. you can't "watch" it.
3. just because you "think" that's all that's needed doesn't mean it's the case. I don't think that we need $4/ gallon gas but that doesn't mean a thing.
George GeorgeRank #1,736 · 870 reputationPosted Jul 13, 2008, 9:58 PM EDT
Thanks Ryan!
What is the benefit of having two files -- asmx and asmx.cs?
regards,
George
Ryan AlfordRank #1,411 · 1.2K reputationPosted Jul 14, 2008, 3:40 AM EDT
Quit thinking that Web Services are completely different from Windows Forms, Console, and Window Service programming. They all use the same concepts.
George GeorgeRank #1,736 · 870 reputationPosted Jul 14, 2008, 6:21 PM EDT
Hi Ryan,
Sorry that I do not agree with you. For asmx, how do you make controls (e.g. Web Controls) into it? All UI components (e.g. Web Controls) are in asmx.cs file. Any comments?
regards,
George