title: Run Microsoft.Speech over IIS?
body: <p>I have an app that uses Microsoft.Speech to recognize speech in a WAV file. It works perfectly when run locally as a console app but barfs when executed by IIS.</p>
  
  <p>Assuming I have the following installed on WinServer 2008 with .NET 3.5+:</p>
  
  <ol>
  <li>Microsoft Speech Platform - Software Development Kit (SDK) (Version 10.1)</li>
  <li>Microsoft Speech Platform - Server Runtime Languages (Version 10.1)</li>
  <li>Microsoft Speech Platform - Software Development Kit (SDK) (Version 10.1)</li>
  </ol>
  
  <p>Is it even possible to use Microsoft.Speech over IIS7? What am I missing here?</p>
  
  <p>I've tried re-coding it as an ASP.NET web service but that doesn't work either. </p>
  
  <p>Suuuuper stuck here. Thanks if you can help :) Pretty please :)</p>
  
  <p><strong>UPDATE:</strong>
  Here's the error message + stack trace:</p>
  
  <pre><code>System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.Speech.Internal.SapiInterop.ISpRecognizer.CreateRecoContext(ISpRecoContext&amp; ppNewCtxt) 
  at Microsoft.Speech.Internal.SapiInterop.SapiRecognizer.&lt;&gt;c__DisplayClass17.b__16() 
  at Microsoft.Speech.Internal.SapiInterop.SapiProxy.PassThrough.Invoke(ObjectDelegate pfn) 
  at Microsoft.Speech.Internal.SapiInterop.SapiRecognizer.CreateRecoContext() 
  at Microsoft.Speech.Recognition.RecognizerBase.Initialize(SapiRecognizer recognizer, Boolean inproc) 
  at Microsoft.Speech.Recognition.SpeechRecognitionEngine.get_RecoBase() 
  at Microsoft.Speech.Recognition.SpeechRecognitionEngine.Initialize(RecognizerInfo recognizerInfo) 
  at Microsoft.Speech.Recognition.SpeechRecognitionEngine..ctor() 
  at myRecognize.Recognize..cctor() The type initializer for 'myRecognize.Recognize' threw an exception. myRecognize 
  at myRecognize.Recognize.get_Reco() 
  at myRecognize.Recognize.Listen(String wavLoc, String grammars) 
  </code></pre>