Solved

HttpRequest and HttpResponse in ASP.NET and C#

Posted on 2006-07-10
3
2,863 Views
Last Modified: 2010-08-05
Hi Experts,

I am writing a simple application
That is Getting the HttpRequest and process it and Send the HttpResponse with some parameters

I am getting the request and by using the IHttphandler and ProcessRequest method I created a object to HttpContext and using that context I am getting the values of the parameters in the HttpRequest.

After some checkings based on the business rules, after that I have to send some values and In some cases I have to send Status is 204 etc

I want to knopw how can i send a response to the User, along with the values

Thanks in advance
Gopi
0
Comment
Question by:gbreddy
3 Comments
 
LVL 5

Expert Comment

by:Darth_helge
ID: 17079833
will this do?
        Dim ThisApp As HttpApplication
        ThisApp = CType(sender, HttpApplication)
        My.Response.StatusCode = 401
        ThisApp.CompleteRequest()
0
 

Author Comment

by:gbreddy
ID: 17080081
It is not working for me and following is the way i am getting the request

I got a HttpRequest and I process it but I want to know how to send the HttpResponse to the client, by adding some parameters to the header
Follwing is the Request:

http://client.newdotnet.net/?version=458774&tag=id=8777174b42f3f9d3915132d96d4aeaca&discard_tag=upgrade&source=NNFRZA~1&ptr=NNFRZA638&search=1&br=NewDotNet&xid=c29cc2ad&ec=100

And I have to send the Response as follows
Server response:

HTTP/1.1 204 No Content
Client-Tag: id=8777174b42f3f9d3915132d96d4aeaca
Client-Source: NNFRZA~1
0
 
LVL 8

Accepted Solution

by:
kaliyugkaarjun earned 200 total points
ID: 17080968
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web site error 3 41
asp day pilot 3 19
Output Caching in IIS 2 28
How to suppress the column names that are auto assigned when creating a GridView dynamically? 1 23
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question