I have added the following bit of code to an asp page. If I make strServerName the web server name it runs fine. If I use another server name I get a permision error.
Error Type:
(0x80041003)
/monitor/script.asp, line 28
I have IIS 5.0 installed. I am the network admin so I have the proper ntfs permisions on the remote machine. On the directory where the asp page is, I am not using anonymous auth. in IIS. I am using nt integrated only. I am beginning to get a bit frazzled. I am new to this and have read papers and tutorials. Is there some unwritten or "hushup your just a noob" rule that I am missing? Any suggestions or examples of how to do this would be helpfull.
Thanks for your help.
<%@LANGUAGE="VBSCRIPT"%>
<%strServerName = "someservername"%>
<P>Disks for server: <%=strServerName%></P>
<TABLE align=left border=1 cellPadding=1 cellSpacing=1>
<TR>
<TD>Drive Letter</TD>
<TD>Volume Label</TD>
<TD>Size (MB)</TD>
<TD>Free Space (MB)</TD>
<TD>Free Space (%)</TD>
<%
' Get a list of queues
for each disk in GetObject("winmgmts:{impersonationLevel=impersonate}!//" + strServerName)_
.InstancesOf("Win32_LogicalDisk"
if disk.DriveType = 3 then ' fixed disks only
Size = Int(disk.Size / (1024*1024))
Free = Int(disk.FreeSpace / (1024*1024))
%>
<TR>
<TD><%=disk.Name%></TD>
<TD><%=disk.VolumeName%></TD>
<TD><%=Size%></TD>
<TD><%=Free%></TD>
<TD><%=Int( Free / Size * 100 )%></TD></TR>
<%
end if
Next
%>
Error Type:
(0x80041003)
/monitor/script.asp, line 28
I have IIS 5.0 installed. I am the network admin so I have the proper ntfs permisions on the remote machine. On the directory where the asp page is, I am not using anonymous auth. in IIS. I am using nt integrated only. I am beginning to get a bit frazzled. I am new to this and have read papers and tutorials. Is there some unwritten or "hushup your just a noob" rule that I am missing? Any suggestions or examples of how to do this would be helpfull.
Thanks for your help.
<%@LANGUAGE="VBSCRIPT"%>
<%strServerName = "someservername"%>
<P>Disks for server: <%=strServerName%></P>
<TABLE align=left border=1 cellPadding=1 cellSpacing=1>
<TR>
<TD>Drive Letter</TD>
<TD>Volume Label</TD>
<TD>Size (MB)</TD>
<TD>Free Space (MB)</TD>
<TD>Free Space (%)</TD>
<%
' Get a list of queues
for each disk in GetObject("winmgmts:{impersonationLevel=impersonate}!//" + strServerName)_
.InstancesOf("Win32_LogicalDisk"
if disk.DriveType = 3 then ' fixed disks only
Size = Int(disk.Size / (1024*1024))
Free = Int(disk.FreeSpace / (1024*1024))
%>
<TR>
<TD><%=disk.Name%></TD>
<TD><%=disk.VolumeName%></TD>
<TD><%=Size%></TD>
<TD><%=Free%></TD>
<TD><%=Int( Free / Size * 100 )%></TD></TR>
<%
end if
Next
%>