Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unable to download under IIS 7
Message
From
23/09/2013 11:31:32
 
 
To
23/09/2013 10:33:27
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01583406
Message ID:
01583905
Views:
33
This message has been marked as a message which has helped to the initial question of the thread.
>>My suggestion was Response.CompleteRequest as a replacement for Response.End.
>
>Thanks, but I do not have access to this method. I have .NET Framework 4.5 installed on my development PC. I assume this will only become available once I switch the application to use .NET Framework 4.5. At this point, I cannot do this as we still have our production environment running on Windows Server 2003.

Sorry, was a but sloppy in my use of namespace. It's HttpApplication.CompleteRequest() - which has been around since 1.1

>Also, this is something I will have to test to see how it goes. It does say at the end that "The CompleteRequest method does not raise an exception, and code after the call to the CompleteRequest method might be executed." So, this is what I am trying to avoid. However, it is unclear if the same effect as I have now will be accomplished when I will use that.

Hard to say without knowing the source (probably hard to say anyway :-{ )

FWIW here's the source for the Response.End() method (which shows it will call CompleteRequest() if it doesn't throw the exception):
       public void End() {

            if (_context.IsInCancellablePeriod) { 
                InternalSecurityPermissions.ControlThread.Assert();
                Thread.CurrentThread.Abort(new HttpApplication.CancelModuleException(false)); 
            } 
            else {
                // when cannot abort execution, flush and supress further output 
                if (!_flushing) { // ignore Reponse.End while flushing (in OnPreSendHeaders)
                    Flush();
                    _ended = true;
 
                    if (_context.ApplicationInstance != null) {
                        _context.ApplicationInstance.CompleteRequest(); 
                    } 
                }
            } 
        }
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform