Hi,
- I'm running .NET framework 1.1 on win2k server
I'm investigating error pages at the moment. I have found how to:
a) display friendly or real .NET errors in the remote browser, by
editing the "customErro rs" section of the machine.config (or
web.config) and setting the value to "On", "Off" or "RemoteOnly ".
b) display a custom error file, by adding the "defaultRedirec t" entry
to the "customErro rs" section and pointing them at custom page for
each type of error, e.g. an error 404 and 500 page.
What i can not seem to do is force a .NET application to use Internet
Explorers error pages, i.e. what you would get with .asp if you have
the browser setting "friendly errors on" ticked.
Does anyone know a way of forcing .NET to use the actual browser error
pages, as generated by "shdoclc.dl l"?
I can almost achieve what i desire by adding this entry to the
machine.config:
<customErrors mode="RemoteOnl y"
defaultRedirect ="res://C:\WINNT\System 32\shdoclc.dll/dnserror.htm">
<error statusCode="404 "
redirect="res://C:\WINNT\System 32\shdoclc.dll/dnserror.htm"/>
</customErrors>
This forces IE to display the desired error page, but i'm not going to
use this method as it relies on users local configration (the location
of the .dll). Any way to force .NET to do this work?
Any help would be greatly appreciated, i can't seem to find any
articles relating to this. 3 2295
ASP.Net runs on the server. You can't force anything to happen on the client
using pure server-side scripting.
....and what are you going to do about non-IE clients?
Cheers
Ken
"Stuart Read" <st********@tot alise.co.uk> wrote in message
news:b3******** *************** ***@posting.goo gle.com...
: Hi,
:
: - I'm running .NET framework 1.1 on win2k server
:
: I'm investigating error pages at the moment. I have found how to:
:
: a) display friendly or real .NET errors in the remote browser, by
: editing the "customErro rs" section of the machine.config (or
: web.config) and setting the value to "On", "Off" or "RemoteOnly ".
:
: b) display a custom error file, by adding the "defaultRedirec t" entry
: to the "customErro rs" section and pointing them at custom page for
: each type of error, e.g. an error 404 and 500 page.
:
: What i can not seem to do is force a .NET application to use Internet
: Explorers error pages, i.e. what you would get with .asp if you have
: the browser setting "friendly errors on" ticked.
:
: Does anyone know a way of forcing .NET to use the actual browser error
: pages, as generated by "shdoclc.dl l"?
:
: I can almost achieve what i desire by adding this entry to the
: machine.config:
:
: <customErrors mode="RemoteOnl y"
: defaultRedirect ="res://C:\WINNT\System 32\shdoclc.dll/dnserror.htm">
: <error statusCode="404 "
: redirect="res://C:\WINNT\System 32\shdoclc.dll/dnserror.htm"/>
: </customErrors>
:
: This forces IE to display the desired error page, but i'm not going to
: use this method as it relies on users local configration (the location
: of the .dll). Any way to force .NET to do this work?
:
: Any help would be greatly appreciated, i can't seem to find any
: articles relating to this.
I've been doing some more experimentation and I think my original
question was a little off the mark, sorry for this.
Seems that the IE generated error pages are only displayed when the
browser does not get a response from the server, or the server isn't
IIS. For example, browse a non existant url and you get IE's "not
found" error. However, browse for a non-existant page on an existing
IIS hosted site, and you get the IIS "404b" file. This IIS file is
stored on the web server c:\winnt\help\i isHelp\Common\4 04b.htm.
Now .. .NET "customErro rs" only works if you set the "redirect" to a
URL, it will not work with a UNC path.
Any idea how we can get .NET to use these IIS error pages, without
having to copy them into a website and then supply that URL to the
machine.config "customErro rs" section?
Add a virtual directory that points to %systemroot%\he lp\iisHelp\comm on\
(you should already be able to see this if you have a look at the "default
website" - there's a virtual directory called "IISHelp" that's mapped, which
is how the 500-100 error handler page works for Classic ASP errors).
For additionally sites, you get the "default" response, not the files from
the iisHelp folder - you need to add a similar virtual directory.
Cheers
Ken
"Stuart Read" <st********@tot alise.co.uk> wrote in message
news:b3******** *************** ***@posting.goo gle.com...
: I've been doing some more experimentation and I think my original
: question was a little off the mark, sorry for this.
:
: Seems that the IE generated error pages are only displayed when the
: browser does not get a response from the server, or the server isn't
: IIS. For example, browse a non existant url and you get IE's "not
: found" error. However, browse for a non-existant page on an existing
: IIS hosted site, and you get the IIS "404b" file. This IIS file is
: stored on the web server c:\winnt\help\i isHelp\Common\4 04b.htm.
:
: Now .. .NET "customErro rs" only works if you set the "redirect" to a
: URL, it will not work with a UNC path.
:
: Any idea how we can get .NET to use these IIS error pages, without
: having to copy them into a website and then supply that URL to the
: machine.config "customErro rs" section? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kevin Muenzler, WB5RUE |
last post by:
How do I force a browser to download a file instead of displaying it? In
other words I have a page with MP3 and WMA files on it and I would like for
the visitor to download the file instead of play it without having to
right-click and save.
How can I force the browser to pop up the "save file as" dialog box instead
of playing it? I know that I can encapsulate it in a zip file which will
download and open WinZip.
Thanks
|
by: Lucvdv |
last post by:
I want to return a 404 response from an ASP script (IIS 5).
Response.Status lets me set the response string, but if I don't include any
HTML text myself, the result is an empty page.
Is there a way to 'redirect' it to the server's default 404 response, as if
the URI really doesn't exist, but without really redirecting it so the URL
isn't replaced in the browser's address bar?
|
by: Tim Cowan |
last post by:
Hi
I have the following code to write an error file and it is supposed to open
the HTML file in a browser when an error occurs. It creates the file Ok but
doesn't open the new browser and doesn't give me any errors.
Tim
FileStream file = new FileStream(@"C:\errors\error.htm",
System.IO.FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(file);
|
by: Richard Wilde |
last post by:
How do I force an XML document to be downloaded from a web browser to a
client?
The XML document will come ideally from a dataset but if this is not
possible then I can save off the XML document to the server and read it back
in to send to the clients browser. I have somethink like this but am
struggling to send the XML...
With HttpContext.Current.Response
|
by: CJM |
last post by:
What is the best way to force a page break when printing from a browser?
A page in my application generates a series of tables which are usually less
than will fit on a page of A4. Ideally I want to introduce a page break
between each table when printing.
I'm not sure what options I have available. I know there is some support in
CSS but I'm no sure on the details or effectiveness.
Thanks in advance...
| |
by: Dean Slindee |
last post by:
My project is getting a bit large, and I would like to kick-start VS05 into
performing the error-checking compilation at my direction, rather than
waiting for it to self-start. Is there a way to do this?
Thanks,
Dean S
|
by: jinnareddy |
last post by:
Hi,
I'm unable to download a file that is having a 2-byte char in its name (e.g.テ) using force download option. Though, am able to download file names involving ASCII chars. I have tried URL encoding too, but with no success.
Can someone provide details on how to handle the 2-byte char URLs and download the files?
Appreciate your suggestions/help in resolving it.
Here is my code:
|
by: David Golightly |
last post by:
This is just a quick poll for all you web devs out there: What
browsers do you test on/are concerned about compatibility with?
Obviously, you're going to test on current-generation browsers such as
IE6, IE7, Firefox 1.5/2, Opera 8/9, Safari 2, etc.
How old must a browser be before you stop worrying about it? Anybody
here still test on IE4?
Thanks,
|
by: MoshiachNow |
last post by:
HI,
How do I force a browser to open a certain file with notepad ?
<LI><A HREF="D:/Program Files/yohoLogFile.txt.4" ><p
style="font-family:font-size: 7pt;"yohoLogFile.txt.4 </A></LI>';
Thanks
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |