Link to home
Start Free TrialLog in
Avatar of gbreddy
gbreddy

asked on

HttpRequest and HttpResponse in ASP.NET and C#

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
Avatar of Darth_helge
Darth_helge

will this do?
        Dim ThisApp As HttpApplication
        ThisApp = CType(sender, HttpApplication)
        My.Response.StatusCode = 401
        ThisApp.CompleteRequest()
Avatar of gbreddy

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of kaliyugkaarjun
kaliyugkaarjun

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial