first commit

This commit is contained in:
Meik
2025-11-11 11:12:05 +01:00
commit 69e2cda8cd
912 changed files with 428004 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System.Web;
using System.Web.Optimization;
namespace F4SDwebService
{
public class BundleConfig
{
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}

View File

@@ -0,0 +1,13 @@
using System.Web;
using System.Web.Mvc;
namespace F4SDwebService
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace F4SDwebService
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}

View File

@@ -0,0 +1,35 @@
using F4SDwebService.ActionFilters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
namespace F4SDwebService
{
public static class WebApiConfig
{
public static cAuthentication authenticationHandler = new cAuthentication();
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
config.MessageHandlers.Add(authenticationHandler);
config.Filters.Add(new CheckLicenceFilter());
config.Filters.Add(new CheckCollectorFilter());
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
var appXmlType = config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == "application/xml");
if (appXmlType != null)
config.Formatters.XmlFormatter.SupportedMediaTypes.Remove(appXmlType);
}
}
}