MissingMethodException get

编程入门 行业动态 更新时间:2024-10-09 21:26:01
本文介绍了MissingMethodException get_QueryString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

session.ReferrerUrl = GetReferrerUrl(authService,会话,请求);

顺便说一句,在应用程序控制台中,我也得到了这个提示:

警告:ServiceStack.Serialization.StringMapTypeDeserializer [0]类型"ServiceStack.Authenticate"上不存在属性重定向"

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

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

解决方案

没有 IRequest上的INameValueCollection不再存在,去年被v5 +中的 NameValueCollection 取代,无论您使用的是哪个v4代码,都需要重新编译与项目其余部分的版本相同.

要进行彻底升级,请确保所有项目都引用相同的ServiceStack版本,删除您的/bin 和/obj 文件夹,然后再次尝试从NuGet还原./p>

如果仍然存在问题,请清除您的NuGet缓存,然后再次还原:

警告:ServiceStack.Serialization.StringMapTypeDeserializer [0]类型"ServiceStack.Authenticate"上不存在属性重定向"

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

nuget locals all -clear

I come across this exception in my core app ( core 2.1 and I'm using service stack 5.2).

Method not found: 'ServiceStack.Web.INameValueCollection ServiceStack.Web.IRequest.get_QueryString()'.

It comes from one of the plugins originally, but I can't figure out why. Code breaks on this line 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

本文发布于:2023-11-12 13:03:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1581577.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:MissingMethodException

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!