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
}
}
|
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!
|
Rank: Member Groups: Member
Joined: 3/25/2020 Posts: 10
|
Thank you for the fast reply. That makes sense and works great!
|