Testing email from localhost with ASP.NET without SMTP server
Alot of the time when developing web apps, you need to send emails from your application. Developers need a way to test this and sometimes you can’t be bothered to setup a local SMTP server just for this purpose. Thankfully, the ASP.NET framework has a built in way for you to set this up so you can send the emails to your hard drive as opposed to some SMTP server. Simply add the following code to your web.config and you should be good to go.
Adding a check all box to check checkboxes within a row in a Gridview
When developing a gridview recently, the need to be able to have a check all button within a row on the gridview came up. At first I thought this would be an easy task, but it turned out that my first few ideas/attempts didn’t really work out. The key for this ability is that I did not want to postback when clicking the check all checkbox. I finally came up with a solution that is posted below.
Webservices: “The request failed with HTTP status 401: Access Denied.”
I received this error recently when trying to setup web service authentication. This error shows up when anonymous authentication is not setup on IIS. To fix this error, follow the steps below.
Create Dynamic XML Files with ASP.NET HTTP Handlers
The internet in it’s current state sees XML as a very mature technology to allow data to be transferred between sites. There may be many times when you will want to generate XML files in your web solutions and ASP.NET provides HTTP Handlers to assist in this task. The ASHX files that you create in your ASP.NET solutions will handle a request and allow you to output the file as a different type.
Porter Stemmer Algorithm Class in C#
The Porter Stemmer Algorithm is an algorithmn which was created to by Martin Porter to reduce english words to their root word stems. For example, the word “forms” would reduce to “form” and the word “connections” would reduce to “connect”. The details of the algorithmn can be found here
Setting up Apache with IIS and running PHP on both
Setting up Apache with IIS (and PHP on both)
Recently I’ve been working on a project in PHP since it required true URL rewriting which just is not available in the windows environment currently. This required the installation of Apache and it’s wonderful mod_rewrite module which does all the wonderful URL rewriting stuff. I ran into a bunch of issues which I’ll cover here to help anyone else trying to setup Apache with IIS.
Using SCOPE_IDENTITY() with ObjectDataSource
Microsoft’s introduction of the ObjectDatasource in ASP.NET 2.0 was a great addition. It saves developers alot of time once they are familar with the controls. The problem is that what seemed like simple tasks when coding everything by hand sometimes became more difficult to figure out. For example, how do I return the identity seed from an Insert command? Let’s say that your basic stored procedure looked like this