Have you experienced coding and all of a sudden when on windows 10 you experienced that MM/dd/yyyy is not a valid date? This is because of the culture that is default implemented on your device, in this case on my device with Windows 10 Pro. To cause of this is the machine is by default is using dd/MM/yyyy and in this case apps that we are developing is having this kind of issue.
Thank fully the fastest way to fix is via the web.config with the following code:
ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.
Once ELMAH has been dropped into a running web application and configured appropriately, you get the following facilities without changing a single line of your code:
Logging of nearly all unhandled exceptions.
A web page to remotely view the entire log of recoded exceptions.
A web page to remotely view the full details of any one logged exception, including colored stack traces.
In many cases, you can review the original yellow screen of death that ASP.NET generated for a given exception, even with customErrors mode turned off.
An e-mail notification of each error at the time it occurs.
An RSS feed of the last 15 errors from the log.
How to Install ELMAH on your MVC Project?
Open Nuget Package Manager on the MVC Project
Search for ELMAH and Install it.
Then configure it.
It will already add some configuration under your web.config but we need to include some configuration so that it will point to a database.
<add name=”elmahConnectionString” connectionString=”Data Source=Server;Initial Catalog=ELMAH_DEV;uid=user;pwd=user;Pooling=true;Min Pool Size=0;Max Pool Size=999;” providerName=”System.Data.SqlClient” />
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on remote access and securing ELMAH.
We are glad to invite you to our first Free service product, OpenCast. OpenCast is an online broadcasting websites that aim to help people broadcast freely and openly. The website is created using ASP.Net MVC, Entity Framework, SignalR, & OpenTok.
Then you should also know that this error is persisting because the values given above might be an XSS attack. If you are sure that you want to accept this type of values on your dabatase you may explicitly remove this validation by adding this tag to your page’s masterpage or 1st line of tag.
If you are on ASP .NET MVC you can add this to your model, assuming that your model has the content variable.
[AllowHtml] public string content = String.Empty;
Thanks hope it help you allot. Also if you are not familiar with XSS attacks, I will try to make an article for that so you can create your own script that is hack-able, be able to prevent it, and know what are it’s crons.
Both extensions utilizes the creation of custom helper to make jQuery development quite easier but abstracted. Abstracted because you are learning how the extensions should be use to produce jQuery but your not really coding jQuery.
I have been searching the web on how to easily send email thru ASP .NET MVC 3 and finally found the right code for it, its called WebMail. Look at the code below and insert it to one of your Controller’s Action: