4

What is the request life cycle for asynchronous (ajax) ASP.NET Page Method calls?

I created this question because I couldn't find any canonical resources about what actually happens during a call to an ASP.NET page method, which is a method that is decorated with a [WebMethod] attribute.

It seems that in general, the MSDN documentation that comes up when searching for WebMethodAttribute contains information about how to use it on an XML Web Service (a deprecated technology), as can be seen in the documentation for the WebMethodAttribute and How to: Use the WebMethod Attribute.

Unsurprisingly, I was advised in the comments that XML Web Services are deprecated. However, I was suspicious, and after a back-and-forth which eventually ended up with me going to the .NET Framework source code for reference, I discovered that the way that the WebMethodAttribute is handled by ASP.NET AJAX is RESTful HTTP, and not tied to XML Web Services at all.

I was hesitant to create a long discussion in the comments, but I was also concerned about the consequences of leaving a possibly inaccurate suggestion there without addressing it publicly.

How should this whole exchange be viewed and what should be done now? Should I just leave it the way it is, or should the information be condensed and fleshed out into an edit in the question? At this point, I'm not sure if it would be right to answer the question because I don't have enough information to provide anything but a partial answer to the question.

7
  • 1
    "Explain the entire page life cycle" seems like way Too Broad of a question to me. Specific questions about specific aspects of the page life cycle could be sufficiently narrow.
    – Servy
    Feb 6, 2015 at 17:12
  • One, it's not a question of the known page life cycle. It's a life cycle of unknown complexity. Two, I considered narrowing the scope of the question to my use case, but my use case requires a knowledge of what framework hooks are available to use, so I concluded narrowing would only accomplish excluding users qualified to answer the question. Feb 6, 2015 at 17:21
  • 1
    The design of the site is to limit the scope of answerers to people actually qualified to answer the question. That's a good thing, not a bad thing.
    – Servy
    Feb 6, 2015 at 17:26
  • I meant that the scope of answerers as the question stands properly includes everyone qualified, and limiting the question to a Castle Windsor use case unnecessarily limits the audience to only those answerers who consider themselves qualified to answer questions concerning Castle Windsor. Feb 6, 2015 at 17:32
  • Right, but wouldn't it also open up the number of possible answers to a much larger number?
    – Kevin B
    Feb 6, 2015 at 17:32
  • 1
    @moarboilerplate A question asking to explain everything about a subject is going to have less people qualified to answer it than a question asking for a specific thing about a certain subject. If there is any certain thing that you couldn't answer about a subject, then obviously you couldn't post an answer to explain everything about that subject.
    – Servy
    Feb 6, 2015 at 17:34
  • @KevinB Yes, but I find that is largely mitigated by the rather esoteric nature of the technology. Servy In theory, yes, for this question, I'm not so sure. I am looking for an event timeline and available context objects so that I can design an object lifetime scope for DI resolution. An answer that only partially explains what's available risks not being a quality enough answer for my problem. In this specific case, I believe there's less risk in the more general question. Feb 6, 2015 at 17:46

1 Answer 1

3

Open up a word doc and paste your partial answer there. When you finish the rest of it, post it as answer.

Leave the discussion in comments as is, at least until a full answer is created. If you instead posted a partial answer, you risk receiving downvotes due to it not fully answering the question. If you post that information in your question, you risk the question becoming too wordy to the point no one wants to read it, or it gets too broad, etc. Only add it to the question if it improves the question.

There's nothing wrong with having a discussion in comments, as long as it's done with the understanding that at any time, that comment discussion can be deleted. It's usually better though to move that discussion to chat if you have enough rep to do so (100).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .