Mono Support Disable Javascript error alert 

Viewed 12735 time(s), 10 post(s), 11/11/2013 9:09:45 PM - by arbh89
11/11/2013 9:09:45 PM
226 Reputation 21 Total posts

Hello,

I wanted to disable javascript alert, when an exception occurs in application i get a javascript notification.

Regards.
Angel Blandon

1
11/12/2013 12:16:07 PM
15993 Reputation 2214 Total posts

Hi,

please confirm that you are referring to JavaScript notification that you get while logged in as an Administrator ? If that is the case you can try to "hide" the AjaxErrorHandler by going to "~\Portal\MonoX\MasterPages\Main.master" and by wrapping the following line of code into a ASP.NET Panel that is hidden.

<monox:AjaxErrorHandler id="ajaxErrorHandler" runat="server"></monox:AjaxErrorHandler>
Regards

2
11/12/2013 2:41:02 PM
226 Reputation 21 Total posts

But notification error appears even if not logged in as administrator, before I redirected to the error page now only displays the notification in javascript alert.

3
11/12/2013 3:08:49 PM
15993 Reputation 2214 Total posts

Can you please provide us with the screenshot so we can pin point the issue.

Thanks

4
11/12/2013 3:44:56 PM
226 Reputation 21 Total posts

This is an example. I am not logged in as administrator.

Regards.

5
11/12/2013 3:52:55 PM
15993 Reputation 2214 Total posts

Can you please give us a bit more info:

- can you please send a wider screenshot
- can you let us know on what page do you get the exception
- do you have any JavaScript errors on that page

Thanks

6
11/12/2013 4:06:23 PM
226 Reputation 21 Total posts

I am getting the notification error in my custom page, i dont want javascript notification, i want to keep redirecting to error.aspx page.

I dont have any javascript error in my page. you can see it in attached image.

Regards.

7
11/12/2013 4:17:46 PM
15993 Reputation 2214 Total posts

Can you please try to apply the patch that I mentioned earlier, I think this should fix your issue.

Regards

8
11/12/2013 5:03:59 PM
226 Reputation 21 Total posts

One of this conditions is true

if (<%# (MonoSoftware.MonoX.Utilities.SecurityUtility.IsAdmin() || IsErrorAlertEnabled()).ToString().ToLower() %>)
using this condition i understand that ErrorAlert can be disable or not is possible?.

This line of code is from /MonoX/MasterPages/AjaxErrorHandler.ascx

Regards.

9
11/13/2013 10:54:39 AM
15993 Reputation 2214 Total posts

Yes, as you can see this condition requires of user to be an Administrator and that you have IsCustomErrorEnabled (Custom errors enabled).

So you can't change the behavior through some configuration you can just remove that user from admin mode or if you change that line of code you can disable behavior for all users.

Regards

10
This is a demo site for MonoX. Please visit Mono Software for more info.