Pages

Saturday, August 8, 2015

I just hate it when I open a text file in notepad and find out its a Unix file with no \r\n to make it render correctly in the Windows/DOS world. I found this really simple DOS command to solve the problem:

Monday, July 27, 2015

For the longest time, I've been applying IP whitelisting to an entire website in IIS. But lately, I've been wanting to just apply it to a specific asmx file in the site, while keeping the rest unrestricted. After doing some research, it seems that this can be simply done in IIS 6.0 by right-clicking on the asmx file and choosing File Security.

But with Windows 2012 Server and its built-in IIS 8.5, it gets a little more complicated. First, you have to install the IP Security feature from Server Manager if it is not yet installed:

From my experience with Softlayer, their bare metal installation somehow does not have this feature pre-installed. But with my Cloud Server, all Web Server options were pre-installed. From IIS Manager, go to Content View; right-click the asmx file you want to protect and select Switch to Features View. Then open IP Address and Domain Restriction.

Saturday, April 11, 2015

I'm still doing ongoing debugging of my recent migration from Windows Server 2003 to 2012. I have an ASP.NET code that really takes a long time to process. It works fine with 2003. But when I migrated to 2012, ASP.NET 4.0 is returning an:

[HttpException (0x80004005): Request timed out.]
after about 2 mins into the process. I'm following the advise here:

Sunday, April 5, 2015

I've been using Turnkey Linux file server for a few years and I think it is an excellent appliance software. But my hard drive recently crashed and I had to reinstall. I only got around now to try and create user accounts but couldn't remember what I set the login password as. I tried all the usually suspects but none work.

After reading a few sites at Google, I finally found this tip that worked:

I migrated the secondary server from Windows 2003 Standard 32-bit to Windows 2012 R2 64-bit since Win2003 is not supported anymore and it cannot handle SHA-2 SSL. While my previous attempt to do the same on the virtual server went through like a breeze, doing it on the bare metal server took way much longer than I expected.

After loading the programs, got tons of IIS errors. I did several tests and eventually came to the conclusion that the problem was .NET 4.5 was installed prior to installing IIS. So it has to be reconfigured in order for IIS to recognize it. In the old days, it was just a simple call of aspnet_regiis.exe. But it looks like Win2012 does not support that anymore. Instead, it uses something called dism. This link solved it -- http://support.microsoft.com/en-us/kb/2736284.

The above command also correctly installed the ASP.NET State Service.

When the components look like they are working, I tried making test transactions. I was getting some weird error message that I've never seen before. After doing some Google research, and inserting lots of debug tracers, it turns out that Windows 2012 has IPv6 enabled by default. So the Request.UserAddress was returning an IPv6 address instead of an IPv4 which, in turn, causes problem with the call to GeoIP. The coding suggestion here worked -- http://www.4guysfromrolla.com/articles/071807-1.aspx.

Then I installed the SMTP Server but could not log into it no matter what settings I was doing on the Firewall. Then I remembered having this same problem a long time ago! Its the McAfee Virus Scan that came with the bare metal server which was blocking SMTP access. The virtual server does not come with McAfee so I did not have such problem. Disabled spam checking at McAfee solved that.

Saturday, March 14, 2015

With Microsoft's impending end-of-life support for Windows 2003 and all the recent SSL attacks, it looks like moving to SHA-2, TLS1.x, etc. is inevitable. I've previously had an impossible time getting Dragonpay to work correctly on Windows 2008 R2 64-bit at Softlayer. But this time around, when I had the OS reloaded for Windows 2012 64-bit, it was surprisingly smooth. Granted that it took a little bit of getting used to the new interface, but it wasn't that much different from Windows 2008.

Figuring out where to find the SMTP service took a bit more of a challenge but I found this incredible and very detailed step-by-step guide that worked perfectly: