Solved

HttpRequest and HttpResponse in ASP.NET and C#

Posted on 2006-07-10
3
2,854 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.net mvc entity issue 6 30
ASP.NET Web API or ASP.NET Core MVC? 3 51
How can I build my own IDE using ASP.NET MVC? 2 25
Class object 2 26
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now