如何让我的 Windows Azure 辅助角色连接到我的 Ado.NEt 基于实体的数据库

发布于 2024-09-08 07:40:00 字数 422 浏览 3 评论 0原文

我在 ASP.NET MVC2 中构建了一个后端,它有一个底层的 ADO.NET 基于实体的数据库。

在 MVC 后端中,我调用我的数据库实体,即:

Entities entities = new Entities();

...并且一切正常。

不幸的是,在我的 Azure/mvc2 项目中,我的辅助角色使 azure 项目抛出奇怪的异常:

"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."

女士们先生们,有什么想法吗?

I've built a backend in ASP.NET MVC2 which has an underlying ADO.NET Entity-based Database.

In the MVC Backend, I call my database entities, i.e.:

Entities entities = new Entities();

...and that all works fine.

Unforutnetly, in my Azure/mvc2 project, My worker role makes the azure project throw weird exceptions:

"The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."

Any ideas ladies and gentlemen?

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

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

发布评论

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

评论(1

灰色世界里的红玫瑰 2024-09-15 07:40:00

我自己解决了 - 这是一个 PEBKAC 问题。
必须在辅助角色的 App.config 中手动设置配置字符串(从 ASP/NET MVC2 项目的 Web.config 复制粘贴)。

现在一切正常。

Solved it myself - it was a PEBKAC issue.
Had to manually set the configuration string in the Worker role's App.config (Copypasted from from the ASP/NET MVC2 Project's Web.config).

All works well now.

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