MissingMethodException get_QueryString [英] MissingMethodException get_QueryString

查看:51
本文介绍了MissingMethodException get_QueryString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.net核心应用程序(.net core 2.1,我使用的是服务堆栈5.2)中遇到了此异常.

未找到方法:"ServiceStack.Web.INameValueCollection ServiceStack.Web.IRequest.get_QueryString()".

它最初来自一个插件,但我不知道为什么.代码在此行上

...但是我认为这与上面的异常无关.

有人暗示可能是个问题吗?

没有

这无关紧要,只是警告请求DTO上有一个 redirect 属性,我已将其添加到here.

session.ReferrerUrl = GetReferrerUrl(authService, session, request);

Btw, in app console I also get this:

warn: ServiceStack.Serialization.StringMapTypeDeserializer[0] Property 'redirect' does not exist on type 'ServiceStack.Authenticate'

...but I don't think that's related to the exception above.

Any hints what might be a problem?

解决方案

There is no INameValueCollection on IRequest anymore that was replaced last year with NameValueCollection from v5+, whatever v4 code you have that's using it needs to be recompiled with the same version as the rest of your project.

To get a clean upgrade make sure all your projects are referencing the same ServiceStack version, delete your /bin and /obj folders and try restoring from NuGet again.

If it’s still an issue clear your NuGet Cache and restore again:

warn: ServiceStack.Serialization.StringMapTypeDeserializer[0] Property 'redirect' does not exist on type 'ServiceStack.Authenticate'

This is irrelevant it's just a warning that there was a redirect property on Request DTOs, I've added it to the ignore list in this commit.

nuget locals all -clear

这篇关于MissingMethodException get_QueryString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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