Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
28 lines
824 B
C#
28 lines
824 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
#if !NET8
|
|
using System.Web.Mvc;
|
|
#endif
|
|
using System.Web.Routing;
|
|
|
|
namespace Fab2ApprovalSystem;
|
|
|
|
public class RouteConfig {
|
|
public static void RegisterRoutes(RouteCollection routes) {
|
|
#if !NET8
|
|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
|
|
|
routes.MapRoute(
|
|
name: "Default",
|
|
url: "{controller}/{action}/{id}",
|
|
// fixing hyperlinks so that the login page will redirect to them
|
|
// set the default route to the desired landing page, instead of the login page
|
|
// otherwise MVC generates the wrong form action url
|
|
defaults: new { controller = "Home", action = "MyTasks", id = UrlParameter.Optional }
|
|
);
|
|
#endif
|
|
}
|
|
} |