Tuesday, September 12, 2006

Oh the joys of UAC (NOT)

Tried to do a little bughunting on a WCF project, the problem specifically related to dual bindings. However, I did not get so far, since I soon found out through "trial and horror" that in Vista you are not allowed to bind to a port unless running under elevated privileges.

Yes, UAC strikes once again!

I soon found out that this is a known issue and how you should work around it. Basically you add a manifest to the exe requesting elevated privileges.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedexecutionlevel level="requireAdministrator">

However, I couldn't get this working under a debugger !?! (The manifest is there as both exename.exe.manifest and exename.vshost.exe.manifest)

So, how is one supposed to debug a WCF server on Vista !?!

No comments: