Visual studio 2012 Webforms应用程序在2012年运行良好,但不是2013年
我有一个在VisualStudio2012中运行良好的Web表单应用程序,但当我在VS2013中运行int时,我得到了Visual studio 2012 Webforms应用程序在2012年运行良好,但不是2013年,visual-studio-2012,webforms,visual-studio-2013,iis-7.5,trusted,Visual Studio 2012,Webforms,Visual Studio 2013,Iis 7.5,Trusted,我有一个在VisualStudio2012中运行良好的Web表单应用程序,但当我在VS2013中运行int时,我得到了 System.SystemException occurred Message: A first chance exception of type 'System.SystemException' occurred in mscorlib.dll Additional information: The trust relationship between the primary
System.SystemException occurred
Message: A first chance exception of type 'System.SystemException' occurred in mscorlib.dll
Additional information: The trust relationship between the primary domain and the trusted domain failed.
用于加载初始页时的stacktrace。我不确定从何处着手,试图找出问题的根源。它运行在相同的框架版本上,并且具有相同的web配置
更新。。。。我将Visual Studio 2012切换为使用IIS Express,现在在VS 2012和VS 2013中得到相同的异常。现在要解决异常吗
有什么想法吗?根据错误,我假设您正在使用windows身份验证 如果调用isInRole并传递不存在的角色,则可能会出现此错误
HttpContext.Current.User.IsInRole("SomeMadeUpRole");
关于2012年和2013年运行的区别,2013年使用的IIS Express基本上是一个精简版IIS 7.5,而不是7
虽然不是100%确定,但如果这有帮助,我会很高兴听到 这是因为2013不使用web服务器,而是使用IIS Express。如果启用IIS Express而不是Cassini,则在Visual Studio 2012中也可能发生这种情况。要解决此问题,请执行以下步骤: 在visual studio中,单击web项目,然后按F4 1) 需要禁用匿名身份验证 2) 需要启用Windows身份验证 注意:如果其中一个显示为灰色,则意味着您在位于的IIS Express配置文件中有一个覆盖 \我的文档\IISExpress\config\applicationhost.config 查证
<section name="anonymousAuthentication" overrideModeDefault="Allow"/>
或
更多信息:
是,我正在使用windows Auth,但角色是否存在?所有的变化是VS2012到VS2013都指向同一个AD服务器Hi,我要做的第一件事是检查VS的bot版本中的项目属性。确保web选项卡上的服务器部分在两者之间相同(我怀疑2012使用的是Visual studio开发服务器,2013使用的是IIS express。将两者更改为相同,您应该可以)。我知道2012没有使用iis express,但使用VS 2012的自定义web服务器不确定2013我会检查并让您知道OK VS 2013正在iis express中运行VS 2012正在使用WebDev.WebServer40.exe,因此这确实给了我一些信息,让我切换到VS 2012使用iis express,我现在使用VS 2012会得到相同的异常…可能是web.config应该不同?因为我使用的是IIS Express?
<section name="windowsAuthentication" overrideModeDefault="Allow" />