Thursday, November 6, 2008

Access to the path is denied error for ASP Page on Windows 2003 Server

An ASP Page on a 2003 server got an Access to the path is denied when it tried to write to a file. I gave user ASPNET write permission, but that didn't solve the problem.

I posted this code as a Page named identity.aspx in the troubled directory. It seemed that the identity of the ASP user was
NT AUTHORITY\NETWORK SERVICE

In IIs, I navigated to the particular Web Site, and then to the directory. I right clicked on the folder and then selected PERMISSIONS > ADVANCED > ADD > ADVANCED > FIND NOW. I added NETWORK SERVICE as a user and then provided write access. That solved the problem.

- - -

identity.aspx

<%@ Page Language="VB" %>
<%@ Import NameSpace = System.Security.Principal %>
<script runat="server">
Sub Page_Load()
Dim tmp As String = WindowsIdentity.GetCurrent.Name()
Label1.Text = tmp
End Sub
</script>
<html>
<head>
<title>WindowsIdentity.GetCurrent.Name()</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>

###

www.COMPUTERCRAFT.com

Monday, November 3, 2008

Installing XP on a computer with a smart card reader

I installed XP on an Hewlett Packard Pavilion a450n. This HP has a built-in smart card reader for 4 different sizes of cards. On the first try, XP installed the boot drive as the I: drive.

Disk Manager can't change the letter of the boot drive. When I tried changing the boot drive to C: by editing the Registry, I wound up with an OS that wouldn't start.

I removed the power cord and discharged the motherboard by pressing the on/off button. Then, I disconnected the smart card reader cable from the motherboard. The XP install then configured the boot hard drive as the C: drive. After the XP install completed, I again removed the power cord and re-attached the smart card cable. When XP restarted, the boot drive was still the C: drive.

###

www.COMPUTERCRAFT.com