improve.dk
Just another mindless drone looking for the perfect stack
posts - 220, comments - 475

October 2009 Blog Posts


Working with identity column seed & increment values

Written on Wednesday, October 28, 2009 by Mark S. Rasmussen in SQL Server: Tricks

Learn how to find the current identity value of an identity column, how to change the seed & increment values, as well as how to retrieve the maximum and minimum values.

No comments | Write first comment
 

Solving access denied errors using Process Monitor

Written on Wednesday, October 21, 2009 by Mark S. Rasmussen in Development: .NET, Sysadmin: Technology, Sysadmin: Windows, Sysadmin: IIS, Sysadmin: Security

Access denied errors are not uncommon when deploying new websites / features that interact with the filesystem. While it might work in local testing, it suddenly doesn't anymore when deployed. Using Process Monitor I'll show how to easily debug these issues. I've made a very simple web application project with a Default.aspx file that has the following codebehind code: using System; using System.IO; using System.Web.UI; namespace FileWritingWebsite { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { File.WriteAllText(@"C:\Test.txt", "Hello world!"); Response.Write("Done!"); } } } After deploying this to my webserver we receive the archetypical access denied error: In this case it's rather obvious where the error stems from,...

2 comments | Read comments
 

How to do URL rewriting on IIS 7 properly

Written on Wednesday, October 14, 2009 by Mark S. Rasmussen in Development: .NET, Sysadmin: IIS

One of my earlier blog posts, and the all time most popular one, was about how to make URL rewriting on IIS 7 work like IIS 6. While my method did provide a means to the goal, it's humiliatingly far from what I should've done. Since the old post is still the most visited post on my blog I feel obligated to write a followup on how to do proper url rewriting in IIS 7. The scenario I'll assume a completely vanilla IIS 7 setup, contrary to the old post, there's no IIS tampering required. I've setup...

11 comments | Read comments
 

Simple file synchronization using robocopy

Written on Wednesday, October 07, 2009 by Mark S. Rasmussen in Sysadmin: Technology, Sysadmin: Windows

On numerous occations I've had a need for synchronizing directories of files & subdirectories. I've used it for synchronizing work files from my stationary PC to my laptop in the pre-always-on era (today I use SVN for almost all files that needs to be in synch). Recently I needed to implement a very KISS backup solution that simply synchronized two directories once a week for offsite storing of the backup data. While seemingly simple the only hitch was that there would be several thousands of files in binary format, so compression was out of the question. All changes would...

3 comments | Read comments