Browse by Tags

The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
After upgrading an ASP.NET application from .NET Framework 3.5 to .NET Framework 4.0 I ran into the following error message dialog when trying to view any of the modules in IIS on the server. What happened is during the upgrade, the web.config file was...
VB.NET IF() Coalesce and “Expression Expected” Error
I am trying to use the equivalent of the C# “??” operator in some VB.NET code that I am working in. This StackOverflow article for “ Is there a VB.NET equivalent for C#'s ?? operator? ” explains the VB.NET IF() statement syntax which is exactly what I...
How to disable an ASP.NET linkbutton when clicked
Scenario: User clicks a LinkButton in your ASP.NET page and you want to disable it immediately using javascript so that the user cannot accidentally click it again.  I wrote about disabling a regular submit button here: How to disable an ASP.NET...
Binding multiple websites to HTTPS on your development machine
On your development machine you can use host headers to bind to different websites within IIS, allowing you to host multiple websites on a single development machine (you can do this too in production but this article is focusing on the development environment...
How to switch between HTTP and HTTPS in ASP.NET MVC2
ASP.NET MVC2 has the new RequireHttpsAttribute that you can use to decorate any action to force any non-secure request to come through HTTPS (SSL). It can be used as simply as this: [RequireHttps] public ActionResult LogOn() { ..... } Now any request...
Getting Started with Windows Azure: Part 2 - Creating a Windows Azure Hello World Application
Follow along as I learn all about Windows Azure. Part 0 – Where do I go to get started? Part 1 - Setting up your development environment Part 2 - Creating a Windows Azure Hello World Application <<<< YOU ARE HERE Below are the steps to create...
Format the email subject in the Elmah Error Logging Module
Elmah error logging modules and handlers for ASP.NET is a great module for logging asp.net errors to many different and configurable repositories.  One of the repositories that Elmah works with is email. You can easily set up Elmah to send emails...
WebConfigurationManager.OpenWebConfiguration() - Failed to resolve the site ID
I am writing a small administrative tool to read configuration settings from web.config files for various websites that are running on the same web server as the tool.  Initially I thought the method WebConfigurationManager.OpenWebConfiguration(...
How to 301 Permanent Redirect in ASP.NET
In the next release of the .NET Framework (.NET Framework 4.0) there is a new response method for permanently redirecting a request: Response.RedirectPermanent . You can see the Beta MSDN documentation for Response.RedirectPermanent here . This will automatically...
Line-breaks and carriage returns (\r \n) are invalid in email subject
I received this exception when sending an email using System.Net.Mail.MailMessage: "The specified string is not in the form required for a subject." System.ArgumentException: The specified string is not in the form required for a subject.   ...
More Posts Next page »

Search

Go

This Blog

News

Syndication