浏览挂起的网站,出于莫名其妙的原因调用验证代码
我有一个相当大的 ASP.NET MVC 站点,从 1 迁移到 2,现在使用 MVC 3.0。我向其中添加了 Glimpse,它就挂起了。
在堆栈跟踪中,有一个对 Glimpse.Core.DLL!Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(target={}) 的调用,
然后它尝试验证模型 - 由于模型未初始化,因此失败,并且应该没有得到验证,
还有其他人遇到过任何 LINQ/Glimplse 问题吗?
I've got a fairly large ASP.NET MVC site, migrated from 1 to 2, and now on MVC 3.0. I added Glimpse to it and it hangs.
In the stack trace, there's a call to Glimpse.Core.DLL!Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(target={})
It then tries to validate the model - which fails since the model isn't initialized, and shouldn't be being validated,
Anyone else come across any LINQ/Glimplse issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 ViewModel 有一个 IsValid 属性,Glimpse 尝试为“视图”选项卡序列化该属性。
您可以通过将以下内容添加到 web.config 来简单地禁用视图选项卡:
我们希望将来更改视图模型序列化的默认行为,但此解决方案应该可以让您立即启动并运行。
更新:从版本 1.0 开始,Glimpse 不再序列化视图模型 - 这意味着这不再是问题。
Your ViewModel has an IsValid property on it that Glimpse tries to serialize for the Views tab.
You can simply disable the views tab by adding the following to your web.config:
We are looking to change the default behavior for View Model serialization in the future, but this work around should get you up and running for now.
UPDATE: As of version 1.0, Glimpse no longer serializes View Models - which means this is no longer a problem.