Monday, 31 July 2017

HTTP Error 503 When Enabling 32-Bits Application in IIS

When enabling the 32-bits application mode in IIS, the application pool stops and and generate HTTP Error 503 indicating that the service is not available.

The problem might be due to corrupted IIS URL Rewrite module or incompatibility of the versions due to server upgrade. To resolve this issue, un-install the URL Rewrite module and re-install it again.


Resolve HTTP Error 500.19 - 0x8007007e

To fix this, disable the WSUS compression by running the following command on the server:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']

To enable WSUS compression again by running this command:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+[name='xpress',doStaticCompression='false',dll='%windir%\system32\inetsrv\suscomp.dll']


Wednesday, 28 June 2017

SQL Server - HTML to TEXT

CREATE FUNCTION [dbo].[HTMLtoText] (@HTMLText VARCHAR(MAX))
RETURNS VARCHAR(MAX) AS

BEGIN
DECLARE @Start INT
DECLARE @End INT
DECLARE @Length INT
SET @Start = CHARINDEX('<',@HTMLText) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText)) 
SET @Length = (@End - @Start) + 1 WHILE @Start > 0
AND @End > 0
AND @Length > 0
BEGIN
SET @HTMLText = STUFF(@HTMLText,@Start,@Length,'')
SET @Start = CHARINDEX('<',@HTMLText) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText))
SET @Length = (@End - @Start) + 1
END
  RETURN LTRIM(RTRIM(@HTMLText))
END
GO

Command to Test:
SELECT dbo.HTMLtoText('<h1>Everything is possible, nothing is <span style="color: red"><b>impossible.</b> </span>:)</h1>')


Tuesday, 27 June 2017

C# ASP.NET Rich Text Box/Editor

The most-used free ASP.NET WYSIWYG HTML editor featured in open source and commercial projects more...


Friday, 26 May 2017

Register ASP.NET 4.x

Dialog box may be displayed to users when opening projects in Microsoft Visual Studio after installation of Microsoft .NET Framework 4.6 more...


Sunday, 30 April 2017

Calling ASP.Net Code Behind using jQuery AJAX

Ajax (Asynchronous Javascript and XML) is a technique of sending the request and receiving the response from the server without reloading the entire page. To avoid PostBack call in C# ASP .Net, we can use jQuery Ajax to call code behind more…


Friday, 7 April 2017

How to Reset Your Forgotten Windows Password the Easy Way

Forgetting Windows password is never any fun, but there’s a easy way to reset the password. All you need to do is to follow the below steps: 
  1. Boot your PC from Windows disk
  2. Select the "Repair Your Computer"
    image
  3. Go to "Command Prompt"
    image
  4. Backup the original sticky keys file: 
    copy c:\windows\system32\sethc.exe c:\
  5. Copy the command prompt executable (cmd.exe) over top of the sticky keys executable
    copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exeimage
  6. Restart the PC
  7. Once you get to the login screen, hit the Shift key 5 times, and you’ll see an administrator mode command promptimage
  8. Use the following command, replacing the username and password with the combination you want to reset the user password:
    net user geek <NewPassword>
    image
  9. Put the original sethc.exe file back, which you can do by rebooting into the installation CD, opening the command prompt, and copying the c:\sethc.exe file back to
    c:\windows\system32\sethc.exe

  • NOTE: If the local account is not exist, issue the following commands to create it:
    net user <username> /add
    net 
    localgroup administrators <username> /add

Analysis Service in Power BI Report Server

 We couldn’t connect to the Analysis Services server. Make sure you’ve entered the connection string correctly... link