我最近将我的代码从 4.7.1 移到了 4.11.10。在旧版本中,rest 扩展曾经完美地工作。但在 4.11.10 中它不起作用,我收到 500 错误。甚至调试也没有打到那里。
其余方法的 URLhttp://localhost/Base/Landing/GetCountries/3
注意:- 我没有升级 umbraco。我只是在安装后将我的代码移动到更高版本
下面是代码片段
namespace Test.Umbraco.Ajax
{
[RestExtensionAttribute("Landing")]
public class Landing : Core.AjaxBase
{
[RestExtensionMethodAttribute]
public static string GetCountries()
{
return Core.RazorRenderer.RenderScriptFile("LandingPage/GetCountries", 0, GetLandingParameters(false));
}
}