[英]How to convert On Action Execution from .net to .net core?
1.Changing the access modifier of a method in a derived type is not allowed. 1.不允许更改派生类型中方法的访问修饰符。 You should change protected to public.
您应该将保护更改为公开。
2.The HttpRequest object is different in ASP.NET Core. 2.ASP.NET Core中的HttpRequest object不同。 It no longer contains Url property.
它不再包含 Url 属性。
By using:通过使用:
using Microsoft.AspNetCore.Http.Extensions;
then you can get the full http request url by executing:然后您可以通过执行以下命令获取完整的 http 请求 url:
HttpContext.Request.GetEncodedUrl();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.