Download ASP.net 2.0 framework form http://msdn.microsoft.com/netframework/downloads/updates/default.aspx
Then run: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -I
In IIS go to ASP.NET tab and change the asp.net version to 2.0XXX
In IIS click on "Webservice Extensions"
Click on ASP.NET and "allow" it.
Tuesday, November 28, 2006
Tuesday, November 14, 2006
Minimal Setup of W2K3 VPN with NAT
0) Disable Windows Firewall service
1) Add Remote Access Role with VPN & NAT.
2) Assign private IPs to clients eg 192.168.x.x
3) Include basic firewall.
4) Punch hole in firewall for PPTP port (1723), assign to external IP/NIC in basic firewall
5) Add remote access policy to include windows/AD group for access to VPN
6) Enable name resolution on basic firewall
7) On the VPN server IP properties tab, use the external NIC for DNS queries
1) Add Remote Access Role with VPN & NAT.
2) Assign private IPs to clients eg 192.168.x.x
3) Include basic firewall.
4) Punch hole in firewall for PPTP port (1723), assign to external IP/NIC in basic firewall
5) Add remote access policy to include windows/AD group for access to VPN
6) Enable name resolution on basic firewall
7) On the VPN server IP properties tab, use the external NIC for DNS queries
Labels:
Code
Thursday, October 5, 2006
IE6SP1 WWW_Auth logout Javascript
document.execCommand("ClearAuthenticationCache", "false");
Labels:
Code
Saturday, August 5, 2006
Hibernating/suspending from the command line on Windows XP
Enter:
rundll32 powrprof.dll,SetSuspendState
Whether it hibernates or suspends depends on Control Panel power options.
Attachments:
if (document.getElementById("idAttachmentsTable").rows.length == 0) document.getElementById("idAttachmentsRow").style.display='none';
rundll32 powrprof.dll,SetSuspendState
Whether it hibernates or suspends depends on Control Panel power options.
Attachments:
if (document.getElementById("idAttachmentsTable").rows.length == 0) document.getElementById("idAttachmentsRow").style.display='none';
Labels:
Code
Friday, April 14, 2006
Changing Linux to Text Console Login
Log in to the PC as root.
Edit /etc/inittab
Change the 5 in the line:
id:5:initdefault:
to 3.
The id:5 denotes the runlevel that Linux will boot up into. Runlevel 5 is the graphical login mode. This means that when Linux starts it will go directly into X11. The initdefault stands for the default runlevel. Change this runlevel to 3 for multiuser mode console login.
Edit /etc/inittab
Change the 5 in the line:
id:5:initdefault:
to 3.
The id:5 denotes the runlevel that Linux will boot up into. Runlevel 5 is the graphical login mode. This means that when Linux starts it will go directly into X11. The initdefault stands for the default runlevel. Change this runlevel to 3 for multiuser mode console login.
Labels:
Code
Thursday, December 8, 2005
Windows Tablet as a portable gaming device?
I reckon Microsoft is missing a trick here. They should, in my opinion, push Windows Tablet Edition as a portable gaming platform rather than the lacklustre Windows CE. The larger form factor is much more conducive to immersive gaming and the Windows platform easier to port existing games across than the crippled CE platform.
Thursday, October 27, 2005
VBScript to set all local users' passwords to non-expire
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject("WinNT://" & strComputer & "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
Wscript.Echo objUser.Name objUserFlags = objUser.Get("UserFlags")
objPasswordExpirationFlag = objUserFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
Next
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject("WinNT://" & strComputer & "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
Wscript.Echo objUser.Name objUserFlags = objUser.Get("UserFlags")
objPasswordExpirationFlag = objUserFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
Next
Labels:
Code
Sunday, October 23, 2005
Set AD user password to non-expiry
using System.DirectoryServices;using ActiveDs;
//Add reference to COM Active DS TypeLib
static void DontExpirePassword(DirectoryEntry User)
{
int val;
const int ADS_UF_DONT_EXPIRE_PASSWD =0x10000;
val = (int) User.Properties["userAccountControl"].Value;
User.Properties["userAccountControl"].Value = val ADS_UF_DONT_EXPIRE_PASSWD;
User.CommitChanges();
}
//Add reference to COM Active DS TypeLib
static void DontExpirePassword(DirectoryEntry User)
{
int val;
const int ADS_UF_DONT_EXPIRE_PASSWD =0x10000;
val = (int) User.Properties["userAccountControl"].Value;
User.Properties["userAccountControl"].Value = val ADS_UF_DONT_EXPIRE_PASSWD;
User.CommitChanges();
}
Labels:
Code
Wednesday, September 28, 2005
Shutting down remote PCs
Dim oFSO, oTS, sClient, oWindows, oLocator, oConnection, oSys
Dim sUser, sPassword
'set remote credentials
sUser = "Administrator"sPassword = "password"
'open list of client names
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.OpenTextFile("C:\clients.txt")
Do Until oTS.AtEndOfStream
'get next client name
sClient = oTS.ReadLine
'get WMI locator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
'Connect to remote WMI
Set oConnection = oLocator.ConnectServer(sClient, "root\cimv2", sUser, sPassword)
'issue shutdown to OS ' 4 = force logoff ' 5 = force shutdown ' 6 = force rebooot ' 12 = force power off
Set oWindows = oConnection.ExecQuery("Select " & "Name From Win32_OperatingSystem")
For Each oSys In oWindows
oSys.Win32ShutDown(5)
Next
Loop
'close the text fileoTS.CloseWScript.Echo "All done!"
You should know a couple of things about this script. First, you need to have a text file named C:\Clients.txt on the machine where the script runs. That file should contain the list of client names you want to shut down. Instead of using a text file, you can modify this script to use ADSI, enabling it to query computer names from Active Directory or an NT domain. However, as you probably don’t want to run this script against every computer on your network (shutting down all of your servers might be bad), the text file provides you with complete control over which computers the script will affect.
Dim sUser, sPassword
'set remote credentials
sUser = "Administrator"sPassword = "password"
'open list of client names
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oTS = oFSO.OpenTextFile("C:\clients.txt")
Do Until oTS.AtEndOfStream
'get next client name
sClient = oTS.ReadLine
'get WMI locator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
'Connect to remote WMI
Set oConnection = oLocator.ConnectServer(sClient, "root\cimv2", sUser, sPassword)
'issue shutdown to OS ' 4 = force logoff ' 5 = force shutdown ' 6 = force rebooot ' 12 = force power off
Set oWindows = oConnection.ExecQuery("Select " & "Name From Win32_OperatingSystem")
For Each oSys In oWindows
oSys.Win32ShutDown(5)
Next
Loop
'close the text fileoTS.CloseWScript.Echo "All done!"
You should know a couple of things about this script. First, you need to have a text file named C:\Clients.txt on the machine where the script runs. That file should contain the list of client names you want to shut down. Instead of using a text file, you can modify this script to use ADSI, enabling it to query computer names from Active Directory or an NT domain. However, as you probably don’t want to run this script against every computer on your network (shutting down all of your servers might be bad), the text file provides you with complete control over which computers the script will affect.
Labels:
Code
Wednesday, August 24, 2005
Setting a User Account Expiration
Type type = usr.NativeObject.GetType();
Object adsNative = usr.NativeObject;
type.InvokeMember("AccountExpirationDate", BindingFlags.SetProperty, null, adsNative, new object[]{"21/01/2006"});
usr.CommitChanges();
Object adsNative = usr.NativeObject;
type.InvokeMember("AccountExpirationDate", BindingFlags.SetProperty, null, adsNative, new object[]{"21/01/2006"});
usr.CommitChanges();
Labels:
Code
Tuesday, August 16, 2005
Getting PHP to work with MySQL on IIS/W2k3
Make sure that the PHP directory is in the System PATH variable. Only version 5.1.5 works with 64bit W2K3.
Labels:
Code
Monday, July 25, 2005
Getting a .Net Compact Framework Form to cover full screen
The form must not have a menu or a control box. Set the WindowState to Maximized in the form load event. That's it.
Labels:
Code
Wednesday, July 13, 2005
Getting PHP MySQL to work on Fedora Core 3
The Php MySQl module is not installed by default on Fedora Core 3. Install the following RPM:
ftp://rpmfind.net/linux/fedora/core/updates/3/i386/php-mysql-4.3.11-2.6.i386.rpm
ftp://rpmfind.net/linux/fedora/core/updates/3/i386/php-mysql-4.3.11-2.6.i386.rpm
Importing GPG public keys on Fedora Core 3
# rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY*
Labels:
Code
Subscribe to:
Posts (Atom)


