Randonmly access denied error occured while accessing pages HDIV - spring-mvc

I am facing issue of access denied randomly for any secure request. Access denied page is nothing but error page will appeared HDIV exception occures. The trouble part is that we have configured log for HDIV but we haven't getting any exception. When the same page refreshed then page loaded correctly.
we have following application configuration and environmentJBoss 5 and spring mvc security 2.5 and HDIV version 1.1.
In Log now we are geting eeror message INVALID_HDIV_PARAMETER_VALUE But not much details
I am not able to identify what is going wrong.

INVALID_HDIV_PARAMETER_VALUE means the request does not contains the HDIV_STATE parameter. If this happens once in a while then you are submiting the form before it completly loaded. I faced the same problem i solved it by placing a div with higher z-index the using jQuery fadeout the div on document ready

Related

How to implement custom Error handling in asp.net?

I am Implementing Social Login with our application using asp.net. For social login, we are using Okta. We are using a third-party SDK. There is an error throwing from third-party SDK. When Error occurs from a third-party SDK it's not logging into our application, Directly display the error on the requested page. When exceptions occur from the third-party SDK, There is no clue to the application to manage the exception. Rather than display errors on the page we want them to display a custom error page. I have tried following none of them worked.
Webconnfig Custom error mode on. default URL is given.
In global.ascx Application_Error we try to log error. It's hitting this event as well.
In Page_Load we have implemented try{} catch{} blocks. There is no hit to Page_Load as well.
Please help to handle this type of error

500 Internal Server Error - When I login to the application with Spring MVC

I'm using Spring MVC and I'm trying to login to an application in a PRE environment, despite entering the correct user and password I throw the following error:
Viewing the log of the application the last one that is visualized is an access to a DAO, and aparantemente never ends to solve the query.
And the last thing I can say is that if we clean the chrome cache, the application is logged without problems.
Could it be that the j_query_spring_security_check is causing a problem?
Please help.
Sorry for not adding the code, finally the problem was that the application had a load balancer with 2 nodes, and one of the nodes always fails :/
Regards.

Azure Web App suddenly returns 401.72 for all request

I have a problem which is similar to this one, but not quite.
We have a solution with two Azure Web Apps, built and deployed by Visual Studio Online. It has been working just fine for a few months, but suddenly all requests end in a 401.72 response:
HTTP Error 401.71 - Unauthorized You do not have permission to view
this directory or page.
Most likely causes: The authenticated user does not have access to a
resource needed to process the request.
Things you can try: Create a tracing rule to track failed requests for
this HTTP status code. For more information about creating a tracing
rule for failed requests, click here.
Detailed Error Information: Module EasyAuthModule_32bit
Notification AuthenticateRequest Handler
ExtensionlessUrlHandler-Integrated-4.0 Error Code 0x80004005
Requested URL https://[appname]:80/ Physical Path
D:\home\site\wwwroot Logon Method Not yet determined Logon User
Not yet determined
More Information: This is the generic Access Denied error returned by
IIS. Typically, there is a substatus code associated with this error
that describes why the server denied the request. Check the IIS Log
file to determine whether a substatus code is associated with this
failure. View more information ยป
Microsoft Knowledge Base Articles:
As far as I can figure out, no relevant configuration changes has been done.
Restarting the Web App and redeploying the solution didn't solve the problem
As it happens, we were due to recreate the environment anyway, and after this was done, the same deployment setup (with updated target) deployed successfully and it's working fine on the new Web App intsance.
Even if we now have a working environment, we'd really like to know what happened, so we can be sure it doesn't happen again.
Can anyone shed any light on this?
You had easy auth turned on. Do you expect it to be turned on? That appears to be causing the issue.
If you don't intend for it to be on, please turn it off via either portal (old|new) by navigating to your Web App and finding it in your settings.
If you do intend for it to be on, you need to check your configuration to make sure you've properly set up AAD. Maybe the App Configuration within AAD has changed?
If neither of those things helps, let me know.

How to override page render for an error page?

We have an ASP.NET MVC application, and when it encounters an error you are not redirected to an erro rpage, instead the content of that page is replaced with the content of the error page. You go fix your code and press refresh and you're done.
We have another application that's written in WebForms and I'd like to get the same behavior out of it. Right now the current behavior is that when an error occurs you get redirected to ~/Error.aspx. Is it possible to make webforms behave this way? Perhaps override the page render event somehow?
This is just for development right? Displaying the error.aspx on production is much better both from a security and user experience perspective.
In order to turn off custom errors, you need to know how to turn them on. Yes? There are several places custom errors can be configured.
in IIS Create a Custom HTTP Error Response (IIS 7)
an error handler on the page, in global.asax, or in a class defined elsewhere (app_code folder perhaps)
in web.config Web.config customErrors mode
Web.config is probably the most common place. Start there.

Handle unhandled exceptions in asp.net

How can we prevent page crash in asp.net? Is there any generic function or place like global.asax where we specify a file to redirect to when an unhanded exception occurs? (like we redirect to a specified page when 404 page not found exception occurs?
<customErrors> doesn't prevent your pages from "crashing". It just allows you to apologize to your users when the page does crash.
You should be examining the Application event log for messages from the source "ASP.NET <version>". These will include details of any exceptions your code has been generating and not handling. You need to fix these, as every one of these indicates that your users were not able to do what they came to your site to do.
You can do it in Global.asax or you can set up custom error pages in web.config.
ASP.NET Custom Error Pages
How can we prevent page crash in asp.net?
As Mal said, "If it crashes, you crashed it". The only way to "prevent" crashes is by carefully writing your code, testing, etc, as with any program.
To display a nice error page, check out the <customErrors> element in your web.config. MSDN docs here. Plenty of articles around if you google for 'customErrors'.

Resources