Monday, November 16, 2009
Speech server application and Cache
In the speech server application I am creating, I need to load some data and save it into the Cache so every call can share that data in a readonly fashion. The normal way for me to access Cache is to use HttpContext.Current.Cache. However, HttpContext.Current is null in speech server application. I tested in both IIS 5.1 and 6.0 with soft and regular land phone. I then began to use WorkFlow.UserData as the application Cache. It works fine except you can't set its expiration time. After a little research and I found that I can acutally access Cache by HttpRuntime.Cache, and it even performance a little better. A good article to compare these two different way of accessing Cache is here.
Friday, November 13, 2009
speech server running under iis 5.1
It seems like the speech server is only designed to run under iis 6.1 or higher. According to this reference: It "Setup program creates an application pool called Speech Server under which Speech Server applications are intended to run". and by default "The Speech Server processes run as the NETWORK SERVICE account". It should use this default account when accessing local resource and use current windows account to access network resource (such as database and shared file server).
However, the IIS 5.1 doesn't have application pool and web app running under 5.1 is using [machinename]/ASPNET user account by default. It's uncertain if speech server has issue to use this account to access local resource, but it definitively failed to use local windows account when accessing network resource under IIS 5.1. The error developer will see is like: Login failed for user ''. The user is not associated with a trusted SQL Server connection. Please note the user account here is a empty string.
Solution is to updateto force impersonation in the machine.config under the currently used .NET framework folder. An example would be like this:
<processmodel password="[password]" username="[domain]\[username]">
here are some other good references helped me regarding this issue:
Understanding ASP.NET Impersonation Security
processModel Element (ASP.NET Settings Schema)
However, the IIS 5.1 doesn't have application pool and web app running under 5.1 is using [machinename]/ASPNET user account by default. It's uncertain if speech server has issue to use this account to access local resource, but it definitively failed to use local windows account when accessing network resource under IIS 5.1. The error developer will see is like: Login failed for user ''. The user is not associated with a trusted SQL Server connection. Please note the user account here is a empty string.
Solution is to update
<processmodel password="[password]" username="[domain]\[username]">
here are some other good references helped me regarding this issue:
Understanding ASP.NET Impersonation Security
processModel Element (ASP.NET Settings Schema)
Subscribe to:
Posts (Atom)