473,513 Members | 8,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forcing An HTTP Response From the Server?

Hi.

I feel like i should know this but i dont.
How do I get the server to send a specific HTTP response to the
browser?

I want to tell the browser that there is no content coming back from
ther server and I want to do it in the HTTP Headers. The status code
is "204" for no content.

How do i do this? I am using VB.NET.

Thanks.

Mar 2 '07 #1
2 1267
"pbd22" <du*****@gmail.comwrote in message
news:11**********************@31g2000cwt.googlegro ups.com...
I want to tell the browser that there is no content coming back from
ther server and I want to do it in the HTTP Headers. The status code
is "204" for no content.

How do i do this? I am using VB.NET.
Do you mean something like this in web.config:

<customErrors defaultRedirect="ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="servererror.aspx" />
<error statusCode="404" redirect="filenotfound.aspx" />
<error statusCode="403" redirect="accessdenied.aspx" />
<error statusCode="204" redirect="nocontent.aspx" />
</customErrors>

http://www.google.co.uk/search?sourc...econfig%22+404
Mar 2 '07 #2
Hi.
>
I feel like i should know this but i dont.
How do I get the server to send a specific HTTP response to the
browser?
I want to tell the browser that there is no content coming back from
ther server and I want to do it in the HTTP Headers. The status code
is "204" for no content.

How do i do this? I am using VB.NET.

Thanks.
You can set Response.Status to something like "204 No Content" (it's a string)
You probably then should call Response.End() to abort further processing
at the server.

Hans Kesting
Mar 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1428
by: Mark | last post by:
Hi - I have a document management system in ASP/VBScript, which copies files to a http://www./files directory. While uploading files to that directory, it also updates a database with full path...
1
3372
by: Robert Huie | last post by:
Hi all, I'm trying to use asp.net to code a chat window and I would like to make the http request delay as long as possible till the process/thread detects a new incoming message. basically...
2
1292
by: MWells | last post by:
I have a simple project server which shares files from within our network. The ASP.NET front end uses a database to authenticate users, and then based on their permissions, reaches across the...
6
3050
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders()...
3
1119
by: Tin Man | last post by:
I have an aspx page: myPage.aspx that I want to always display in a new brower window regardless of how it gets invoked i.e. hyperlink, response.redirect, server.transfer. Is there something I can...
6
1891
by: MattC | last post by:
Hi, If I add the following line to Application_BeginRequest Request.Headers.Add("Accept-Encoding", "gzip"); Will this cause the server to utilise IIS6.0 Compression even if the client is...
2
10005
by: Sergey Poberezovskiy | last post by:
Hi, I have an application where I need to ensure that users do not use browser navigation buttons. I specifically warn the users, and in every page set the folllowing:...
3
1802
by: Don | last post by:
Is it possible to create a link which will cause either A) the server to serve a fresh copy of a file or B) the browser to "refresh" the copy of the file. Doing it via a link is the only...
3
2577
by: Ken Fine | last post by:
I am using ASP.NET's CreateUserWizard control. I want to force the visitor to use a username and e-mail address that I am providing in programming, and I do not want the visitor to be able to edit...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.