Archive for September, 2010

Discount coupon for Application lifecycle management

Get a 40% discount off this book “Professional Application Lifecycle management” by quoting ALMVS to Jeffry Parker at

Categories: Uncategorized

Change the framework version without restarting the W3SVC service

When changing the .NET version on the ASP.NET tab of IIS, this popup appears, asking to restart IIS, or run aspnet_regis -norestart to change the scriptmap without restarting.

1. Download metabase explorer, as part of the IIS6 resource kit here

2.  Run Metabase explorer, Select LM then W3SVC

3. Find the ID that matches the site you want to upgrade

4. Go to C:WINDOWSMicrosoft.NETFrameworkv4.0.30319 with Command Prompt

5. type aspnet_regiis.exe -norestart -s W3SVC/<ID>/ROOT where <ID> is from step 4.

6. Clicking the ASP.NET tab in IIS, it should now be .NET 4.

Categories: Uncategorized

Make a HTTP request from SQL server


A better approach is listed here:


Here is a UDF that allows HTTP GET requests from SQL server, for example
select dbo.GetHttp(‘;)

A few “Gotcha’s” are;
* The HTML Content must be less than 8000 bytes, otherwise you get the error:

  0x8004271A ODSOLE Extended Procedure    Error in srv_convert.

* The COM object WinHttp.WinHttpRequest.5.1 must be installed on the server, some typical variations are WinHttp.WinHttpRequest.5
and WinHttp.WinHttpRequest. A search for the CLSID in Regedit should find the one you are using.

* You have to enable OLE Automation on the SQL server as follows;
sp_configure ‘show advanced options’, 1;
sp_configure ‘Ole Automation Procedures’, 1;

Alter function GetHttp
@url varchar(8000)
returns varchar(8000)
DECLARE @win int
DECLARE @hr  int
DECLARE @text varchar(8000)

EXEC @hr=sp_OACreate ‘WinHttp.WinHttpRequest.5.1’,@win OUT
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAMethod @win, ‘Open’,NULL,’GET’,@url,’false’
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAMethod @win,’Send’
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OAGetProperty @win,’ResponseText’,@text OUTPUT
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

EXEC @hr=sp_OADestroy @win
IF @hr <> 0 EXEC sp_OAGetErrorInfo @win

RETURN @text


Categories: Uncategorized
%d bloggers like this: