windows azure简介,简单的应用程序可以在本地运行,但不能在登台环境中运行

发布于 2024-12-21 17:55:50 字数 875 浏览 3 评论 0原文

我正在关注第一个动手实验室 http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010

完成所有步骤后一步一步,它在本地工作,但在我部署到临时环境后,它不起作用。
它向我展示了经典的一般错误。

我什至不知道要检查什么

,我是azure的新手发展!!!

好吧,突然本地环境不工作了,问题出在 global.asax 中的这一行

void Application_Start(object sender, EventArgs e)
        {
            Microsoft.WindowsAzure.CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
            {
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
            });

        }

外部组件抛出了异常。 描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。 异常详细信息:System.Runtime.InteropServices.SEHException:外部组件引发了异常。 来源错误:

I am following the first hands on lab
http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010

After doing all step by step, it worked locally, but after I deployed to staging environment, its not working.
It shows me the classic generic error.

http://65a48b0a1c1f4813aa82aeb31a400638.cloudapp.net/

I dont even know what to check, I am very newbie to azure development!!!

Well, suddenly the local environment is not working, and the problem is in this line in global.asax

void Application_Start(object sender, EventArgs e)
        {
            Microsoft.WindowsAzure.CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
            {
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
            });

        }

External component has thrown an exception.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
Source Error:

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

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

发布评论

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

评论(1

述情 2024-12-28 17:55:50

如果您在实验室中使用步骤 3 中的文件,请务必检查配置文件

ServiceConfiguration.Cloud.cscfg

它们应该具有类似的内容

<?xml version="1.0"?>
<ServiceConfiguration serviceName="GuestBook" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
  <Role name="GuestBook_WebRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=levalenciaguestbook;AccountKey=wVRP+PuQx6X1uJoFu+teVlkVbS36gI7eT7yLxvrsKiyXPcCramC1VVt2NaULoPyKBi8V0iswM5lzwzampn6qwQ==" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=levalenciaguestbook;AccountKey=wVRP+PuQx6X1uJoFu+teVlkVbS36gI7eT7yLxvrsKiyXPcCramC1VVt2NaULoPyKBi8V0iswM5lzwzampn6qwQ==" />
    </ConfigurationSettings>
  </Role>
  <Role name="GuestBook_WorkerRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xx;AccountKey=wVRP+PuQx6X1uJoFu+xpn6qwQ==" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xx;AccountKey=wVRP+x+x==" />
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>

If you are using the files from Step 3 in the lab, be sure that you check the config file

ServiceConfiguration.Cloud.cscfg

They should have something like

<?xml version="1.0"?>
<ServiceConfiguration serviceName="GuestBook" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
  <Role name="GuestBook_WebRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=levalenciaguestbook;AccountKey=wVRP+PuQx6X1uJoFu+teVlkVbS36gI7eT7yLxvrsKiyXPcCramC1VVt2NaULoPyKBi8V0iswM5lzwzampn6qwQ==" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=levalenciaguestbook;AccountKey=wVRP+PuQx6X1uJoFu+teVlkVbS36gI7eT7yLxvrsKiyXPcCramC1VVt2NaULoPyKBi8V0iswM5lzwzampn6qwQ==" />
    </ConfigurationSettings>
  </Role>
  <Role name="GuestBook_WorkerRole">
    <Instances count="1" />
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xx;AccountKey=wVRP+PuQx6X1uJoFu+xpn6qwQ==" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xx;AccountKey=wVRP+x+x==" />
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文