Open IE via C# -> mailto fails

1k Views Asked by At

I found some strange behavior in ie started by Process.Start() (.Net Framework) To reproduce this just follow following steps.

Required:

  • C# IDE+compiler
  • outlook (in my situation: outlook 2010 - other versions should be the same problem but not tested)
  • ie9 (ie8 or 10 should be "good" too)
  • ie must be the default browser (u can switch back later ;-) )
  • outlook must be related to mailto: links

Steps (success):

Result: Outlook starts

Steps (fail)

  • close all IE and Outlook instances
  • compile this code-fragment System.Diagnostics.Process.Start("http://www.example.org");
  • execute the code (IE should start showing the example page)
  • Now type or copy mailto:[email protected] to your url-bar

Result: Cannot start Microsoft Outlook (or something like that) - WTF?

What I checked already:

IE starts with same

  • parameter
  • working directory
  • user
  • architecture (32bit)

what am i doing wrong? it'd be nice if there are some more ideas out there what i can check, test, look for.

1

There are 1 best solutions below

2
Rusty Nail On

I can reproduce the behaviour. In my case I have an Outlook Addin causing the problem.

---------------------------
MS Outlook Extension
---------------------------
The <Outlook Addin Name> MS Outlook Extension can't be loaded because Outlook is currently in use by another application. Please try again later.
---------------------------
OK   
---------------------------

Once I removed this Addin it now works.

Something also that may be of help is this: http://www.codeproject.com/Articles/4051/Windows-Impersonation-using-C

Impersonating another user may help if your problem is not an Addin like mine was.