How To – SmarterMail on a 64 bit server with ASP.NET 2.0
Applies to: SmarterMail (all versions)
When the SmarterMail Service (mailservice.exe) is running in 64 bit mode, it is incompatible with IIS running in 32 bit mode. When running the webmail of SmarterMail under IIS a “Bad Data” exception may appear.
Bad Data.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: Bad Data.
There are several options available to remedy this situation.
Option 1: Switch IIS to run in 64 bit mode
Verify that the web site is running as an ASP.Net 2.0 web site by going to the properties for the site and clicking on the ASP.Net tab.
Click Start, click Run, type cmd, and then click OK
Type the following command on one line to disable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.
Please note that performing these steps will result in IIS running in 64-bit mode. If you have other ASP.Net sites running on the server, ensure that they are compatible with 64-bit mode and are not running ASP.Net 1.1 before making changes.
Once the SDK has been installed, use the corflags.exe program to force the SmarterMail service to run in 32 bit mode. With the following command. Replace <executable> with the path to the mailservice.exe file.
corflags.exe <executable> /32BIT+
To reverse this operation, perform the following command. Once again, replace <executable> with the path to the mailservice.exe file.
Until the release of SP1 from Parallel’s, for Virtuozzo 3.5.1, you were not able to use either a VPN client or RRAS (as it depends on a VPN). If you attempted to do so, you’ve no doubt encountered the error below;
However if you do have the SP1 service pack installed for Virtuozzo 3.5.1 installed or your host for your VPS does, you can enable it.
To do so, you must log onto the vps node/cluster (if you are leasing your vps, you will need to have the host do so). Once on the node, you must enabled the VPN access by doing the following;
C:\vzctl set %veid% –vpn on –save. Make sure you replace %veid% with the ID of the vps. If successful, if will reply back with Command ’set’ is successfully finished. Once this is done, you will need to restart the vps.
Once that is done, you can test the VPN by typing the following, on the vps node;
vzlist -o nettype 101
It will reply back with;
NETTYPE
routed+vpn
If you ever need to disable the VPN, you simply need to type “vzctl set %veid% –vpn off –save”.
Please note this only supports Microsoft VPN clients only!
To have SSL 3.0 on a windows server, you will first needs to disable the other protocols running. Normally this means disabling SSL 2.0, which is outdated and is suggested that you disable if you are trying to lock down your windows server or have been told so via a security scan.
To disable SSL 2.0:
1. Click Start, click Run, type regedt32 or type regedit, and then click OK.
2. In Registry Editor, locate the following registry key:
HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\SSL 2.0\Server
3. On the Edit menu, click Add Value.
4. In the Data Type list, click DWORD.
5. In the Value Name box, type Enabled, and then click OK.
*Note* If this value is present, double-click the value to edit its current value
6. Type 00000000 in Binary Editor to set the value of the new key equal to “0″.
7. Click OK. Restart the computer.
You may find that you also need to disable PCT 1.0 as well, but by default this not installed in Windows.
1. Click Start, click Run, type regedt32 or type regedit, and then click OK.
2. In Registry Editor, locate the following registry key: HKey_Local_Machine\System\CurrentControlSet\Control\SecurityProviders \SCHANNEL\Protocols\PCT 1.0\Server
3. On the Edit menu, click Add Value.
4. In the Data Type list, click DWORD.
5. In the Value Name box, type Enabled, and then click OK.
Note If this value is present, double-click the value to edit its current value.
6. Type 00000000 in Binary Editor to set the value of the new key equal to “0″.
7. Click OK. Restart the computer.
Taken from http://www.eutychus.com/windows_temp_directory_cleanup.htm
Disclaimer: If you do not understand the process below, then do not attempt it without the assistance of a PC professional who can grasp the concept. Although anyone can make it work correctly without special software, it can cause your system to lock up if done improperly. This information is offered without warranty or any promises. While I find it valuable and set it up on virtually every PC I work on, you use it at your own risk. If you have problems, I will attempt to help, but again I make no claim to be able to correct any mistake you might cause.
Background: Since at least version 3.0, Windows programs have created temporary files which serve no purpose once the programs are finished (exited). Early versions of Windows could place the files anywhere and they forever took up space on the hard drive. Later versions (Windows 95 & 98) at least placed them in a specific location, usually the “C:\Windows\Temp\” directory (now called a folder). If you open the Windows Explorer and locate the “C:\Windows\Temp\” directory you will probably find a few, if not hundreds, of files. Most of those files can be deleted, except for ones in use.
Microsoft Office programs, like Word, now also create temporary files in the directory where existing files are opened, but those are deleted automatically unless the program crashes. Temporary files normally end with the file extension “.tmp”, however, they can have other extensions in the TEMP directory. Occasionally, temporary files have a “~” symbol as a prefix.
Beginning with Windows 95, some temporary files began showing up as “read-only”, “hidden”, or “system” files. Those files required special actions to delete and, in the case of hidden or system files, may not be visible. To complicate matters, some programs in Windows 95 & 98 also started creating sub-directories below the TEMP directory – those directories have to be manually deleted (unless you are running Windows NT or later).
While hard drive space is less critical than just a couple of years ago, it bothers me to know that I have wasted space on my hard drive. Being a PC old-timer who is comfortable working in DOS (The MS-DOS prompt) and with batch files, I use a simple technique that removes all temporary files from my TEMP directory each time I start my PC and before Windows can create new ones that cannot be removed until the next time I start the computer.
Technique for cleaning up the TEMP directory: Shared with me by Yucheng Song: (Win 98 and earlier) Locate and start the “Notepad” program found under Programs / Accessories on the Windows Taskbar. When Notepad has started, select, from the Notepad menu, File / Open. Locate the beginning folder for the C: drive – after you have selected it you should only see [C:] and an icon for the drive. from the pull down list for Files of Type, select “All Files *.*”. Locate and click on the file named “Autoexec.bat”, click the [Open] button. (alternately, you can select File / Open, type c:\autoexec.bat in the file name box, and press [Enter].) Move to the very last line, place your cursor after the last character in the line, and press the [Enter] key twice. Your cursor should now be on a blank line. Enter the following exactly as shown below – or highlight the contents of the box below, copy it (right mouse click and select Copy or highlight it and while holding down the [Ctrl] key, press the [Insert] key, and paste it to the new blank line. (See note at the bottom of this page)
Select File / Save from the menu. The line deletes all files in the C:\Windows\Temp directory AND deletes the files and directories below it. The C:\Windows\Temp directory will remain but without files or directories below it.
All files and subdirectories will now be deleted from the TEMP directory the next time you start your PC. To verify that it works properly, check the contents of the “C:\Windows\Temp\” directory, restart Windows, and check the directory again. None of those files or subdirectories present before restarting should be there afterwards.
Windows NT 4/ WIN 2K / WIN XP: The technique for doing this for Windows NT, 2K, and XP is a little different. With those Operating Systems you also delete any sub-directories under TEMP automatically.
First, find the path to your TEMP directory (it may not be as the example below). Next, create a BAT file, any file name with the extension “.bat” such as clean.bat, using a text editor, like Notepad, with the following two lines (press [Enter] after the second line.
The first command “rd c:\windows\TEMP” =Remove Directory c:\windows\Temp. The /s parameter includes sub directories of c:\temp. The /q is the “quiet mode”, which eliminates the need for you to make a response. The next command (md=Make Directory) recreates the Temp directory.
When the file has been saved, create a link in the StartUp folder (Start / Settings / Taskbar & Start Menu).
That’s it! Next time you start up the PC the bat file will execute, delete the Temp folder and its sub folders, then, re-create the Temp folder.
Most admin tools in Windows Server 2003 are MMC consoles you can access from the Start menu. But you can also open these console from the command line if you know their .msc filenames. This can be especially useful if you log on to your admin workstation using a limited privilege account and use Runas to perform admin tasks. For reference, here’s a list of admin tools with their associated .msc files. You can print this out and tape it on the wall beside your workstation until you memorize the ones you use most commonly.