Monthly Archives: September 2007

Today I encountered a problem with accessing the metadata for a WCF service that was deployed on a Windows Server 2003 machine.

The WSDL part worked just fine for the metadata exchange endpoint (url?wsdl, url?wsdl=wsdl0, etc.). These WSDL files refer to XSD files for the message types. Requesting these files (url?xsd=xsd0, url?xsd=xsd1, etc.) resulted in an empty response from the webserver. Checking the IIS logs indicated a HTTP 200 OK response with 0 bytes transferred. A very weird problem. Checking the config files did not lead anywhere.

Eventually I found a hint in a reply by James Zhang in this MSDN Forum post. The identity that is used for the application pool that hosts the WCF service must have the correct NTFS permissions on the %WINDIR%temp folder. The identity that I used is a domain account. After setting the right NTFS permissions, the problem disappeared.

The funny thing was that this particular answer wasn't the answer for the original question in this forum post.

James Zhang does not indicate what type of permissions are needed, so I had to experiment a little.

First I added the account to the local Users group. This gives it special access permissions: Traverse folder/execute file, create files/write data, create folders/append data  on this folder and subfolders. This is not enough. Then I realized, the domain account is already implicitly a member of this group because the Users group contains the NT AuthorityAuthenticated Users group. Next, I duplicated the extra rights that the NETWORK SERVICE account had for the domain account. These are list folder/read data and delete permissions for this folder, subfolders and files. This was enough. But it doesn't seem very secure. Now the service account can access temporary files created by other accounts.

So I experimented a bit more. I tuned back the NTFS permissions for the service account on %WINDIR%temp to list folder/read data on this folder only. This is just enough. This allows the account to see which files are in the temp folder, but it doesn't allow it to read the data in files that are owned by other accounts.

It is very unfortunate that WCF didn't give any clue about why it couldn't generate metadata in this case. It is also unfortunate that it needs just slightly more permissions that a standard user on the folder for temporary files.

Note that if you run your WCF service in an IIS application pool under the default NETWORK SERVICE account you won't run into this problem, because it has more than enough permissions.

PS: Best practices indicate you shouldn't deploy your services with metadata enabled. We will turn this off eventually. However, of course it should work if you do want to enable this.

I regularly sync my Windows Mobile phone with Outlook 2007 using ActiveSync/Vista Sync Center. I don't know what causes this, but every so often I end up with duplicate contacts and calendar items. This happens especially with recurring items like birthdays. If I am not quick enough to remove the duplicates, I end up with 2, 4 or even 8 of them!

In the past I have used the Duplicates Remover for Outlook from MAPILab for this. I used the trial edition that works for 30-days. It is limited to removing 10 items at a time, so I had to run it multiple times. I didn't use it often enough to shell out the $24/€19 to buy it.

Today I tried version 2.5.2 of this Outlook add-in. It has a wizard-like interface that is easy to use. I got my contact list and calendar cleaned up again.

[Full disclosure: By writing this review I am eligible for a free license for this Outlook add-in. This does not effect my opinion about this tool. Obviously, if I wouldn't find it useful, I wouldn't want to have a license.]