Restrict IIS to listen only on X IP Address. Allowing you to co-run with TomCat/Apache on port 80 with IIS on port 80

 

Long title I know. So your running IIS on your server and serving up websites on port 80.  You also have some third party program that’s running on Tomcat. Maybe like Atlassian products like Jira or Confluence. However they have to run on ports like 8088 or 8443 for SSL because TomCat can bind the port numbers but cannot use port 80 because IIS hogs that up on all your IP addresses.

Assuming your server has more then one IP you can limit IIS to only bind on a single IP and then in TomCat’s config you can limit it’s binding IP to the other. (Technically you’re not limiting IIS you’re limiting the http web protocol that IIS uses).

 

Open a command prompt as an administrator

Show which IP Address IIS is listening/binding too with this command.

netsh http show iplisten

Then limit IIS to listen/bind certain IP address with this command

netsh http add iplisten xxx.xxx.x.x

Reboot the server (You could try restarting http service but that doesn’t always show up in services and it’s a pain. Easier to reboot).

Run the listen command again and you should that the restricted IP is no longer in the list. You’re now free to use that IP for TomCat or some other service and bind to port 80 and 443.

Getting Passive FTP to work with Windows Advanced Firewall and Gene6FTP G6FTP Server

Many administrators have trouble with getting passive working. There is a good article over on TechNet (http://technet.microsoft.com/en-us/library/dd421710(v=ws.10).aspx) that works well if you’re using the local FTP services built into IIS.

There are slight modifications if you are using Gene6FTP Server.

 

The only thing you really have to do is add G6FTPServer.exe to the allowed programs inbound rules. Assuming your outbound is always “allow”.

New Inbound Rule, Program, point to C:\Program Files (x86)\Gene6 FTP Server\G6FTPServer.exe

That should fix your Passive (PASV) mode.

If you want to limit what ports to use, you can right click on the domain and properties.  Under “IP binding” you can limit what ports to use.

 

Without this, you will get errors such as in Visual Studio when trying to use FTP, that a connection failed due to 425 error.  Or Can’t open a data connection (425).

Getting Out of Memory Exception when you have plenty of Memory/RAM available

 

This is a great article on why having or adding more memory won’t fix your Out of Memory Exception.   Bottom line.. on a 32bit server you’re site will crash when it hits between 600MB and 800MB.  The amount varies based on what else is going on with the machine.   The solution? Basically, you have to upgrade to a 64bit OS or re-write your application.

 

Why adding more memory won’t fix your Out of Memory error by Edge

Copied from the article directly, in case it ever goes down.

-------------------------------------------

Here an interesting case. Consider there 2 scenarios:

Both are running the same website, both have the same amount of users connected.

Now imagine this website has a page to upload pictures, just like any regular photo-album website.

For some reason, at some point the users complain that they see an error page indicating out of memory error.

So, you wonder: How come? they are just uploading a photo to my website, and I still have plenty of memory in my server anyway.

Anyhow, you stop thinking about this and go for the easiest, quick and dirty solution: If the system tells me that my computer does not have enough memory then I just need to add more memory. Right?

And guess what? you still will get the error message.

That's a very common mistake. Having a machine with 10GB of memory does not mean you will have 10GB of memory available. I explain.

It does not matter if your computer or server has 512 MB, 1 GB, 2 GB, 4 GB or 8 GB of RAM. If your machine is a 32-bit machine it will only be able to see/manage 4 GB. That's mathematics, that's life, that's the way things are and you can't do nothing about it. A 32-bit machine can not do more than that.

Additional memory may increase your system performance, but it won't increase the memory availability. Sure your computer will use less the hard disk for swapping operations and will be able put more stuff in memory and start some programs faster, but 4GB is the limit; after this point the memory management module will start doing disk swap and to use the famous page file.

And here comes more bad news: Your Windows system on a 32-bit machine requires 2 GB allocated only for it.

So, if you have 4 GB installed, effectively you will have 2 GB only for applications; your windows will be using alone 2 GB.

So, what does out of memory means?

Well, according to some people at Microsoft, this limit for an average configuration is reached between 600 MB and 800 MB of utilization. That 800 number is NOT A RULE, is a baseline. Generally speaking the largest majority of configurations with website, .NET and SQL Server database might have a problem around this point. Of course, this can vary from system to system...as a matter of fact a system can be out of memory at just 600 MB.

Yes, it does sounds crazy. You look so happy now that you just bought a 4GB RAM notebook and your computer is breaking with just 800MB, hun?

Here is another point for you. Have you ever seen someone bragging that he/she bought a 10-megapixel camera and now he/she believes their pictures are going to be better because of this?

Well, guess what? Just like the number of megapixels in a camera box does not have much to do with picture quality, RAM memory does not have much to do with hard disk space.

That's a common mistake: People buy RAM as if they were buying a hard disk.

RAM usage needs to me continuous, unlike hard disk. A simple 5MB Microsoft Word document when saved in a hard disk can be split up in hundreds of pieces; When you open this file in memory, the RAM requires those 5MB to be allocated continuously.

Can you see now the reason for the 'out of memory' message?

Yes, it really means 'there is not enough continuous memory to place that file in memory'. Your system might have 2GB of RAM but unfortunately it might be too busy with stuff running and there is no enough continuous memory to put the picture you are uploading.

Yeah, you can not do much but you can buy a 64-bit machine then when you add more memory you can really use it more efficiently. And yes, we have Microsoft Windows systems for 64-bit machines.

If you do not want to buy a new system of upgrade you current server to a better version then you should think other solutions in the business process, such as to avoid users upload pictures with more than 1 MB in size to be uploaded.

The Add-in ‘xxxx' failed to load or caused an exception in SQL Management Studio

 

And clicking on Yes to remove it, doesn’t help.  This is actually a permission issue from Vista and Windows 7 and up.

 

The service pack update to Windows Vista has been known to change permissions to the registry in a way that prevents user access to the information about installed classes: HKEY_CLASSES_ROOT. This prevents SQL Server Management Studio from loading the add-ins into the environment.


To correct this problem, it's necessary to assign permissions to the registry for the logged-in user.

  1. First open the Registry Editor (regedit.exe) using the "Run As Administrator" option.
  2. Right-click HKEY_CLASSES_ROOT and select "Permissions", and give the logged-in user full control.
  3. The following permissions needed to be added to HKEY_CLASSES_ROOT as well:
           -Users: read
           -System: full control
           -CREATOR OWNER: full control on subkeys only

Change Binding Order on Network Adapters for Windows 7

 

Good article on ordering the binding of your network adapters.  You can have your PC make sure it uses Wired over Wireless if you have both, or IP4 over IP6 if you have both.

Source: http://www.techrena.net/windows/view-change-network-adapter-card-priority-binding-order-windows-7/

Article has steps to check the current priority as well.

Changing Network Cards Priority in Windows:

You can change the network card priority in two ways in Windows:

Method #1:

To start with, I’ll introduce you the easier method first:

1. Go to Control Panel > Network and Internet (View network status and tasks)> Change adapter settings and now you will now be in “Network Connections” window.

image

2. Now press Alt button and a hidden menu will appear beneath the location bar.

image

3. Under the Advanced menu, click “Advanced Settings”.

image

4. You can now see the order of preference in which the connections are accessed by network services.

image

Use “Up” and “Down” buttons to move a network connection either up or down and thus changing the order of priority of connections.

Method #2:

And now let me introduce you the second alternative method, which is a bit laborious when compared to the first one:

1. Go to the “Network Connections” window by following the step 1 as detailed in the above step.

2. Right-click on the network connections for which you want to change the priority order and choose “Properties”. In my case, I wanted to change the interface metric for my wireless network card and hence I will proceed with the changing priority order for Wireless Network Connection under my network connections.

image

3. Now choose “Internet protocol Version 4 (TCP/IPv4)” and click on “Properties” button.

image

image

Click on “Advanced..” button in the IPv4 properties window.

4. Look for the “Automatic metric” option in the advanced TCP/IP settings window.

image

5. Uncheck against the “Automatic metric” option and enter some value other than 1 in the filed against “Interface metric” (as 1 will always be assigned to Microsoft Loopback adapter always) as shown:

image

Click OK and close all the windows.

You have now changed the priority of your network card interfaces.

Slow Remote Desktop

These are the commands I ran to speed up Remote Desktop. Article is for Vista, but it applies to Windows 7 as well.  Run commands locally even if it’s just a particular server that is slow. Which makes you think it’s that server and not your machine.

Not sure if it applies to XP.

- Run a command prompt (cmd.exe) as an Administrator
- Type: netsh interface tcp set global autotuninglevel=disabled
Disable the autotunning feature in Vista completely, and fit and lock the RWIN receive window to default value 65536 bytes.
If you want to to re-enable it:
- Type: netsh interface tcp set global autotuninglevel=normal
In some cases you may need to use this command in addition to the above, but I didn't have to:
- Type: netsh interface tcp set global rss=disabled
Update! This command makes your network connection EVEN FASTER
Type: netsh interface tcp set global autotuninglevel=highlyrestricted
The reason is that this command will still "auto tune" your TCP connections, but not as drastically as 'normal' mode. It will allow the receive window to grow beyond the default value, but again it will do so very conservatively.

Source: http://blog.tmcnet.com/blog/tom-keating/microsoft/remote-desktop-slow-problem-solved.asp

$35 laptop prototype or something from India coming soon! (Update)

 

India is about to put out a computer that’s only $35!! Crazy!  Then drop the price to $10 a unit as it sells. Don’t know what the stats are other then it’s a Linux based machine but I’d buy 10 of them.

From the picture it kind of looks like a wallet and flexible.  Who’s been smudging up my screen!

“India has unveiled a $35 computer prototype as part of its program to provide connectivity to its students and teachers at affordable prices.”

“The ministry said the price would gradually fall to $10 a piece.”

“The Linux-based computer is equipped with an Internet browser, a PDF reader and several other facilities…”

Source: http://www.cnn.com/2010/WORLD/asiapcf/07/23/india.thirty.five.dollar.laptop/

 

Indian government minister Kapil Sibal unveils a prototype of the $35 computer.

 

Update:

Looks like it’s still in progress and more legit then the original post. http://news.cnet.com/8301-17938_105-20013370-1.html

 

  • OS: It was changed from Linux to Android.
  • Virtual Keyboard
  • Camera
  • Full Video Capability
  • Wi-Fi
  • 2GB Ram
  • Scheduled for Mid-2011

How to enable Dreamscene or Video Wallpaper in Windows 7

 

Original Post Here

Dreamscene was a feature introduced in Windows Vista that allowed users to have video wallpapers in the background. Microsoft seems to have replaced the Dreamscene feature from Vista with automatic changing wallpapers in Windows 7.  However by adding the Dreamscene files and making a few registry changes, Dreamscene can once again be enabled. Don’t worry if that sounded intimidating, we do have a file that does all for you [if you're on 32-bit.]

Note: I was unsuccessful in getting this to work on 64-bit Windows 7 Build 7048.

Installing Dreamscene:

1) First, you need to have Aero enabled. You’ll know Aero is enabled if you’re able to preview windows in your taskbar, use Aero Peek, or see the animation effects of windows minimizing. If you think Aero isn’t enabled, open the Start menu, and type in Aero.

How to enable dreamscene in Windows 7

Click on Find and fix problems with transparency and other visual effects and go through the wizard. The wizard will determine whether your computer is capable of having Aero on.

2) If you’re on 32-bit Windows 7, download the Windows 7 Dreamscene patch here

If you’re on 64-bit Windows 7, download this patch and follow the instructions in Important Readme.txt
Then skip Step 3.

3) Run the patch and let it do it’s thing. When it’s finished, explorer.exe will restart.
If it doesn’t restart, press Ctrl + Alt + Delete and click on Task Manager. Right click on explorer.exe and click on End Task. Then click on File, New Task, type in explorer.exe and press OK.

Setting video clips as your desktop background

4) Before you start adding videos, you need to make sure that your videos are in .wmv or .mpg format. If they are not one of those formats, you can download a free video converter here.

Converting a video is simple. Choose Add Video at the top left corner and choose your video of choice. The drop down-menu in the right side-bar will allow you to choose your codec. On my computer, .wmv videos worked properly while .mpg videos would not work with Dreamscene.

The bottom portion of the sidebar will allow you to change the video size or bitrate. If you are not sure what those options do, the only one you should worry about is video sizesince some videos may end up being too large and get cut off the screen.

How to enable Dreamscene or Video Wallpaper in Windows 7

When the video is finished converting, a new window will pop up. Right click your video and choose Open Destination File Location to locate the video. You can also access your converted videos at this directory:
C:\users\%username%\Documents\Any Video Converter\

How to enable Dreamscene or Video Wallpaper in Windows 7

Once you have converted the file, just right-click and select Set as Desktop Background and Dreamscene will begin to work.

Should you want to revert back to a stationery wallpaper, sometimes the stopped video will stay frozen as your wallpaper. To fix this, press Ctrl + Alt + Delete and click on Task Manager. Right click on explorer.exe and click on End Task. Then click on File, New Task, type in explorer.exe and press OK.

Note: Desktop icon text will become transparent sometimes. This is a bug that has yet to be fixed.

Windows 7 Genuine Validation Fails on Genuine Install

 

I was having problems trying to download XPMode because the website tries to validate your Windows 7 operation system.  Even though I activated successfully and I ran the MGA Diagnostic Tool locally and it said Genuine. It still failed the online check.

image

I even called Microsoft to see if they could figure it out. No luck. They tried the obvious stuff, re-entering my product key, re-activating.  They couldn’t figure it out. Even gave me a new product key and still no luck.  Then I told them I had to go.

Found the answer on my own..

I was getting Event Errors in my Application Log.

Source: CAPI2
Event ID: 257

The Cryptographic Services service failed to initialize the Catalog Database. The ESENT error was: -1011.

Then I caught online something on bypassing XP Genuine has to do with the Cryptographic services. Putting two and two together, I figured this error was the source of my problem.

After a little digging I found this article which gave me steps to wipe out my System Catalog Database. 

This fixed my error and allowed me to validate my windows online.

  1. Click Start, point to Administrative Tools, and then click Services.
  2. Right-click Cryptographic Services, and then click Stop.
  3. Click Start, and then click Computer.
  4. Navigate to %systemroot%\System32.

    By default, %systemroot% is located at C:\Windows.

  5. Rename the catroot2 folder to catroot2.old.
  6. In the Services snap-in console, right-click Cryptographic Services, and then click Start.