Saturday, June 21, 2008

NETWORK SERVICE lose the write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0

NETWORK SERVICE lose the write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0

Run IIS Manager
Right click on Application Pool/DeafultAppPool
Click Properties
Under DefaultAppPool Properties click Identity
Select Predefined/Local System
Click Yes on the warning message

Click ok then restart IIS Service

You should now be able to view your asp web page.

Enjoy IT!

Tuesday, June 10, 2008

Disable screensaver in VB.NET

To enable and disable screen saver through vb.net


Imports Microsoft.Win32


Public Sub ScreenSaverDisable()
Dim regKey As RegistryKey
Dim regVal As String
regKey = Registry.CurrentUser.OpenSubKey("Control Panel\Desktop", True)
regVal = regKey.GetValue("ScreenSaveActive")
If regVal = 1 Then
regKey.SetValue("ScreenSaveActive", "0")
End If
regKey.Close()
End Sub

Public Sub ScreenSaverEnable()
Dim regKey As RegistryKey
Dim regVal As String
regKey = Registry.CurrentUser.OpenSubKey("Control Panel\Desktop", True)
regVal = regKey.GetValue("ScreenSaveActive")
If regVal = 0 Then
regKey.SetValue("ScreenSaveActive", "1")
End If
regKey.Close()
End Sub

Enjoy IT!