trying to connect to MSSQL server using named pipe in HeidiSQL
Try following:


Enable Named pipes visa configuration manager

Restart particular SQL Service
Have a look at SQL log (recent entries after restart), it must state the named pipe is ready without any error (as showed screenshot below)

If SQL error log looks good, try again with named pipe, make sure the hostname match with named pipe (configured in step:1)



If still no luck, you may proceed with TCP/IP protocol, just make sure you are able to do telnet localhost 1433 to be sure the TCP/IP is enable and ready for connections. If any issue, you can follow Step 1 and 2 for enabling TCP/IP, and add a New Rule at Windows Firewall to accept incoming connections on SQL Port# (default: 1433). 

Additional steps for custom port configuration