Web design, SQL, and .NET for the young, up-and-coming developer - Dot Net Yuppie �� » Snippets
Web design, SQL, and .NET for the young, up-and-coming developer Dot Net Yuppie

There’s nothing more amateur than displaying a big, yellow unhandled exception page for a .NET application. Professionally done ASP.NET websites need adequate error handling and recording. It’s not enough to catch exceptions and display a friendly error page — you need to record any unhandled errors so that they can be fixed.

Read the rest of this entry »

In response to my article on Custom Binary Serialization in .NET, a visitor asked me for a specific example of a custom serialization class of .NET’s MailMessage class.

As I mentioned in the article, I struggled with the MailMessage and MailAddress class because they cannot be serialized unless you use custom serialization (which can be a big pain because it takes quite a bit of time to create a custom class). I spent days trying to serialize the MailMessage class using conventional methods, only to find that there is no quick workaround for it other than custom serialization.

Read the rest of this entry »

In .NET, serialization is the process of converting a complex object into a bit stream or XML string, which can be saved into a file or sent over a network connection. Serialization is extensively used in web services to transfer information from client to server, and for saving .NET objects into an SQL database.

In this tutorial, I will show you how to implement binary serialization in .NET; you’ll quickly find that many objects in .NET are not natively serializable, so I’ll also show you how to customize an object to manually make it serializable.

Read the rest of this entry »

Occasionally an ASP.NET application needs to be recycled, particularly during testing, usually due to poor coding. An application can be recycled in IIS, but if you don’t have access to IIS, you can programmatically recycle your ASP.NET application.

What is a recycle?
An application recycle releases all the resources and memory associated with an application, and restarts the application with a clean slate. This process prevents memory-hog applications from taking up all a server’s resources with memory leaks and poor resource allocation.

Read the rest of this entry »

Feet
[Photo by Spiralz]

ASP.NET makes managing uploaded images and creating thumbnails relatively straightforward. I have utilized the following process to accept an uploaded image, and resize it to a maximum size of 200×200 pixels. Read the rest of this entry »