Speechlib on Shared hosting - ASP.NET

自作多情 提交于 2019-12-24 07:52:25

问题


I am trying to use SpeechLib on my personal website. It's a very simple app that saves some text to a wav file - standard stuff. Works great on the dev machine. But all hell breaks loose when I deploy it to the shared host.

Sometimes I get prompted for user name and password at the time of writing the wav file. Sometimes, I get the "Security exception". The site has full trust and I can write a simple txt file from my app without any issues.

On scouring the internet, I realized that the SpeechLib component temporarily writes a file to:

C:\Users\XX\AppData\Roaming\Microsoft\Speech\Files\UserLexicons

I verified this on the dev machine. It indeed does.

So, my guess was that on the shared host, ASPNET does not have rights to write to that folder(?). So, I contaced the hosting service only to be told I have to upgrade to Virtual Private Server. I am not sure if they know what they are talking about.

Has anyone gotten SpeechLib to work on the shared host. Here's the exact same issue I am facing:

http://www.eukhost.com/forums/f41/interop-speechlib-dll-6743/

Any thoughts?


回答1:


I don't know that product, but I would search for (or contact them about) a way to configure it to use a different temp directory. You will be more likely to get what you want than by puruing the hosting company.

I completely understand why they would want you to upgrade, however (and it isn't JUST for more money).

The C:Users\XX directory in this case would likely be the same directory for everyone in the shared hosting, since it would be the directory for whatever account Asp.Net is running under, not per user who logs in.

In a private server or vitual private server you would be the only one running in that environment, so you could have access to a user directory (still not a great idea to do it).

Don't know if this will help or not, but it's how I would approach it.




回答2:


Essentially, anything writing to disk needs to be given permission to do so.

If your host will not give you permission to write to disk then you need to change hosting.



来源:https://stackoverflow.com/questions/1780269/speechlib-on-shared-hosting-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!