diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/App.config b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/App.config
index 88fa402..438344a 100644
--- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/App.config
+++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/App.config
@@ -1,6 +1,14 @@
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Service1.cs b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Service1.cs
index 6c74fff..807a109 100644
--- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Service1.cs
+++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Service1.cs
@@ -11,7 +11,9 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
+using Microsoft.Owin.FileSystems;
using Microsoft.Owin.Hosting;
+using Microsoft.Owin.StaticFiles;
using Owin;
namespace WindowsDataCenter
@@ -81,6 +83,21 @@ namespace WindowsDataCenter
);
appBuilder.UseWebApi(config);
+
+ var fileSystem = new PhysicalFileSystem(@"./www");
+ var options = new FileServerOptions
+ {
+ EnableDefaultFiles = true,
+ FileSystem = fileSystem
+ };
+ options.StaticFileOptions.FileSystem = fileSystem;
+ options.StaticFileOptions.ServeUnknownFileTypes = true;
+ options.DefaultFilesOptions.DefaultFileNames = new[]
+ {
+ "index.html"
+ };
+
+ appBuilder.UseFileServer(options);
}
}
@@ -104,6 +121,28 @@ namespace WindowsDataCenter
}
}
+ public class RouteController : ApiController
+ {
+ public IHttpActionResult Get()
+ {
+ List routeList = new List();
+ var routes = GlobalConfiguration.Configuration.Routes;
+ foreach (var route in routes)
+ {
+ var obj = new RouteObject();
+ obj.RouteUrl = route.RouteTemplate;
+ routeList.Add(obj);
+ }
+
+ return Json(routeList);
+ }
+
+ class RouteObject
+ {
+ public string RouteUrl { get; set; }
+ }
+ }
+
public class UsersController : ApiController
{
public IHttpActionResult GetUsers()
diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj
index e3aad17..60b6e87 100644
--- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj
+++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/WindowsDataCenter.csproj
@@ -33,8 +33,12 @@
4
-
- ..\packages\Microsoft.Owin.2.0.2\lib\net45\Microsoft.Owin.dll
+
+ ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
+ True
+
+
+ ..\packages\Microsoft.Owin.FileSystems.3.0.1\lib\net45\Microsoft.Owin.FileSystems.dll
True
@@ -45,6 +49,10 @@
..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll
True
+
+ ..\packages\Microsoft.Owin.StaticFiles.3.0.1\lib\net45\Microsoft.Owin.StaticFiles.dll
+ True
+
..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll
True
@@ -59,6 +67,7 @@
..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll
True
+
..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll
True
@@ -67,6 +76,10 @@
..\packages\Microsoft.AspNet.WebApi.Owin.5.2.3\lib\net45\System.Web.Http.Owin.dll
True
+
+ ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll
+ True
+
@@ -90,6 +103,59 @@
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ Always
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ Always
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | ID |
+ UserId |
+ firstName |
+ lastName |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+