My digital notepad RSS 2.0
 Thursday, April 19, 2007
In order to install the SQL 2005 Express edition with Reporting Services you have to have IIS properly installed. It's not enough to just install it and be happy about it, you'll have to enable some services for it to.

Otherwise you'll get a warning in the System Configuration Checker of the SQL setup: "Microsoft Internet Information Services (IIS) is either not installed or is disabled."

 KB920201 has the details on what you have to install. And don't forget to use the SP2 version of SQL Server.

 
Thursday, April 19, 2007 9:06:42 PM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -
Operating Systems | Programming
 Tuesday, March 27, 2007

For some idiotic reason (marketing) several server manufacturers insist on putting a self-promoting default wallpaper on the Windows installation making a remote desktop connection unnessecarily slow for the initial connect. Run the attached .reg file to remove the wallpaper for the default user. If you don't trust files downloaded from the Internet, copy the following text, paste into an empty notepad document, save as "RemoveWallpaper.reg" (or something similar) and run the file (double-click it).

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"Wallpaper"=""

[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"=""

RemoveWallpaper.reg (,32 KB)

 
Tuesday, March 27, 2007 12:55:44 PM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -
Administration
 Thursday, March 01, 2007

In my previous post I had a quote and I wanted that to stand out from the text. So I added <blockquote>...</blockquote> around my text and with CSS added a dashed line but something was missing... So I made a quote mark. But it didn't look that nice inside the border. I wanted it outside the border. In order to get that I have to have an element around the quote div. And I wanted an end quote as well so that meant another div...

<div class=outerQuote>
 <div class=centerQuote>
  <blockquote>
   ...
  </blockquote>
 </div>
</div>

Not particularly pretty, certainly not semantic code and mixing content and presentation like this is so Web 1.0... But I recently read about JQuery, a lightweight framework that makes it really easy to manipulate the DOM.

I won't bother with the details on downloading, installing and setting up JQuery, it's really easy and very well explained already, but I thought I might share the code for making my quotes:

$("blockquote").wrap('<div class="outerQuote"><div class="centerQuote"></div></div>');

There, that wasn't very hard, was it? In plain English it is "find a blockquote and wrap it in the two divs specified". In my source, I only have one <blockquote> element, only JavaScript enabled clients will see the other divs and it degrades nicely. Perfect!

For the interested, here is the CSS used for the quotes:

blockquote {
 margin: 0 0;
 padding: 0 5px 0 5px;
 border: dashed 1px #666;
}
.outerQuote {
 margin: -10px 20px -10px 20px;
 background: url("quote.png") no-repeat;
}
.centerQuote {
 padding: 10px 10px;
 background: url("quote-end.png") no-repeat bottom right;
}

The images are quote.png and quote-end.png

According to their own website, JQuery is...

...a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

If you do any javascript programming you should really check it out, it will make your life easier! (see how nice my quotes turned out :-) )

The JQuery code, the CSS code and the two quote images presented here are created by me and hereby released into the public domain. That means you can take them and do whatever you want with them. If you'd like to give me credit or drop me a note saying that you found it usefull, that would be appreciated but is not required.

The rest of the text is copyrighted by me and is not released into the public domain but released under a Creative Commons license.

 
Thursday, March 01, 2007 8:33:54 PM (Central Europe Standard Time, UTC+01:00)  #    Comments [2] -

In these times we often hear that Islam is a hostile religion, that the Qur'ān teaches that all non-believers should be killed. Well, I haven't read the Qur'an my self, but I found an interesting quote in sura 60, verse 8 and 9:

GOD does not enjoin you from befriending those who do not fight you because of religion, and do not evict you from your homes. You may befriend them and be equitable towards them. GOD loves the equitable.

GOD enjoins you only from befriending those who fight you because of religion, evict you from your homes, and band together with others to banish you. You shall not befriend them. Those who befriend them are the transgressors.

In other words, you may befrend those who are not hostile to you but you shall not befrend those who are not. Seems reasonable enough?

Sura 60, verse 8

 
Thursday, March 01, 2007 7:14:48 PM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -

 Monday, February 26, 2007

I wanted to set up an IIS 6.0 application pool for an ASP.NET application and I wanted it to run under a separate local user account. I created the pool and set the correct identity but when I opened the web all I got was a big and ugly "Service Unavailable" message.

In the eventlog I got this message:

Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1021
Description:
The identity of application pool, 'NewAppPool' is invalid.  If it remains invalid when the first request for the application pool is processed, the application pool will be disabled.  The data field contains the error number.

It turned out I had forgotten to make the user a member of the IIS Worker Process Group (IIS_WPG) which provides the minimum set of privileges and permissions required to start and run a worker process on a Web server.

 
Monday, February 26, 2007 12:34:30 PM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -

 Saturday, February 03, 2007

IE7 og Firefox har et søkefelt oppe i høyre hjørne. Der kan man bl.a. søke på MSN Live eller i Google. Men man kan også bruke det til andre søketjenester. Her er to lenker som legger til Telefonkatalogen og Gule Sider:

Klikk på lenkene over. Du får opp en dialog boks som spør om du vil installere de, godta den. Så kan du trykke på den lille pilen ved siden av forstørrelsesglasset oppe til høyre og velge de fra listen.

Noen andre søkemotorer som jeg liker å bruke:

 
Saturday, February 03, 2007 11:38:21 AM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -
Internet
 Thursday, January 11, 2007

Our primary DNS server changed it's IP yesterday and we had a secondary DNS server with several domains that needed to have the IP for the master server updated. Windows' gift and curse is that you don't have a bunch of text files where you can find everything but manually opening the properties of every domain, removing the previous master IP, adding a new IP and moving on to the next domain was just not an option.

That's why we have Windows Management Instrumentation (WMI). For an administrator it's the best thing that's happened since they started slicing bread. Well, not quite, but if you intend to do some serious administration of Windows servers you'd better look into it. If you don't like looking through a bunch of documentation for figure out what to do, use Scriptomatic 2.0 like I did yesterday. It will generate a basic script for you that can easily be modified.

Now, the main event: a script to update the master server IP for all secondary DNS zones on a Windows computer.

  1. ' This script updates the Master server IP for all secondary zones on the
  2. ' specifed computers.
  3.  
  4. ' Constants for WMI
  5. Const wbemFlagReturnWhenComplete = &H0
  6. Const wbemFlagReturnImmediately = &h10
  7. Const wbemFlagForwardOnly = &h20
  8. Const iDnsSecondary = 2
  9.  
  10.  
  11. ' The array to hold the master servers
  12. ' (there can be multiple master servers)
  13. Dim MasterServersArray(0)
  14. ' Add the master servers to the array. Replace with your own IP
  15. MasterServersArray(0) = "192.168.2.10"
  16.  
  17. ' The address of the old master server, replace with your own IP
  18. ' Used to check the zone and only update those that need it.
  19. Dim strOldMasterServer
  20. strOldMasterServer = "10.0.0.10"
  21. ' The script can do this on multiple computers,
  22. ' just add them to the array
  23. Dim arrComputers
  24. arrComputers = Array("COMPUTERNAME")
  25.  
  26. Dim objWMIService
  27. Dim colItems
  28. Dim objItem
  29.  
  30. For Each strComputer In arrComputers
  31.         WScript.Echo
  32.         WScript.Echo "=========================================="
  33.         WScript.Echo "Computer: " & strComputer
  34.         WScript.Echo "=========================================="
  35.        
  36.         WScript.Echo "Fetching zones..."
  37.         ' Connect to the DNS WMI interface on the current computer
  38.         Set objWMIService = GetObject("winmgmts:\\" & strComputer _
  39.                 & "\root\MicrosoftDNS")
  40.  
  41.         ' Get all zones from the DNS server. We use wbemFlagReturnWhenComplete
  42.         ' to make sure the call completes before returning. If not we often get
  43.         ' errors when looping through the returned collection. If you only want 
  44.         ' some zones to be updated you can filter your query just like any SQL query.
  45.         Set colItems = objWMIService.ExecQuery("SELECT * FROM MicrosoftDNS_Zone", _
  46.                 "WQL", wbemFlagReturnWhenComplete + wbemFlagForwardOnly)
  47.         WScript.Echo "Retrieved zones."
  48.  
  49.         ' Used to hold a return object.
  50.         dim objTmp
  51.  
  52.         For Each objItem In colItems
  53.           ' Only secondary zones have master servers
  54.           if objItem.ZoneType = iDnsSecondary then     
  55.                 ' Get the current master IPs 
  56.                         strMastersIPAddressesArray = Join(objItem.MastersIPAddressesArray, ",")
  57.                        
  58.                         ' Some information
  59.                         WScript.Echo "Name: " & objItem.Name
  60.                         WScript.Echo "MastersIPAddressesArray: " & strMastersIPAddressesArray
  61.  
  62.                         ' We'll only do this in the zones with the old master server
  63.                         ' No need to update zones that don't need it.
  64.                         if strMastersIPAddressesArray = strOldMasterServer then
  65.                           ' ResetMasterIpArray is a function on the WMI object
  66.                           ' that replacesthe current array of Master IPs.
  67.                           ' objTemp receives a refrence to the updated zone.
  68.                           objItem.ResetMasterIpArray MasterServersArray, objTemp
  69.                           ' We don't need it so we set it to nothing
  70.                           ' immediatly to save memory
  71.                           set objTemp = nothing
  72.                           WScript.Echo
  73.                         end If
  74.                         ' Let's just make the secondary zone refresh from
  75.                         ' the master server while we're at it
  76.                         objItem.ForceRefreshOfSecondaryZoneFromMaster()
  77.           end if
  78.         Next
  79. Next
UpdateMasterServerIP.vbs (2,82 KB)
 
Thursday, January 11, 2007 9:39:17 AM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -
Administration | Scripting

This isn't funny unless you're from Norway, but if you are it's absolutely hilarious!!

Last summer four artists got together and sang "Hallelujah" and reaped in the cash, this is a parody of them.

 
Thursday, January 11, 2007 9:34:38 AM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -
Videos | Funny
Links
Twitter updates
    Archive
    <April 2007>
    SunMonTueWedThuFriSat
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    293012345
    About the author/Disclaimer

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright 2010
    Glenn F. Henriksen
    Sign In
    Statistics
    Total Posts: 48
    This Year: 0
    This Month: 0
    This Week: 0
    Comments: 31
    All Content © 2010, Glenn F. Henriksen
    DasBlog theme 'Business' created by Christoph De Baene (delarou)