AppHarbor's IIS logs - appharbor

Is there a way to get the IIS logs for a website hosted on AppHarbor? I have one site hosted on it and I am getting run time exception. Currently I get a suggestion that I should enable custom errors to view the exception. I don't want to do this since it is a deployed instance which is being used by users.

The IIS logs are not currently available but you can access unhandled exceptions in the error interface on AppHarbor.
You can also use something like Elmah (appropriately locked down) to record and inspect errors.
We're working on making HTTP access logs available too.

Related

Get remote errors in Service Fabric using Web Api

Web API has GlobalConfiguration.Configuration.IncludeErrorDetailPolicy
= IncludeErrorDetailPolicy.Always; to turn on remote errors. (Allowing them to see them in a browser even if you are not browsing on the local machine.
But, near as I can tell, Service Fabric, running Web Api, does not support GlobalConfiguration.
Is there a way to configure things so I don't have to log into one of my Service Fabric server machines each time I want to see what a services error message is?
I recommend you don't show error details to everyone.
It's a security risk.
Consider moving your error logs out of your cluster. For instance, by using OMS, ELK or Application Insights.

API call within a Web API fails

I am working on a web api backend.
I am trying to make a call to another web api from within one of our api controllers.
When I run this as a unit test it works fine.
However, when it is hosted on IIS Express the GetAsync call fails with the exception: "No connection could be made because the target machine actively refused it 127.0.0.1:8888".
When we host it on azure we also get a similar exception.
Is there a setting in our web.config missing?
Any suggestions?
looks like it is still pointing to local host, needs to point to IIS or Azure server.
Check for hardcoded values in test code or web config.

Azure Cloud Service 503 error outside of instance

I have three mvc 3 web applications in a single web role on Azure Cloud Services. All of a sudden this morning both the single instance in production and in staging give "HTTP Error 503. The service is unavailable." when navigated to in a browser.
I rebooted the production instance but nothing changed. Then I deployed a remote desktop enabled version to the staging instance and logged in. However, strangely when I navigate to the web applications in a browser inside the remoted staging instance everything works.
Looking at IIS server logs it seems there are some issues starting the roles (warning level about the appPoolId being incorrect) but obviously the roles are starting as they are accessible from inside the staging server.
The World Wide Web Publishing service is also running and even after restarting this service the web application is not accessible externally.
Does anyone have an explaination for why the sites are accessible locally but not remotely that would help me debug this issue?
I found out where the issue came from, the bindings that were configured in IIS7 did not include bindings for the actual [abc].cloudapp.net host headers.
I assume that for some reason since some time last night or this weekend the requests seem to come with those headers instead of the original headers for the website. This is really strange but adding these bindings fixed both the staging and production instances and they were available again after this change.

Monioring the performance of asp.net web application using IIS log files

I have IIS log files, I need to findout the errors generated by the asp.net web application which are hosted by IIS 7.
I used Log parser to paarse IIS log files, but I want to find errors such as timeout errors ,session errors and other 500x errors occured in the web application hosted in the server, only by analysing IIS logs.
I'm puzzled about which feild in IIS logs i need to look upon ? I have only IIS log files and no access to Event viewer.
What are the necessary feild i can parse in IIS logs to indicate that the application has undergone some error due to heavy load,or server is taking too long to respond?
How can i use 'timetaken' or any other feild in feild in IIS logs to say that the web application is lagging inperformance and prone to errors by analysing the previous IIS log files.
I'm a newbie to this.Pls help.

View Azure cloud service IIS logs

I have created a simple MVC3 site that displays data from a table in an Azure database. I have created a cloud service to run the site in and can publish it successfully. I have also run the site successfully in the Azure emulator.
My problem is that when I select the page that displays the data there is an error as I get the default error page. I think I have the db connections set correctly but I cannot see any logs. So my questions are:
Where are the IIS logs? I would like to see what the error is.
Are there any other logs/diagnostics that I can use to see what the problem is?
Thanks.
By default the only place where something might be logged is in the Windows Application Event Log. You'll need to Remote Desktop to the cloud service instance (Connect from the Instances page in the Azure Management Portal) and then open Event Viewer.
The IIS logs themselves should be available too although as per normal IIS logs these won't contain exception details. Use IIS Manager > Application > Logging when logged on to the instance to find the location.
As suggested by Magnus, you should use something like Windows Azure Diagnostics and/or ELMAH and/or log4net to log exception and diagnostic information to somewhere accessible for troubleshooting.
I suggest you use Windows Azure Diagnostics to collect your logs.
You can read all(setup and usage) about it here:
http://msdn.microsoft.com/en-us/library/windowsazure/gg433048.aspx

Resources