|
|
|
Sysadmin: Windows
Solving access denied errors using Process Monitor
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,...
Simple file synchronization using robocopy
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...
Using Squid as a reverse proxy with a .NET url rewriter
Once you start receiving visitors from all over the world, a new kind of scaling issue arise. It's not a matter of adding more servers to the cluster or optimizing code (we'll assume these factors are perfect), it's a simple matter of geography and mathematics. Serving code from one end of the world to the other will take time, no matter how quick your servers are handling the request. The speed of light suddenly seems quite slow. At one of my current projects we serve a lot of image data. Letting US based clients fetch all the data from...
aspnet_regiis -ga token reference error
Some time ago Peter Loft Jensen wrote about how to easily give a user account the neccessary permissions to access the IIS metabase & required directories, and thus be used for running the IIS process. We're running all x64 servers, but our IIS is running in 32 bit mode due to some non-x64 compatible 3rd party libraries. Usually this means we have to use the Framework\version\aspnet_regiis.exe bin instead of the Framework64 version - otherwise it might interfere with our 32 bit IIS settings. Doing that resulted in the following error: C:\WINDOWS\microsoft.net\Framework\v2.0.50727>aspnet_regiis -ga [domain]\[user]
Start granting [domain]\[user] access to...
Missing ASP.NET performance counter values
Before attempting to optimize code or fix any kind of load issue, you should first gather data and become aware of what bottlenecks you're experiencing. A great way to do this is through the Performance Monitor application. Recently I tried monitoring my ASP.NET applications, but all my counters had a value of 0. As I thought initially, it's a simple problem, but the solution was not easily found. In some cases it might be due to lack of permissions on the performance counter registry keys. In my case it's because I was running Server 2003 x64, but my...
Using Network Load Balancing for Availability & Scalability
There are two primary reasons for venturing into the realms of clustering/load balancing - availability & scalability. In this post I'll give a quick demo of how to setup Windows Network Load Balancing (NLB) on Server 2003 and how it affects the availability of a web application. When we have several nodes doing the same thing, if one of them fails, the cluster as a whole continues - provided that the nodes are not so overburdened that a single node failing will kill the others due to the extra load. Most applications will have an upper limit on how...
Setting up and testing Active Directory failover
I spend a lot of time architecting for scalability, availability and security during my daily work. Currently I've got a distributed system consisting of several windows services communicating across machines using WCF and authenticating through Active Directory. In such a situation, if the Active Directory Domain Controller (let's just call it DC from now on) dies, everything more or less dies as no clients/servers are able to authenticate incoming requests anymore. Security is paramount, so the services are not allowed to simply cache the domain logon, thus the logon has the occur at each service call - requiring a...
One mans sin, another mans blessing
This is a reply to the Top 5 sins of Vista blog post written by Steve Wiseman. Number 1 - The new file browsing interface is different Yes, Notepad's great, we all use it, whether we want to admit or not. The file browsing interface however, is also great. That is, if you're willing to acknowledge it! Admitted, there's no reason for the web site addresses to figure in the drop down. But why use the drop down at all? Haven't you noticed the button on the bottom left hand side, cleverly called, "Folders"? Click...
Making URL rewriting on IIS 7 work like IIS 6
Upgrading to IIS 7 should be rather transparent, unfortunately that is not the case when it comes to URL rewriting as we knew it from IIS 6. In IIS 6 all we had to do was to add a wildcard mapping making sure that all requests went through the ASPNET ISAPI process. After this was done, one could create a global.asax file that would either pass requests directly through or rewrite the URL based on an internal algorithm. UPDATE: Please see my updated post on how to do proper URL rewriting using IIS 7. I didn't really expect...
Missing Windows Mobile Device Center
In an effort to get my HTC TyTN Windows Mobile 5 based PDA to synchronize with my Vista system, I downloaded the newest release of ActiveSync (4.2). This is what happens when you try to install ActiveSync on Vista: After searching for a solution it became apparent that Vista was born with the successor of ActiveSync, namely the Windows Mobile Device Center (WMDC in short, which is not to be mistaken for the Weapons of Mass Destruction Commission, which shares the same acronym). And whadda ya know, there it is, Windows Mobile Device Center....
SetPoint volume control in Vista
It seems Logitech has some pretty functional SetPoint drivers out for Vista already (SetPoint is the all-purpose driver software for all their keyboards and mice). The ony thing that did not work was the volume control. I could turn it up and down and the visual volume meter would respond (the SetPoint generated one, not the Vista one), but nothing would actually happen. Fortunately there's an easy solution. Navigate to "C:\Program Files\Logitech\SetPoint". Now make sure that the "SetPoint.exe" process is NOT running - you may have to click Ctrl+Shift+Escape and end the process in the...
Installing Office 2007 on Vista
Ok, so I'd promised myself that I would at least give it a month before I'd install Vista on my desktop computer as I simply will not be able to cope with having major problems here. For work purposes I simply have to have a functional desktop computer. Oh to heck with that! Having tried Vista on my laptop, I craved for seeing it expose it's full potential on a more capable machine. I fell into the pressure. I did it. I installed Vista on my desktop. I've blogged the whole process, moving from the usual XP environment...
Running Vista, MSDNAA update
I am now officially running Vista! Although I have been somewhat skeptical about Vista so far, I must admit that my first impression of Vista is quite positive. It seems that most Microsoft affiliated Vista users brag about their high System Rating scores, most of them being in the 4+ area. How about aiming at who can get the lowest score? Well say hello to my laptop: I've installed Vista on my Dell Latitude X1 laptop that boasts a puny 1.1Ghz Pentium M CPU and 512MB memory, and the graphics card isn't even worth mentioning. To...
Vista @ MSDNAA
According to The Australian IT Faculty Blog Windows Vista should be available through MSDNAA by now. Unfortunately it seems like most MSDNAA systems haven't been updated yet, including MSDNAA @ Aarhus University. I'm pulling all the threads I can to get it here, I can't wait to try it out on my laptop (there's no way I'm installing a newly released OS on my primary desktop!). See "Running Vista, MSDNAA update" for on update on Vista @ MSDNAA
|