"Access is denied" when using Microsoft Speech Platform with IIS

When you are using Microsoft Speech Platform in your web service to perform speech recognition, you might find a strange situation when the web app works perfectly in Visual Studio, but keep having “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))” when you try to instantiate SpeechRecognitionEngine.

After some searches on the Internet, I found 2 suggestions in this article http://stackoverflow.com/questions/3385382/run-microsoft-speech-over-iis:

  • Use procmon in SysInternals to find ACCESS DENIED result and add permission there

  • Grant read permission for the IIS apppool account to folder

C:\windows\system32\config\systemprofile\appdata\roaming

    

I tried the second suggestion first as it is more straight forward, but it didn't work out for me. I then tried the first suggestion.

Turned out the path is a bit different on my PC, probably due to x64-x86 compatibility.  
![Access Denied problem](/wp-content/uploads/2016/01/speech_accessdenied.png)

I added read permission for

IIS APPPOOL{name}


to the folder above (and some of its parents), and the speech platform works perfectly in IIS now.

I hope this article would help you if you have to same issue. Please also leave a comment if you have a better solution.

Comments

1 comment from the original WordPress blog.

  1. Thakka

    Thanks. This is very helpful for me.

Leave a comment

Comments are moderated. Only your name, website and comment are stored.