共享托管上的 Speechlib - ASP.NET

发布于 2024-08-11 16:23:36 字数 692 浏览 4 评论 0原文

我正在尝试在我的个人网站上使用 SpeechLib。这是一个非常简单的应用程序,可以将一些文本保存到 wav 文件中 - 标准的东西。在开发机器上运行良好。但是当我将其部署到共享主机时,一切都崩溃了。

有时,我在写入 wav 文件时会提示输入用户名和密码。有时,我会收到“安全例外”。该网站具有完全信任,我可以从我的应用程序编写一个简单的 txt 文件,没有任何问题。

在互联网上搜索时,我意识到 SpeechLib 组件临时将一个文件写入:

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

我在开发计算机上验证了这一点。确实如此。

所以,我的猜测是,在共享主机上,ASPNET 无权写入该文件夹(?)。因此,我联系了托管服务,却被告知我必须升级到虚拟专用服务器。我不确定他们是否知道自己在说什么。

有没有人让 SpeechLib 在共享主机上工作。这是我面临的完全相同的问题:

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

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柳若烟 2024-08-18 16:23:36

我不知道该产品,但我会搜索(或联系他们)一种将其配置为使用不同临时目录的方法。与购买托管公司相比,您更有可能获得您想要的东西。

然而,我完全理解为什么他们希望你升级(而且这不仅仅是为了更多的钱)。

这种情况下,C:Users\XX 目录对于共享主机中的每个人来说可能都是相同的目录,因为它将是运行 Asp.Net 的任何帐户的目录,而不是每个登录的用户的目录。

在 或者虚拟专用服务器,您将是唯一在该环境中运行的服务器,因此您可以访问用户目录(仍然不是一个好主意)。

不知道这是否有帮助,但这就是我的处理方式。

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.

允世 2024-08-18 16:23:36

本质上,任何写入磁盘的操作都需要获得许可才能执行。

如果您的主机不允许您写入磁盘,那么您需要更改托管。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文