Category Archives: Uncategorized

Bitlocker protectors.

I wanted my drive to be protected from anyone but me, but as long as your computer is part of the domain every domain admin can logon and look at your data. So I used manage-bde.exe to encrypt my disk.

Putted the protector key on a USB-drive (As would have been the case if your computer did not have a supported TPM chip). Also was sure that the recovery-key did not ended up in AD as a attribute on the computer object.

From now (hopfully) I’am the only one that can access my folders on this disk ( Of couse you need to block any access to your drive from the network – firewall and block any policies).

Manage-bde.exe -status can tell you how or if your disk is protected.

Collection of Tools

Microsoft iSCSI Target 3.3 http://www.microsoft.com/download/en/details.aspx?id=19867

Sysinternals http://technet.microsoft.com/en-us/sysinternals/default.aspx

Remote Desktop Connection Manager http://www.microsoft.com/download/en/details.aspx?id=21101

NetMon parsers http://nmparsers.codeplex.com/releases/view/79102

LyncParser for NetMon http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=22440

Network Monitor 3.4 http://www.microsoft.com/download/en/details.aspx?id=4865

NBLookup Netbios/wins test http://support.microsoft.com/kb/830578

Paint.NET http://www.getpaint.net/download.html

Lync Server 2010 SDK http://www.microsoft.com/en-us/download/confirmation.aspx?id=19675

ImgBurn http://www.imgburn.com

IIS Transform Manager 1.0 http://www.microsoft.com/en-us/download/details.aspx?id=29889&WT.mc_id=rss_alldownloads_all

Magic ISO http://www.magiciso.com/tutorials/miso-magicdisc-history.htm

Microsoft Screen recorder http://technet.microsoft.com/en-ca/magazine/2009.03.utilityspotlight2.aspx

Sysloggersmall http://sourceforge.net/projects/sysloggersmall/?source=directory

Check server accounts in Active Directory.

I made a simple powershell to list server accounts in AD, list versions and service pack level. It will also do a simple test-connection to see if it is alive (remember 2008 firewall will block icmp by default.

Import-Module activedirectory
$htmlheader = “<html><head></head><body><table>”
$trtdstart =”<tr><td>”
$trtdstart3 =”<tr bgcolor=#80ff80><td>”
$trtdstart1 =”<tr bgcolor=#40FF00><td>”
$trtdstart2 =”<tr bgcolor=#FF8080><td>”
$tdstart =”<td>”
$tdstartstop=”</td><td>”
$tdend=”</td>”
$trtdend =”</td></tr>”
$htmlfoot= “</table></body></html>”
$counter = 1
$servere = get-adcomputer -filter {(Operatingsystem -like “*server*”)} -properties Name,OperatingSystem,OperatingSystemVersion,OperatingSystemServicePack -ResultSetSize 4000 -SearchScope subtree | Sort-Object -Property Name
$htmlheader | Out-File  -FilePath C:\Powershell\servers.htm
$servere | ForEach-Object -process {
   $gruppe= $null
   $pingtest = Test-Connection -ComputerName $_.Name -WarningAction silentlycontinue -Count 1 -ErrorAction silentlycontinue
   if ($_.OperatingSystemVersion -like “*6.1*”){
        $trtdstart1 | Out-File  -FilePath C:\Powershell\servers.htm -Append
    } elseif ($_.OperatingSystemVersion -like “*6.0*”){
        $trtdstart1 | Out-File  -FilePath C:\Powershell\servers.htm -Append
    } elseif ($_.OperatingSystemVersion -like “*5.2*”){
        $trtdstart3 | Out-File  -FilePath C:\Powershell\servers.htm -Append
    } else
    {
        $trtdstart2 | Out-File  -FilePath C:\Powershell\servers.htm -Append
    }
    $Counter| out-file -FilePath C:\Powershell\servers.htm -Append
    $Counter=$Counter+1
$tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $_.Name| out-file -FilePath C:\Powershell\servers.htm -Append
$tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $_.OperatingSystem| out-file -FilePath C:\Powershell\servers.htm -Append
$tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $_.OperatingSystemVersion| out-file -FilePath C:\Powershell\servers.htm -Append
$tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $_.OperatingSystemServicePack | out-file -FilePath C:\Powershell\servers.htm -Append
    $tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $pingtest.IPV4Address.IPaddresstostring  | Out-File  -FilePath C:\Powershell\servers.htm -Append
    $tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
    if ($pingtest) { “Echo reply” |Out-File  -FilePath C:\Powershell\servers.htm -Append } else { “No reply” |Out-File  -FilePath C:\Powershell\servers.htm -Append }
    $tdstartstop | Out-File  -FilePath C:\Powershell\servers.htm -Append
     $trtdend | Out-File  -FilePath C:\Powershell\servers.htm -Append
}
$htmlfooter | out-file -FilePath C:\Powershell\servers.htm -Append

 

*.cshtml files return html error 404 in BlogEngine.NET 2.5

I was searching for some help on this error for days. Tried adding different mappings. Then I found this page :

http://www.sven-s.de/post/BlogEngine-HTTP-4043-cshtml-Handler-not-registered-in-Shared-Hosting.aspx

 “

HTTP Error 404.3 – Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

The solution is, to add the following handlers to web.config:

<system.webServer>
  <handlers>
    <add name="cshtml-ISAPI-4.0_32bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" 
         modules="IsapiModule" 
scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="cshtml-ISAPI-4.0_64bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule"
scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> <add name="cshtml-Integrated-4.0" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler"
preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> </system.webServer>

Added this settings to the web.config file in the admin folder and “Wham bam thank you…….”. Now it it works.

 

Atle