Ektron and Elmah - 404 Errors not being logged - http-status-code-404

I am currently configuring ELMAH 1.2 to log errors within our Ektron 9.1 application, however it will not log any 404 errors. ELMAH is currently functional as it is logging other errors (including unhandled exceptions), just not 404 errors. I am not running an MVC environment / 3-Tier Ektron Architecture, we are still using the traditional ASP.NET / Ektron Web Forms solution.
I know ELMAH logs these errors by default, so I'm wondering if I'm missing something with regards to how ELMAH is interacting with Ektron. There's not much information out there on the topic, and the one article I found is dated from 2010, so the information is severely outdated.

It's different for URLs that end in .aspx and other ones. If a user goes to your site and accesses /ThisFileisnothere.html The static file handler would handle that. Ektron replaces the static file handler with the EkDavHttpHandlerFactory. Ektron's handler doesn't throw an exception. It doesn't trigger an Application.Error Event. It just sets the statusCode to 404. If you wanted to do something custom like log an error to ELMAH, you could hook the Application.PostRequestHandlerExecute and check the Response.StatusCode
If a user tries to go to /ThisPageisntHere.ASPX then a different handler will handle that URL and will trigger the Application.Error event that ELMAH should catch.

Related

Trigger execution warnings with Logic App Standard on Azure Function Runtime

I've got a Logic App (Standard) running on an Azure Function runtime, and I've noticed I'm getting spammed with warnings for my O365 When a new email arrives in a shared mailbox (V2) trigger.
Trigger is meant to execute on cluster type 'Classic'. However, it is executing on cluster 'NotSpecified'
Just Created a Logic App (Standard) and created an O365 trigger on a shared mailbox v2 trigger.
Allowed the trigger to fire
Log Stream/AppInsights will show the warning about trigger execution: Trigger is meant to execute on cluster type 'Classic'. However, it is executing on cluster 'NotSpecified'
There can be several reasons for the error that is mentioned above. One way to solve this problem is by reconfiguring the O365 Logic App Connection and try again.
Usually it happens when there is a version mismatch of the library reference or older version of the component referenced in logic app. If still the error persist, error handling need to be implemented properly in logic apps to get detailed error. App Insight will give proper error log and provide us the error logs if issue still persist.
Please check this Handle errors and exceptions in Azure Logic Apps documentation from Microsoft for more information.

Getting http error 500 access denied from web api

Background: I am working on a product which is built using AngularJS in the front-end, and Microsoft Web Api in the back-end. The website is hosted on a Windows Server 2012 machine running IIS. We are using Windows authentication to connect to the machine.
The problem: Calling various API methods work flawlessly for me and the majority of users. But for some of the users, they cant perform certain API calls. Most of the endpoints work and return valid data, but a few methods never even gets reached.
This is the error in the iislog: 2016-05-26 12:25:23 xx.xx.xxx.xx POST /api/controller/method - 80 domain\user xx.xx.x.xx Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.1;+WOW64;+Trident/6.0) http://xxxxxx.com/#/Pagename 500 0 0 514
In the console in google chrome it says: Error: Access denied.
I have set the api to log all exceptions to a database, and no error is shown. So my theory is that the api doesnt even get reached when trying to perform these specific http methods.
I have tried searching for answers, but without any luck. Does anyone have any idea?
I finally found a solution to my problem, the exception being thrown was a DbEntityValidationException. It was thrown because some of the users names were too long to be inserted into the database table. It was not catched and properly displayed by my own general exception handling. I had to follow this guide to get the proper exception logged:
https://stackoverflow.com/a/6258174/3592773
Thanks for all the help and I hope this might help someone else in the future.

NancyFx Diagnostics page returns a 404 exception

I am new to Nancy and am playing with the tracing and other diagnostics details. The documentation at https://github.com/NancyFx/Nancy/wiki/Diagnostics states that I should be able to hit the diagnostics dashboard by using the address http:///_nancy. My app is running at http://127.0.0.1:55368/ but when I enter http://127.0.0.1:55368/_nancy, I am getting a 404 status code. Is there something else I need to do to enable the diagnostics page in nancyfx version 0.23.2? My app is only a simple api and does not use views.
Thanks
UPDATE
The documentation on the page listed above states:
Without the password you will be presented with a page telling you that the dashboard needs to be configured in order for you to use it, along with instructions on how to perform the configuration.
However, I received a 404 instead. Once I configured a password in the bootstrapper as per the docs, the login screen showed up.
If you are running your app in Release mode, you'll just get a 404 straight away. See this issue: https://github.com/NancyFx/Nancy/issues/625
and commit: https://github.com/NancyFx/Nancy/commit/002bb9573c5ccd2437233f5bd518762c0ee77b35
Updates so that StatisConfiguration.IsRunningDebug is public. The
DiagnosticsHook will not check that flag before returning the
diagnostics help view. If true then it will return NotFound instead.

WCF error with hosting of a SL4 Navigation application

I have a SL navigation application, that currently runs on a shared hosting package with a 3rd party ISP. I can login, and register using the ASP.NET membership and role providers.
I have now setup a dedicated server, on which only my app will run. It does not yet have a domain name that points to it... I access it via an IP address.
I've copied the entire site (including the ClientBin and all the XAP's) to the new server, but the Authentication and Registration services don't work... they just return NotFound.
When I check Fiddler on the working site, this service is called :
www.myaddress.com/ClientBin/MyApp-Web-AuthenticationService.svc/binary/Login
which of course succeeds. However, on the other site, the fiddler trace looks the same (because I just copied the site) :
123.123.123.123/ClientBin/MyApp-Web-AuthenticationService.svc/binary/Login
but, the call fails with NotFound. Fiddler reports it as HTTP/1.1 500 Internal Server Error. When I open
http://localhost/ClientBin/MyApp-Web-AuthenticationService.svc/binary/Login
on the server, I get the HTTP/1.1 500, as well as this description :
Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list
Which leads me to believe that there is something wrong with my IIS config, as the exact same code is working on another system.
What is a "bad module"? How do I fix it?
Normally this type of error is that ASP.Net is not activated or that a handler for svc is not registered or registered correctly.
In your case is looks a bit different. It could be that you have .net framework 4.0 code that you are trying to run in a .net framework 2.0 application pool.
IIS 500 errors often show up with more information in the Windows Event log - if you can somehow get access to that?
Also I've noticed that often the server will actually send debugging output back to the client that everything seems to ignore. Have you checked the entire raw response that is coming back from the server to see if there are any clues there?

Silverlight WSOD at remote client site

I have a client who installed our silverlight app recently. it works fine from their server itself. but when they try to run it from a client, they can log in through the aspx login page, but on the main page, which hosts the tag and the .xap file, they see absolutely nothing!
I cannot see their screens, just get occasional screenshots via email and cross my fingers that they are typing the URL I tell them to. Even Shareview is not working for them - they can see my screen but I cannot see theirs.
So I am pleading - help! Please throw out some wacky ideas. I just learned an hour or so ago that they did not even have silverlight installed, so the mornings debugging effort was a waste of time. So who knows what the next fascinating source of problems is?
Here is the user-agent info. Oor app is .net 4.0 could that be the problem? It does noty look to my untrained eye that the client supports 4.0 (from the web server log):
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) 401 3 5 0
Getting closer - I see that the GET request for the XAP is returning 401 - not found! What would do that?
It's very possible that they are blocking XAP files either directly or indirectly at the firewall. XAP files are simply ZIP files and inspection-based firewalls tend to look at these as a security risk. You may want to see if they can setup an exception in their rules.
Hmm..
1) check if your client access the good url. Request their IP address, then check the web server logs. ie: are they requesting the good url, are they downloading the xap? (check if they use a proxy, too?)
2) check that they restarted their browser after installing the Silverlight runtime.
3) Do you handle the UnhandledException event for your Application class? If no, use it to send detailed exception logs to your server on application crash.
4) Use javascriptto initialize your Silverlight application. This way, you can be notified if the runtime fail to start, (for example if it failed to load the xap file) You can use ajax to report the issue to the webserver.

Resources