Category Archives: ASP.Net

.NET Calling Web Services: Look Out For The “connectionManagement/maxconnections” Setting

If you have an application making web service calls in parallel, you will want to change the maxconnection setting. By default, you will be limited to 2 concurrent connections per endpoint, so even you had 20 threads going, they would … Continue reading

Posted in ASP.Net, C#, Web Services | Leave a comment

Avoid Mixed Content Warnings Using Protocol Relative URLs

“This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage.” Undoubtedly, you have seen this message while browsing a site over SSL using Internet Explorer. Chrome, Firefox, … Continue reading

Posted in ASP.Net, C#, jQuery | Leave a comment

ASP.Net MVC: Simple Custom Authorization by Inheriting from the AuthorizeAttribute

Implementing custom authorization to a ASP.Net MVC site can be quite simple if you take advantage of the built-in ActionFilter authorization framework. Here’s how to do it. First, this enumeration describing four levels of access to the site.   // … Continue reading

Posted in ASP.Net, Attributes, C#, MVC | Leave a comment

ASP.Net: App_Offline.htm as a Maintenance Page

While Googling about, I came upon an oldy-but-goody, that apparently has been available since the release of ASP.Net 2.0: App_Offline.htm. An undocumented feature, you can copy a file called app_offline.htm into the root of your .Net website and the application … Continue reading

Posted in ASP.Net, IIS, MVC | Leave a comment

ASP.Net MVC: Partially Secured Sites / Switching from HTTPS back to HTTP

Most sites out there have some portions that should be only served via HTTPS, while the remainder can be HTTP, such as account pages and content pages respectively.  This is sometimes called a “partially secured site.” Starting with MVC 2, … Continue reading

Posted in ASP.Net, C#, MVC | 2 Comments

C#: String Extension to Replace Accented Characters

Have you ever wanted to replace “accented” characters in a string with their equivalent English character?  Here’s a string extension that replaces these diacritics within a string for C# 2.0 and up:   public static string ReplaceDiacritics(this string source) { … Continue reading

Posted in ASP.Net, C# | 4 Comments