diff --git a/.vs/MP-IO/v14/.suo b/.vs/MP-IO/v14/.suo
index 4af5599e..61d61cb5 100644
Binary files a/.vs/MP-IO/v14/.suo and b/.vs/MP-IO/v14/.suo differ
diff --git a/MP-IO.sln b/MP-IO.sln
index b94cd51e..e678f3c8 100644
--- a/MP-IO.sln
+++ b/MP-IO.sln
@@ -11,8 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamWare", "..\..\Steamwar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP-IO", "MP-IO\MP-IO.csproj", "{CE6CADA3-FA0E-41D6-AD43-8C92481DC29E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MP-API", "MP-API\MP-API.csproj", "{DBA8D30F-006A-4EDE-9D9B-A50A363098B5}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
218_SP|Any CPU = 218_SP|Any CPU
@@ -242,56 +240,6 @@ Global
{CE6CADA3-FA0E-41D6-AD43-8C92481DC29E}.Valgasket|Any CPU.Build.0 = IIS02|Any CPU
{CE6CADA3-FA0E-41D6-AD43-8C92481DC29E}.WinLab|Any CPU.ActiveCfg = IIS02|Any CPU
{CE6CADA3-FA0E-41D6-AD43-8C92481DC29E}.WinLab|Any CPU.Build.0 = IIS02|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.218_SP|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.218_SP|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.218_test|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.218_test|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Alumat|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Alumat|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.CMS|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.CMS|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.DEMO|Any CPU.ActiveCfg = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.DEMO|Any CPU.Build.0 = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.deploy|Any CPU.ActiveCfg = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.deploy|Any CPU.Build.0 = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Donati|Any CPU.ActiveCfg = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Donati|Any CPU.Build.0 = Debug|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.EQUA|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.EQUA|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.ETS|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.ETS|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.ETS-218|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.ETS-218|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01_SP|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01_SP|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01_TK|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01_TK|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS01|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02_SP|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02_SP|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02_TK|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02_TK|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.IIS02|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.MoonProDemo-OVH|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.MoonProDemo-OVH|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.OVH-demo|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.OVH-demo|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Release|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.SomaschiniUSA|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.SomaschiniUSA|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Steamware|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Steamware|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Valgasket|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.Valgasket|Any CPU.Build.0 = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.WinLab|Any CPU.ActiveCfg = Release|Any CPU
- {DBA8D30F-006A-4EDE-9D9B-A50A363098B5}.WinLab|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MP-IO/Alive.aspx.cs b/MP-IO/Alive.aspx.cs
index 21236834..26061da3 100644
--- a/MP-IO/Alive.aspx.cs
+++ b/MP-IO/Alive.aspx.cs
@@ -11,9 +11,12 @@ namespace MP_IO
{
protected void Page_Load(object sender, EventArgs e)
{
+ Response.Redirect("IOB");
+#if false
Response.Clear();
Response.Write("OK");
- Context.Response.End();
+ Context.Response.End();
+#endif
}
}
}
\ No newline at end of file
diff --git a/MP-IO/App_Start/RouteConfig.cs b/MP-IO/App_Start/RouteConfig.cs
new file mode 100644
index 00000000..fe621b9f
--- /dev/null
+++ b/MP-IO/App_Start/RouteConfig.cs
@@ -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 MP_IO
+{
+ 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 }
+ );
+ }
+ }
+}
diff --git a/MP-IO/Controllers/IOBController.cs b/MP-IO/Controllers/IOBController.cs
new file mode 100644
index 00000000..dde3f5b1
--- /dev/null
+++ b/MP-IO/Controllers/IOBController.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using MapoDb;
+
+namespace MP_IO.Controllers
+{
+ public class IOBController : Controller
+ {
+ // GET: IOB (è un check alive)
+ public string Index()
+ {
+ return "OK";
+ }
+
+ // disabilitato: non vale la pena
+ //// GET: IOB/enabled/5 - tenuta in cache per 5 sec...
+ //[OutputCache(Duration = 5, VaryByParam = "id")]
+
+ // GET: IOB/enabled/5
+ public string enabled(int? id)
+ {
+ string answ = "ND";
+ // se id nullo --> KO!
+ if (id == null)
+ {
+ answ = "KO";
+ }
+ else
+ {
+ int idx = 0;
+ Int32.TryParse(id.ToString(), out idx);
+ // verifico se sia abilitato INSERT x una data macchina
+ if (MapoDb.MapoDb.obj.insEnabled(idx))
+ {
+ answ = "OK";
+ }
+ else
+ {
+ answ = "NO";
+ }
+ }
+ return answ;
+ }
+ // GET: IOB/slog/5
+ public string slog(int? id)
+ {
+ string answ = "ND";
+ // se id nullo --> KO!
+ if (id == null)
+ {
+ answ = "KO";
+ }
+ else
+ {
+ int idx = 0;
+ Int32.TryParse(id.ToString(), out idx);
+ // verifico se sia abilitato SignalLog x una data macchina
+ if (MapoDb.MapoDb.obj.sLogEnabled(idx))
+ {
+ answ = "OK";
+ }
+ else
+ {
+ answ = "NO";
+ }
+ }
+ return answ;
+ }
+ // GET: IOB/input/5
+ public string input(int? id)
+ {
+ string answ = "OK " + id.ToString();
+ // controllo se sia da fare rilettura da DB dello stato macchina ( SE non c'è il valore oppure se il valore "maxAgeSec" è stato superato )
+
+
+ // verifico se sia abilitato INSERT x una data macchina
+
+ // cerco prima in cache memory (altrimenti la popolo da DB)
+
+
+ return answ;
+ }
+ }
+}
\ No newline at end of file
diff --git a/MP-IO/Global.asax b/MP-IO/Global.asax
new file mode 100644
index 00000000..a04a0ffe
--- /dev/null
+++ b/MP-IO/Global.asax
@@ -0,0 +1 @@
+<%@ Application Codebehind="Global.asax.cs" Inherits="MP_IO.WebApiApplication" Language="C#" %>
diff --git a/MP-IO/Global.asax.cs b/MP-IO/Global.asax.cs
new file mode 100644
index 00000000..627bc321
--- /dev/null
+++ b/MP-IO/Global.asax.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+//using System.Web.Http;
+using System.Web.Mvc;
+//using System.Web.Optimization;
+using System.Web.Routing;
+
+namespace MP_IO
+{
+ public class WebApiApplication : System.Web.HttpApplication
+ {
+ protected void Application_Start()
+ {
+ AreaRegistration.RegisterAllAreas();
+ //GlobalConfiguration.Configure(WebApiConfig.Register);
+ //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
+ RouteConfig.RegisterRoutes(RouteTable.Routes);
+ //BundleConfig.RegisterBundles(BundleTable.Bundles);
+ }
+ }
+}
diff --git a/MP-IO/MP-IO.csproj b/MP-IO/MP-IO.csproj
index bc3ba1c3..ad7559bc 100644
--- a/MP-IO/MP-IO.csproj
+++ b/MP-IO/MP-IO.csproj
@@ -43,6 +43,10 @@
+
+ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
+ True
+
@@ -53,6 +57,30 @@
+
+ ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll
+ True
+
+
+ ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll
+ True
+
@@ -63,6 +91,7 @@
+
@@ -105,6 +134,8 @@
Alive.aspx
+
+
Default.aspx
ASPXCodeBehind
@@ -119,6 +150,9 @@
enabled.aspx
+
+ Global.asax
+
inputIOB.aspx
ASPXCodeBehind
@@ -158,6 +192,7 @@
+
diff --git a/MP-IO/Web.config b/MP-IO/Web.config
index 11c1142e..16654940 100644
--- a/MP-IO/Web.config
+++ b/MP-IO/Web.config
@@ -6,29 +6,36 @@
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MP-IO/enabled.aspx.cs b/MP-IO/enabled.aspx.cs
index 5eae191f..ab9df7aa 100644
--- a/MP-IO/enabled.aspx.cs
+++ b/MP-IO/enabled.aspx.cs
@@ -18,6 +18,8 @@ namespace MP_IO
///
protected void Page_Load(object sender, EventArgs e)
{
+ Response.Redirect(string.Format("IOB/enabled/{0}", Request.QueryString["idxMacchina"]));
+#if false
// legge i get x processare la seriale
int idxMacchina = 0;
bool enabled = false;
@@ -63,7 +65,8 @@ namespace MP_IO
// ripulisco pagina restituita e tolgo html (solo codice ok/NO)
Response.Clear();
Response.Write(answ);
- Context.Response.End();
+ Context.Response.End();
+#endif
}
}
}
\ No newline at end of file
diff --git a/MP-IO/packages.config b/MP-IO/packages.config
new file mode 100644
index 00000000..6729ced4
--- /dev/null
+++ b/MP-IO/packages.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MP-IO/sigLogEnabled.aspx.cs b/MP-IO/sigLogEnabled.aspx.cs
index 426af5ce..6439e412 100644
--- a/MP-IO/sigLogEnabled.aspx.cs
+++ b/MP-IO/sigLogEnabled.aspx.cs
@@ -12,6 +12,8 @@ namespace MP_IO
///
protected void Page_Load(object sender, EventArgs e)
{
+ Response.Redirect(string.Format("IOB/slog/{0}", Request.QueryString["idxMacchina"]));
+#if false
// legge i get x processare la seriale
int idxMacchina = 0;
bool enabled = false;
@@ -57,7 +59,8 @@ namespace MP_IO
// ripulisco pagina restituita e tolgo html (solo codice ok/NO)
Response.Clear();
Response.Write(answ);
- Context.Response.End();
+ Context.Response.End();
+#endif
}
}
}
\ No newline at end of file