Treat Customerror ASP.NET

Asked

Viewed 35 times

1

Good morning,

I was having an error publishing the Runtime error site,

I created a blank ASPX page and added the tag to the web.config

<customErrors mode="On" defaultRedirect="~/internalerror.aspx" ></customErrors>

But return to me

Runtime Error Description: An Exception occurred while Processing your request. Additionally, Another Exception occurred while executing the custom error page for the first Exception. The request has been terminated.

What you need to display the error generated?

  • See if you can better identify the error by looking at the application events in Eventviewer.

  • So, this error generates direct by the server to which it is hosted, has how to see anyway? In the test environment (IIS Express local) does not generate error...

  • Yes, you can simulate the error and check directly on the hosted server.

  • Ta, how do I do it.

  • Simulate the error in your application, the moment the problem occurs, go to the server where it is hosted, open the windows event viewer -> Windows Logs -> Application. Look in the list on the right, if there is an error event regarding your site.

  • Ask me a question, I was developing in structure 4.6.1 but the server was up to 4.5.2, I downgrade everything right, but some libraries downloaded by Nuget appear the message that were compiled in 4.6.1, would that be the problem? because in IIS Express it shows no error (I simulated an error to see if it would fall on the error page and dropped normally)

  • Could be... try to publish the site with the option "Precompile During Publishing" to see if there is no error.

  • This was the error: The domain of the application the thread was running on

  • La in your "customErrors" tries to add this tag: redirectMode="Responseredirect". And do a test again.

  • Displayed the same error Description: An Exception occurred while Processing your request. Additionally, Another Exception occurred while executing the custom error page for the first Exception. The request has been terminated.

  • Is your error page completely blank? or tries some Response.Redirect type call inside it?

  • In Index.aspx and neither does Response.Redirect, the only redirect is by Authentication that redirects to login

  • If I remove customErros, it is returned Details: To enable the Details of this specific error message to be viewable on remote machines, Please create a <customErrors> tag Within a "web.config" Configuration file Located in the root directory of the Current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

  • Take the customErrors and open the site inside the server it is hosted, there you should be able to see the error.

  • what returns is this Details: To enable the Details of this specific error message to be viewable on remote machines, Please create a <customErrors> tag Within a "web.config" Configuration file Located in the root directory of the Current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". and just, an example of how to implement custonError

  • No, this appears because you are accessing the site of another machine from where the site is hosted... Do this inside the server.

  • I changed the custombugs to mode="off" the return was this System.Security.Securityexception: Request failed. An untreated exception was generated during the execution of the current web request. Information about the source and location of the exception can be identified using the Exception Stack Tracking below.

  • Now we have another scenario... Has your site ever worked published? Or it never worked and you were trying to put the customErrors to identify the problem?

  • I published it today, first time

  • Would it be structure incompatibility problem? use Nuget 4.6.1 packages and the server be 4.5.2?

  • I suggest you close this topic and open one by relating your question to System.Security.Securityexception... Do a brief search, this problem is unrelated to target framework.

  • How do you close?

  • Good question kkk

  • https://answall.com/questions/423967/erro-asp-net-securityexception-request-failed I created

Show 19 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.