Solved

HttpRequest and HttpResponse in ASP.NET and C#

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 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

18 Experts available now in Live!

Get 1:1 Help Now