使用Azure AD进行单一登录时出错

时间:2014-07-16 18:49:34

标签: c# asp.net .net azure azure-active-directory

我尝试按照此处的教程

实施单点登录应用

http://geoffwebbercross.blogspot.com/2014/05/adding-azure-ad-single-sign-on-to.html

我在azure中添加了一个活动目录,并为该租户添加了一个用户。然后我在VS2013中构建了一个小应用程序。我使用了组织帐户并输入了域名,登录并创建了项目。在创建项目时,有一个对话框说了

Request_BadRequest:找到属性'identifierUris'资源'Application'

的值无效

我关闭了。我试图在我的本地机器上运行该项目。它会有这样的信息。

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.



Detailed Error Information:



Module
   IIS Web Core 

Notification
   Unknown 

Handler
   Not yet determined 

Error Code
   0x80070032 

Config Error
   The configuration section 'system.identityModel' cannot be read because it is missing a section declaration.  

Config File




Requested URL
   http:

Physical Path


Logon Method
   Not yet determined 

Logon User
   Not yet determined 

Request Tracing Directory
   D:\My Documents\IISExpress\TraceLogFiles\ 




Config Source:
   34:   </system.web>
   35:   <system.identityModel>
   36:     <identityConfiguration>




More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file. 
View more information »

有关如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:0)

我不确定根本原因是什么(为什么在创建项目时出现错误),但以下内容应解决您在运行应用程序时看到的错误。

<configSections>的{​​{1}}部分,您需要定义web.config部分。条目应如下所示:

system.identityModel