Archive
Discount coupon for Application lifecycle management
Get a 40% discount off this book “Professional Application Lifecycle management” by quoting ALMVS to Jeffry Parker at jparker@wiley.com
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
http://www.microsoft.com/DownLoads/en/details.aspx?familyid=56fc92ee-a71a-4c73-b628-ade629c89499&displaylang=en
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.
Make a HTTP request from SQL server
**Update**
A better approach is listed here: https://blog.dotnetframework.org/2019/09/17/make-a-http-request-from-sqlserver-using-a-clr-udf/
Here is a UDF that allows HTTP GET requests from SQL server, for example
select dbo.GetHttp(‘http://fiachsapp.appspot.com/’)
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;
GO
RECONFIGURE;
GO
sp_configure ‘Ole Automation Procedures’, 1;
GO
RECONFIGURE;
GO
Alter function GetHttp
(
@url varchar(8000)
)
returns varchar(8000)
as
BEGIN
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
END