Aggregating HTTP Response Codes for Reporting in ASP.NET - asp.net-mvc-3

I am new to the Windows IIS environment, coming from Linux/Apache. At my new job (ASP.NET shop), they don't currently monitor 404s or any other non-200 HTTP response codes so problems with missing images and files from the website or 500 errors don't surface until a customer emails us weeks later.
What do you guys use to monitor, aggregate and display these responses in .NET? In my old job, I had a script attached to the 404 handler that inserted into a database and from there I created a dashboard that grouped and displayed all the 404s so it was easy to see issues with missing files, etc.
Not sure if it's best to handle at the application level or with some log file aggregator.
What is the best practice for doing the same in ASP.NET?
I appreciate any advice on this
Thanks

You may take a look at ELMAH which is specifically designed for this purpose.

Related

Laravel application response with 429 http-status-code

I have a web application (Angular front, Laravel backend API). In that there is a section where I have messaging system. Basically four user roles can post and read messages.
When a user logged in I needs to check every 10 seconds to see if there are new messages for any user of any role(out of 4 roles).
This works fine but from time to time I get http status code of 429 Too many request. I have no idea what is the reason. Anyone have an idea of what is the reason or can point me to the right direction in order to fix this?
Note: I have a custom field system build and I use that to hold extra data of messages. I notice that when i fetch messages considerable number of models related to custom fields also quarried. Can this be a reason?
I found the solution and here are my steps.
I needed to find all my request going to the API, for that I installed this package API logger. Using this I examined the requests and there I found some request made to the API over and over.
I corrected the requests made to the API and the issue seems to fixed.

How do I get XHR/Ajax resource timing data from window.performance?

When I open the Firefox "network" tab in the developer tools, I'm able to see the timing data from all the requests my page is making, including application/json (XHR) calls. I want to be able to get this timing information programmatically.
In Selenium, I let my page load fully and then ask the window.performance.getEntries() method for all of the resources. It gives me back a ton, including CSS, javascript, etc, but I don't see the calls to our RESTful services that show up in the Firefox window as "json" requests.
Since Firefox shows them in its Network tab in the developer tools, is a way for me to get them programatically? Our app is an angular app that is not using iframes.
I figured out my issue after a day of googling and trying different things. Thanks to this article I discovered that I needed to add Timing-Allow-Origin: * to the response header of all the services.
Once I did that, the timing information started to appear. It's apparently because the services are hosted at a different domain than my client. I don't understand the ramifications of leaving that header in there so I'll make sure it doesn't get deployed to production.

Monitor my siteminder application

Is there any "out of the box" siteminder tool that checks if the siteminder server / application is runnig?
e.g. I send a request by a url like http:/mysiteminderapplication:myport/check_heartbeat.html and it responses me the actual status like ok, error, etc.
Sorry, I have never seen an siteminder installation but I have to check this fact for a customer.
thank you in advance,
Patrick
You can use the One View Monitor to check the policy server status. It returns a lot of HTML though, you would need to parse the XML to get the values.
You can monitor smpolicysrv services by writing some scripts on siteminder server. As said above you can have oneView monitor too.
I have seen customers using Splunk Siteminder App.
https://splunkbase.splunk.com/app/842/

Consuming SOAP web service for a cocoa application

I am trying to consume a SOAP web service into a cocoa application. The return value which is printing in the log is an HTML error page.
My Main objective is to pass two parameters to the web service and get a value in response. Can anyone please suggest correct way of achieving this?
It could be any number of things. For startes: you may be hitting the wrong URL, you may be sending invalid data and the server is not returning a valid error. The best thing to do is check what you are doing against any docs you may have, then contact the person working on the server side of the project for help debugging.
I know that is not a very specific answer, but I don't have a lot to go on. Hope it helps.

Display SSRS report with ASP.NET MVC 3 application on Windows Azure

I've been searching for almost 2 days, but I still don't manage to do what I want.
I have a ASP.NET MVC3 application on Windows Azure, and I would like to give to users report made with SQL Server Reporting Services.
I've created a test report, published it on my Sql Azure server, and I'm able to access it with the URL. (Even tough I have to connect with my Username/Password, and I don't like that).
I want my users to click on a link/button on my application, and without any actions of them, a PDF or HTML version of my report open and they can print it.
I've had a WebReference of my Sql Azure report server, but I don't know what to do to athenticate programmatically and how to have my reports.
Help me StackOverflow, you're my only hope.
The easiest way, I think, is to use the Report Viewer to render your report on a page. Since it's a web control, you might need to combine the ASP.NET Web Form and MVC together, which means only this page is Web Form while others are MVC.
Then you can pass your authentication information into the Report Viewer, and specify the remote report path and name, and the parameters needed to run your report. The Report Viewer itself has the feature to download the report in many formats, such as PDF, Word, etc.
Use the SSRS web service is another way, when you want to get the report content programmatically. It's a standard web service, so you can pass your authentication same way you did to any other web services. I think it should be something like Credential and use.
Credential = new NetworkCredential(username, password);
Hope this helps.
Thanks for your answer !
I've found this sample my Microsoft with working code exemple to work with Sql Azure. Hope it can help somebody one day.

Resources