当我尝试访问此控制器而没有登录到我的门户网站时,我有一个控制器作业,返回的网址没有正确形成它看起来像 http://test-employer.cloudapp.net/accounts?ReturnUrl=%2F
并用于访问其正确形成的任何其他控制器 http://test-employer.cloudapp.net/accounts?ReturnUrl=%2Fusers 以下是我的路由配置
routes.MapRoute(
name: "JobFeed",
url: "jobs/{q}/jobfeed.xml",
defaults: new { controller = "Jobs", action = "Feed", q = UrlParameter.Optional }
);
routes.MapRoute(
name: "JobPostingFeed",
url: "postings/{q}/jobfeed.xml",
defaults: new { controller = "Postings", action = "Feed", q = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);