Welcome Guest Search | Active Topics | Sign In | Register

ProcessRequest override creates save dialog and possible fix Options
mhoblit
Posted: Wednesday, April 1, 2020 10:03:58 AM
Rank: Member
Groups: Member

Joined: 3/25/2020
Posts: 10
During the function ProcessRequest we are looking at the URL to determine if we can process this request in the application itself. However after upgrading from v19 to v20 when this function is called and exits it will create system save dialog box and try to save a zero byte file with part of the URL as the filename. I found a work around by setting the content-type only on the actions that caused this issue. The code to zoom in, out and reset does not change anything to response. However, I am not sure if that is the correct way to handle this situation. Is there a better way to tell EO that the request has been handled and should not be processed further after the function exits?

Code: C#
public override void ProcessRequest(Request request, Response response)
            {
                var url = request.Url.ToLower();
                if (url.StartsWith(App.ZoomInCommand.ToLower()))
                {
                    response.ContentType = "text/html";
                    // .. code to zoom in
                }
                else if (url.StartsWith(App.ZoomOutCommand.ToLower()))
                {
                    response.ContentType = "text/html";
                    // .. code to zoom out
                }
                else if (url.StartsWith(App.ZoomResetCommand.ToLower()))
                {
                    response.ContentType = "text/html";
                    // .. code to reset zoom
                }
                else if (url.StartsWith(App.WindowCloseCommand.ToLower()))
                {
                    // .. code to close application
                }
                else if (url.StartsWith(App.LogoffCommand.ToLower()))
                {
                    // .. code to log the user out
                }
            }


eo_support
Posted: Wednesday, April 1, 2020 4:19:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

There is no way for you to decide whether a request should be handled inside ProcessRequest. That decision is made in the custom resource handler's Match method. Once you return true from your Match method, you MUST provide a normal content in ProcessRequest.

Thanks!
mhoblit
Posted: Thursday, April 2, 2020 10:14:23 AM
Rank: Member
Groups: Member

Joined: 3/25/2020
Posts: 10
Thank you for the fast reply. That makes sense and works great!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.