且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

的WebAPI部署到Azure中 - 控制器不工作(500错误)

更新时间:2023-02-13 09:29:38

这个问题是给到Windows标识基础的Web角色访问时,它本质上不存在。马克Schweigert提供清晰的步骤,在这里做这样的:

The issue is giving the Web Role access to Windows Identity Foundation when it's inherently not there. Marc Schweigert provides clear steps to do this here:

http://blogs.msdn.com/b/devkeydet/archive/2013/01/27/crm-online-amp-windows-azure-configuring-single-sign-on-sso.aspx

转至23:00标志的视频,你会看到4个必要步骤:

Go to the 23:00 mark of the video and you'll see the 4 necessary steps:


  1. 参考Microsoft.IdentityModel.dll(需要安装WIF SDK)
    一个。设置复制本地=真

  2. 在您的Web角色项目创建RegisterWIFGAC.cmd

  3. 在ServiceDefinition.csdef中调用RegisterWIFGAC.cmd创建启动任务

  4. 添加GACUTIL到项目(在启动任务中)把Microsoft.IdentityModel.dll在每一个Web角色开始时间GAC)。