How to Stop Elmah from Logging Errors using Configuration.? - elmah

I have used Elmah for many of my web applications till date Thanks to Atif Aziz.
Now I am trying to use Elmah in one of my windows based application. Before implementing
I m trying out some Examples and so far everything works Good.
But Do we have any configuration which can help me stopping Elmah at once ?
My Client doesnt want to have Elmah enabled for few of his Environment. I didnt come across
such kind of settings in Elmah except I have heard once about ErrorEmail configuration.
DO any one knows how to stop Elmah using configuration from logging emails ?
Thanks in advance.

Related

Django App to open github issues on server 500

I am working on a Django project and, so far, we are receiving e-mails when a Server Error 500 happens in our backend. However, as we are a team of developers, we would like to open Github Issues instead of sending these e-mails. We have our project on Github of course.
I have been searching for an existing Django App that we could reuse but unfortunately I did not find any integrating such functionality.
Does anyone know if there is such Django application? The idea seems pretty simple and I am surprised i could not find any application available for this purpose.
Moreover, a search on django packages does not show many results...
Thanks in advance

How to make Django pass cookies when communicating with Node.js server using socket.io?

I am currently developing an instant messaging feature for my apps (ideally cross platform mobile app/web app), and I am out of ideas to fix my issue.
So far, I have been able to make everything work locally, using a Node.js server with socket.io, django, and redis, following what most tutorials online suggest.
The step I am now at consists in putting all that in the cloud using amazon AWS. My Django server is up and running, I created a new separate Node.js server, and I am using Elasticache to handle the Redis part. I launch the different parts, and no error shows up.
However, whenever I try using my messaging feature on the web, I keep getting an error 500:
handshake error
I then used the console to check the request header, and I observed that the cookies are not in there, contrary to when I am on localhost. I know it is necessary to authorize the handshake, so I guess that's where my error is coming from..
Furthermore, I have also checked that the cookies do exist, they are just not set in the request header.
My question is then: How can I make sure Django or socket client (not sure who's responsible here..) puts the cookies in the header??
One of my ideas was that maybe I am supposed to put everything on the same server, with different ports, instead of 2 separate servers? Documentation on that specific architecture problem is surprisingly scarce, compared to the number of tutorials describing how to make it work on local.
I hope I described the problem accurately enough! :)
Important note: I am using socket.io v0.9.1-1, only one compatible with a titanium mobile app.
Thank you for any help!
All right, so I've made some progress.
The cookie problem came from the fact I was making cross-domain request, adding a few lines enabled CORS, which didn't solve the cookie issue, but allowed me to communicate between servers (basically I set the headers of the response using express. I then passed necessary data in the query, even if not the most secure way to do it, I'm just building an MVP, and it's enough for now.
I haven't been able to make the chat work from my Titanium mobile app, but since I can use a webview to handle it, I will be fine.
Hopefully that will help someone.. If anyone needs me to post some code snippets I will gladly do so upon request!
Cheers

Does ELMAH works in medium trust environment

I've a ASP.NET MVC website running successfully for a while. The hosting company suddenly changed the trust level to medium and I'm started to see 503 errors strangely. I'm using Fluent NHibernate and ELMAH. I removed the Fluent NHibernate dlls and the calls but I'm still seeing errors and I hope it is due to ELMAH. Does ELMAH works in medium trust environment? Do I need to do some tweaking to make it work?
Since Elmah can be configured to use many different providers you may not have a problem with Elmah, but rather with some satellite assembly that is loaded alongside. So investigate your Elmah configuration as well as the assembly itself
There are also some dependencies that Elmah have that are not Medium trust compatible, such as SqlLite. If this is the case for you the solution linked to is to rebuild Elmah without the dependencies.

Initialize SMTP settings for ELMAH through code

The application includes:
ASP .NET MVC web app
DAL
Background Service
Library project
The web app and background service projects use the library project to send emails. SMTP settings are included in a config file in the library project itself.
In this scenario, is there a way to bind ELMAH to pick up SMTP settings from the library project? Perhaps if there's a way to configure ELMAH through code (during Application_Start), it would help achieve what's intended.
Guidance much appreciated.
You might find some use out of [this article].
Particularly the section about sending error reports automatically through email might be useful for you. Here's a more focused link with the same topic: [link]
Although these show how to setup a static address for your SMTP settings, I'm not sure I know how to dynamically create them at run-time based on a config file. If I find a way to do this in a better way I'll be sure to edit this answer or post a comment, but take a look at the links to see if they help for now.
You can configure elmah to post the error report to an HTML address. See this article.
When you set it to post to that address, you can have whatever back end you want catch it and send the email for you.
You mentioned you're using MVC, so you could have elmah post to a controller action that would then send the email, using the SMTP settings from your library project since you'd have access to the references there.

Has anyone developed a front end for ELMAH?

The default web interface is fine for exception logging, but I am using it for general logging and need to get some other people to be able to examine the logs. I was just thinking that someone else may have already developed a front end for it.
I recently ran into the ASP.NET Exception Reporter (based on ELMAH) project on codeplex. They've built a UI for ELMAH that organizes by type of error.