Windows Firewall–Block Foreign IP Addresses

If you admin any Windows Server and use tcpview utility, you will see lots of connection attempts to your server’s common connection ports (e.g. Remote Desktop port 3389).

It is a good idea to block connection attempts from foreign countries if you don’t expect to connect from abroad.

http://cyber-defense.sans.org/blog/2011/10/25/windows-firewall-script-block-addresses-network-ranges

Advertisements

ASP.NET MVC http://xxxx.com/CoM1 HTTP 404

Problem:

http://xxxx.com/CoM1 does not route properly. 

I gets a HTTP 404 error. 

The Requested URL: /CoM1

Cause:

It turns out “COM1” is reserved by default.  The list of reserved URL include: COM1-9, LPT1-9, AUX, PRT, NUL, CON.

Fix:

Add “relaxedUrlToFileSystemMapping” attribute to the web.config httpRuntime.

   1: <system.web>

   2:     ...

   3:   

   4:   <!-- 10/4/2016 HW: relax the Url to FileSystem Mapping so we can use http://xxxx.com/CoM1 .  Otherwise, it treats COM1 as the special COM port 1 -->

   5:   <httpRuntime targetFramework="4.5.1" relaxedUrlToFileSystemMapping="true" />

   6: </system.web>

 

Reference:

http://haacked.com/archive/2010/04/29/allowing-reserved-filenames-in-URLs.aspx/