Solved

HttpRequest and HttpResponse in ASP.NET and C#

Posted on 2006-07-10
3
2,901 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

628 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