views:

743

answers:

8

I am new to C# and .Net and am coming from a Java background. I am trying to get my head around the .NET way of doing web applications and am not having much luck.

I want to build an application to handle requests urls and write responses that return images. Having only used Java servlets in the web application field I am after some good resources and/or explanations on handling the request side of the application.

How are requests handled? and with what Objects? What is the cycle? how do pages function around this?

These are basic broad questions so if anyone knows of resources that covers them all thoroughly please let me know. What I have found so far has bits of information not the overall picture.

A: 

This is a good place to start for a description of the page lifecycle.

For your other questions, I'd actually recommend you get a book and sit back for a few hours with it. Programming ASP.NET 2.0 Core Reference has proved itself very valuable.

overslacked
A: 

The site asp.net contains a lot of information to get you started. A good starting point is the learning section.

MSDN has lots of information, of course. A couple articles and pages you may find interesting: - ASP.NET Page Lifecycle Overview - Creating ASP.NET Web Pages

When reading the texts on MSDN, check the tree structure to the left for more content.

Fredrik Mörk
+5  A: 

The overall page cycle is complex - but for serving images, you may want to look primarily at the IHttpHandler interface - or (more simply) create a "generic handler" (.ashx file). The IHttpHandler is the simplest "request/response" setup, without the burden of .aspx pages; you simply read from the context.Request, and write to the context.Response.

Marc Gravell
+1  A: 

hey Jimioh

This overview will explain the Page life cycle, Page (an ASPX page) being the default HTTP handler in ASP.NET.

But there are other ways to handle HTTP calls. This resource will explain how .NET can handle HTTP calls, and how ASPX Pages handle them by default.

cheers

andy
Technically it isn't really the "default" handler; simply, it is one you see most-commonly with aspx-based sites. The "default" (looking at the master web.config) is the aptly-named `System.Web.DefaultHttpHandler`; it looks like this mainly handles static content, but I didn't look in too much detail.
Marc Gravell
oh. damn. sigh. yeah you're right, I wanted to clear up for jimioh the link between request handlers and the Page object in ASP.NET. Thanks though
andy
+1  A: 

You could take a look at:

Ramp Up: For the Java Developer: Learn .NET

A free online course consisting of sample chapters from books, labs, etc that have been pulled together by the Learning team at MS, I've been through some of their other courses and they were very useful.

Zhaph - Ben Duguid
A: 

I found this most helpful: http://msdn.microsoft.com/en-us/library/ms178473(VS.80).aspx

Thanks for all your guys help.

EDIT: this article as well.

theringostarrs
+1  A: 
Colin