How to configure Outlook Anywhere with Terminal Services Gateway on the same machine

So, for those people who don't have the money to purchase enough servers and software to run things on separate boxes (or even virtual machines) who want Exchange 2007 and Terminal Services Gateway TSG services on the same machine, here are some tips:

  1. Outlook Anywhere uses the RPC/HTTP protocol, and so does the Gateway. I should had known but it took me a while to figure out they are not quite compatible. TSG requires NTLM authentication (Windows Authentication) while Outlook Anywhere if you are using ISA Server 2004 requires Basic Authentication. After reding this web page: http://technet.microsoft.com/en-us/library/aa998036(EXCHG.80).aspx I decided to use the command: Set-OutlookAnywhere -Name Server01 -IISAuthenticationMethod Basic,NTLM to set the authentication method to both, allowing them to work together
  2. If you are using an ISA Server, I recommend you to read http://technet.microsoft.com/en-us/library/aa998036(EXCHG.80).aspx to better understand what kind of directories you'll have to publish. Using ISA Server 2006 would be easier but unfortunately I am force to run ISA 2004 for the time being.
  3. Use the following line for a first time installation:

Enable-OutlookAnywhere -Server:CA01 -ExternalHostname:mail.contoso.com -ClientAuthenticationMethod:NTLM,Basic -SSLOffloading:$true

http://technet.microsoft.com/en-us/library/bb124993(EXCHG.80).aspx

How to Remove Exchange 2007 from a computer

I had some issues with Exchange and after messing with it a lot I decided it was better to remove it and start from a fresh installation. Unfortunately I ran into several issues:

  1. I had Connectors, and you can't really delete those from the management console as far as I could tell. I went ahead and opened System Manager on my Windows 2003 // Exchange 2003 box and was able to see them and delete them
  2. Public Folder: You can't remove Exchange 2007 until all public folders and replicas are removed from the store… and even after you do that, it wouldn't let me. I found that (on this website: http://telnetport25.wordpress.com/2007/08/21/quick-tip-removing-exchange-2007-error-with-public-folder-replicas/) using adsi edit worked. I just removed the entry on: "CN=First Storage Group,CN=InformationStore,CN=<Your Server>,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=<Your Organisation>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=<your Domain>,DC=<dot Com>" corresponding to my public folder store as I didn't have the other ones and the uninstall worked

Once you are done with that, simply follow the instructions microsoft provides on: http://support.microsoft.com/kb/927464 and you'll be set

oh, btw, you can download and read more about ADSI edit on: http://technet2.microsoft.com/windowsserver/en/library/ebca3324-5427-471a-bc19-9aa1decd3d401033.mspx?mfr=true

How to Enable AutoDiscover for Outlook 2007

After reading the article: http://technet.microsoft.com/en-us/library/bb124251(EXCHG.80).aspx, particularly the part that states "Depending on whether you have configured the Autodiscover service on a separate site, the Autodiscover service URL will be either https://<smtp-address-domain>/autodiscover/autodiscover.xml or https://autodiscover.<smtp-address-domain>/autodiscover/autodiscover.xml." I decided to create a DNS record for autodiscover and open the firewall so that it could obtain that information. Noteworthy is that you can setup the external URLs for OWA and Active Sync and I believe you use them here.

 

More Resources:

http://technet.microsoft.com/en-us/library/bb124251(EXCHG.80).aspx

http://technet.microsoft.com/en-us/library/bb430749(EXCHG.80).aspx

Exmerge error: “Store ‘MSPST MS’ was not opened.”

I was running an Exchange Server in English and then tried to move the accounts using exmerge to one in Spanish when I ran into this error. After much reading I came accross this website: http://technet.microsoft.com/en-us/library/bb124178.aspx which states:

"Store 'MSPST MS' was not opened Store 'MSEMS' was not opened

The Store 'MSPST MS' was not opened or Store 'MSEMS' was not opened errors might be seen in the ExMerge log file (ExMerge.log) after merging data from the recovery storage group has failed. These errors typically indicate a language localization mismatch problem. The errors can usually be resolved by entering the correct localized names for the MAPI services on which ExMerge depends.

For detailed instructions, see How to Discover and Configure the Correct Names for MAPI Services."

following that link I followed this procedure:

"

  1. In the ExMerge.ini file that is bundled with the ExMerge tool, find the LoggingLevel line and set its value to 3 instead of 0. This enables verbose logging of ExMerge errors.

  2. Run ExMerge again to generate the error condition again. To reduce the output to the log file, select only a single mailbox to merge.

  3. In the ExMerge.log file, find the lines that begin with "Checking service" and that are followed by a "was not opened" error. For example:

    [15:02:19] Checking service 'Microsoft Exchange Message Store'
    [15:02:19] Checking service 'Personal Folders'
    [15:02:19] Store 'MSPST MS' was not opened.
    [15:02:19] Ending Routine: EDKRoutines::OpenStores)
  4. In the ExMerge.ini file, find LocalisedExchangeServerServiceName and remove the semicolon (;) that precedes the line. Then set the value to the service name displayed in the ExMerge.log file. For example:

    LocalisedExchangeServerServiceName = Microsoft Exchange Message Store
  5. In the ExMerge.ini file, find LocalisedPersonalFoldersServiceName and remove the semicolon (;) that precedes the line. Then set the value to the service name displayed in the ExMerge.log file. For example:

    LocalisedPersonalFoldersServiceName = Personal Folders

"

So, simply find the localised names and remove the ';' from the one you need to use. For example, in my case I needed spanish so I removed it from the Spanish one and here is what I ended up with:

; French
;LocalisedPersonalFoldersServiceName=Dossiers personnels
; Spanish
LocalisedPersonalFoldersServiceName=Carpetas personales
; German
;LocalisedPersonalFoldersServiceName=Persönliche Ordner
; Italian
;LocalisedPersonalFoldersServiceName=Cartelle personali

From the looks of it, you will run into issues if you are using ExMerge for a French, Spanish, German or Italian system. Hope this helps!

MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-2147467259)

This solution is with regards to the following error message. Unfortunately now I am running all my software in spanish so the error code is half in Spanish and half in English. This error is generated when you try to mount a database in Exchange 2007 right after you are done installing. The Public Folder Database works fine though.

——————————————————–
Microsoft Exchange Error
——————————————————–
No se pudo montar la base de datos "Mailbox Database".

Mailbox Database
Error
Error:
Exchange no puede montar la base de datos especificada. Base de datos especificada: ServerNameFirst Storage GroupMailbox Database; código de error: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-2147467259)

In order to resolve this issue follow the steps on KB925825 at http://support.microsoft.com/kb/925825/en-us

I've seen some issues with people trying to run Setup /PrepareAD as it will indicate the following message:

C:Usersusername>Setup /PrepareAD
Welcome to Microsoft Exchange Server 2007 Unattended Setup
Preparing Exchange Setup

Exchange Server setup encountered an error.

This is due to the fact that you are not running the command line as an Administrator. Remember that in Vista and Windows 2008 you must run CMD as an administrator. Right click the Command Prompt shortcut and select the Run as Administrator option before you try to prepare AD.

I would also suggest you take a look at the help for preparing AD for an Exchange 2007 installation. Here is an extract from the KB on how to do that:

Click the Contents tab, expand Deployment, expand New Installation, expand Preparing to Deploy Exchange 2007, and then click How to Prepare Active Directory and Domains.

Finally, I also found that this is the sequence you want to follow to prepare your AD for deployment:

  1. Setup /PrepareSchema 
  2. Setup /PrepareAD

I had done the /PrepareSchema but missed the /PrepareAD. Once I did that I was able to mount the store. Good luck to everyone! 

Client Application Services

So, I was trying to do an application I have been avoiding for the past 8 years and the first thing I began working at was the authentication part of it. I remembered ASP.Net had membership and roles features with their authentication and login functionality so I was looking around for that. This time I decided to make it simple by just doing a Windows application using WPF (Windows Presentation Foundation). To my surprise it seems you can only use the authentication in ASP.Net and there is nothing built-in for a Windows Application. This time around though (ASP.Net 3.5) they have the Client application services which "enables your Windows-based applications to use the ASP.Net login (authentication), roles, and profile (settings) services" (Visual Studio 2008 Services Screen). It is a pain to figure out how to set everything but here is the general overview of what I've discovered thus far:

  1. You need some sort of database to store your users and roles and what not just as in ASP.Net
  2. You need a web service to provide authentication services for your Windows application
  3. You need to check out this walkthrough. After hours of internet search I think this is your one place to learn 90% of what you need.

 

Useful tool

The following allows you to safelly share your computer with others:

http://www.microsoft.com/downloads/details.aspx?FamilyId=D077A52D-93E9-4B02-BD95-9D770CCDB431&displaylang=es

Executing or Opening Control Panel Items

 Sometimes you have to open or access Control Panel Items via a script or you want to open it for a remote client and it is kind of hard to come up with a command line to address that issue. Microsoft has posted in their MSDN website (http://msdn2.microsoft.com/En-US/library/bb419052.aspx) information regarding how to do this.

Most importantly, if your application wishes to open an item in the Control Panel you use:

WinExec("c:windowssystem32control.exe MyCpl.cpl", SW_NORMAL);

And if you simply wish to open something like the Printers and Faxes folder, take a look at this (obtained as is from the website mentioned above):

 

Legacy Control Panel Commands

When you use the WinExec function, the system can recognize special
Control Panel commands. These commands predate Windows Vista.

control.exe desktop Launches the Display Properties window.
control.exe color Launches the Display Properties window with the Appearance tab
preselected.
control.exe date/time Launches the Date and Time Properties window.
control.exe international Launches the Regional and Language Options window.
control.exe mouse Launches the Mouse Properties window.
control.exe keyboard Launches the Keyboard Properties window.
control.exe printers Displays the Printers and Faxes folder.
control.exe fonts Displays the Fonts folder.

For Windows 2000 and later systems:

control.exe folders Launches the Folder Options window.
control.exe netware Launches the Novell NetWare window (if installed).
control.exe telephony Launches the Phone and Modem Options window.
control.exe admintools Displays the Administrative Tools folder.
control.exe schedtasks Displays the Scheduled Tasks folder.
control.exe netconnections Displays the Network Connections folder.
control.exe infrared Launches the Infrared Monitor window (if installed).
control.exe userpasswords Launches the User Accounts window.

 Alternatively you can try something like:

 ::{2227A280-3AEA-1069-A2DE-08002B30309D}

That would open the Printers and Faxes if ran from the Start–>Run Menu. You can probably leverage this and use similar IDs for different things in Windows.  

How to add computers to a Domain via Scripting

I personally prefer to use the solution provided by Berkeley found at http://calnetad.berkeley.edu/documentation/scripts/.
I went ahead and downloaded the joinDomain.cmd
script and made slight changes to it. I also got the latest netdom.exe from the
support tools from the Windows 2003 R2 CD. I might add the zip file in the future just in
case they take it offline, but I think this is a good resource nevertheless.

“Service Unavailable” message when you access a website (when installing 32 and 64 bit versions of ASP.Net)

Let me clarify that about a billion things (ok, probably no more than a 100) can cause this error message, so this is just a particular scenario and it happens when you have 32 and 64 bit versions of asp.net installed on your web server. Here is an easy way to move around versions. In my case, I was happy with my 64 bit version, but I needed the 32 bit asp 1.1.xxxx to run the BDD on my server, so… I had to install it. Anyways, what a pain one thing breaks another, but here is how to fix it!!

obtained from: http://support.microsoft.com/?id=894435

ASP.NET 1.1, 32-bit version

loadTOCNode(2, 'moreinformation');
To run the 32-bit version of ASP.NET 1.1, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:

cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3. Type the following command to install the version of ASP.NET 1.1 and to install the script maps at the IIS root and under:

%SYSTEMROOT%Microsoft.NETFrameworkv1.1.4322aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 32-bit version

loadTOCNode(2, 'moreinformation');
To run the 32-bit version of ASP.NET 2.0, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to enable the 32-bit mode:

cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
3. Type the following command to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under:

%SYSTEMROOT%Microsoft.NETFrameworkv2.0.40607aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 2.0.40607 (32-bit) is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 64-bit version

loadTOCNode(2, 'moreinformation');
To run the 64-bit version of ASP.NET 2.0, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Type the following command to disable the 32-bit mode:

cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
3. 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:

%SYSTEMROOT%Microsoft.NETFramework64v2.0.40607aspnet_regiis.exe -i
4. Make sure that the status of ASP.NET version 2.0.40607 is set to Allowed in the Web service extension list in Internet Information Services Manager.

Note The build version of ASP.NET 2.0 may differ depending on what the currently released build version is. These steps are for build version 2.0.40607.

Load more