托管Windows Azure中的.NET应用程序安装WIF运行 [英] Installing a WIF Runtime for hosting a .NET application in Windows Azure

查看:180
本文介绍了托管Windows Azure中的.NET应用程序安装WIF运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个自定义应用程序,它能够消耗CRM Web服务和执行的Windows Live ID认证,创建,从自定义.NET页面在CRM读取和更新操作。它运行绝对没问题,当我调试在Visual Studio 2010的应用程序,但是当我部署相同的应用程序,并尝试验证它显示了以下错误:

I developed a Custom application that is able to consume the CRM Web services and perform Windows Live Id authentication, create, read and update operation in the CRM from the custom .NET page. It runs absolutely fine when I debug the application in Visual Studio 2010 but when I deploy the same application and try to authenticate it shows the following error:

无法加载文件或程序集Microsoft.IdentityModel,版本= 3.5.0.0,文化=中性公钥= 31bf3856ad364e35或它的一个依赖项。系统找不到指定的文件。

"Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

我只是想知道如何安装的 Microsoft.IdentityModel 使用启动task.I跟随一些在下面的链接中的步骤组装:

I just wanted to know how to install the Microsoft.IdentityModel assembly using a startup task.I followed some of the steps in the following link:

<一个href=\"http://blogs.msdn.com/b/sriharsha/archive/2012/04/07/windows-azure-unable-to-find-assembly-microsoft-identitymodel.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/sriharsha/archive/2012/04/07/windows-azure-unable-to-find-assembly-microsoft-identitymodel.aspx

但无法RegisterDLL.cmd添加到我的项目解决方案。

But was unable to add RegisterDLL.cmd to my project solution.

推荐答案

好了,

您可以用什么Sandrino建议,但你也可以使用这PowerShell脚本。我用它在几个项目,它工作正常。它还自动识别Windows版本(因为Azure来宾操作系统家庭1.XX您必须使用Windows6.0-XXXXX,并为客户操作系统家庭2.xx的,你必须使用KB更新Windows6.1-XXX版本)。

You can use what Sandrino suggests, but you can also use this powershell script. I use it in couple of project and it works fine. It also auto-recognizes Windows Version (because for Azure Guest OS Family 1.xx you have to use the Windows6.0-xxxxx, and for Guest OS Family 2.xx you have to use Windows6.1-xxx version of the KB update).

您可以在一个非常简单的启动任务执行的PowerShell脚本。创建一个setup.cmd文件时,您有以下内容:

You can execute that powershell script in a very simple startup task. Create one setup.cmd file, that you have the following content:

@echo off
powershell -command "Set-ExecutionPolicy Unrestricted" 2>> err.out
powershell .\Install-WIF-OnAzure.ps1 2>> err.out

和运行简单启动任务:

 <WebRole name="AzureAndWif" vmsize="Small">
    <Startup>
      <Task commandLine="setup.cmd" executionContext="elevated" />
    </Startup>
   ...
 </WebRole>

希望这可以帮助;)

Hope this also helps ;)

这篇关于托管Windows Azure中的.NET应用程序安装WIF运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆