Hi all,
I'm having a problem with a response.redire ct and firefox.
I have an error hanlder setup in the global.asax which issues a
response.redire ct to a generic error page. This works fine in IE, but
in firefox I get an alert 'The document contains no data.' The error
occurs when the user attempts to submit a form with file uploads larger
than the server expects. I click the asp:button to submit, but the
browser doesn't like the redirection.
Any ideas?
Andy 4 4033
Hi Andy, I'm having a problem with a response.redire ct and firefox. This works fine in IE, but in firefox I get an alert 'The document contains no data.'
I can't think of a reason right now why Firefox would behave differently in
this situation than IE. Are you sure you are not generating different code
for these two browsers, or that you are testing a similar situation?
Also, could you post relevant portitions of your ASP.NET source code? That
would help in solving the issue you're having.
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland ja***@removethi s.dystopia.fi http://www.saunalahti.fi/janij/
Jani,
I rechecked with IE on the same pages and it returns the Cannot find
server or DNS error page. So it doesn't work on either browser.
The C# code for the error handler in global.asax is:
Exception ex;
string qString;
ex = Server.GetLastE rror();
if ( ex is HttpUnhandledEx ception && ex.InnerExcepti on != null ) {
ex = ex.InnerExcepti on;
}
LogManager.GetL ogger( typeof( HttpApplication ) ).Error(
"There were errors processing a request", ex );
qString = "";
if ( ex.Message == "Maximum request length exceeded." ) {
qString = "?filesize= 1";
}
Response.Redire ct( "error.aspx " + qString, false );
It has something to do with file uploads; I have a maximum upload size
set and when i upload files (I allow more than one on a page) whose
total size exceed that limit, it triggers the error handler, but for
some reason the redirect isn't working. Nothing in the code behind for
the upload page itself is ever fired.
Thanks
Andy
Hi Andy! I rechecked with IE on the same pages and it returns the Cannot find server or DNS error page. So it doesn't work on either browser.
In that case, try stripping or commenting out code to make it simpler. It
could be that the code you have in the error handler is itself causing an
exception, or the code never gets executed. You have somekind of log manager
in place. Can you see an event in your log?
For example, try removing all other code from the event handler, and just
leave the Response.Redire ct call in place. Does it work now? Also, you could
try to test the redirect in another location. Does it work now?
Hope these tips help you spot the fault.
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland ja***@removethi s.dystopia.fi http://www.saunalahti.fi/janij/
I did, and the response.direct is still failing. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sospeter |
last post by:
Hi Ken,
I have done that but still experiencing same problem. Tried the
following i.e. turning smartnavigation = false and using
server.transfer as below but nothing works.
Please help.
Page.SmartNavigation = False
FormsAuthentication.SetAuthCookie(txtCustID.Text, False)
|
by: Andy |
last post by:
Hi all,
I'm having a problem with a response.redirect and firefox.
I have an error hanlder setup in the global.asax which issues a
response.redirect to a generic error page. This works fine in IE, but
in firefox I get an alert 'The document contains no data.' The error
occurs when the user attempts to submit a form with file uploads larger
than the server expects. I click the asp:button to submit, but the
browser doesn't like the...
|
by: KBuser |
last post by:
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?
|
by: KBuser |
last post by:
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?
|
by: Bill |
last post by:
In file FIRST.ASP, I've got
<%
Response.Redirect "SECOND.ASP"
%>
The redirect is happening, and I'm seeing the content from SECOND.ASP in the browser,
but the URL in the browser is still saying FIRST.ASP.
Does anyone know why this is happening and how I can insure the browser displays
SECOND.ASP? I'm using IE6.
| |
by: =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?= |
last post by:
We have been running into some problems where using Response.Redirect causes
the page to hang and it never actually redirects.
Here's the scenario:
User opens the page, selects an item from the drop down list and then clicks
one of a couple of buttons to send them off to another page. We do a little
bit of validation in the Event Handler and then do a Response.Redirect off to
the next page. Then the page just sits there and never...
|
by: nkoier |
last post by:
Hi, I've been going crazy trying to figure out what's wrong with our
Asp.Net 2.0 intranet site.
At the very top of our main page I provide a TextBox and a Button for
submitting Google searches. Recently somebody pointed out to me that
you can't just press ENTER anymore after typing in the TextBox but
that you HAVE to click on the submit Button WITH THE MOUSE for it to
work. After some initial troubleshooting I discovered that it's only...
|
by: Nick |
last post by:
Hi there,
I would like to perform something like the following from my vb.net web
service, being invoked via HTTP Post
Call HttpContext.Current.Response.Redirect("myprotocol://myurl")
Unfortunately I do not seem to be able to redirect to a custom protocol
url, any ideas why? Basically I'm trying to implement this functionality so
no coding need take place to get the redirection from the consuming web
|
by: dasnowball |
last post by:
Hi everyone,
I'm developing an application using ASP.NET with VB, connected to a SQL Server, running on .NET 2 framework.
I am developing a training system where documents are uploaded into the system and a test is defined.
The problem I am having is when users need to view these documents. Currently, they select which item they wish to complete training on, and by clicking the start test button, it pulls the location of this document...
|
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: 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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |