diff --git a/QuartzNetWebConsole.sln b/QuartzNetWebConsole.sln
index f8be018..70d2b94 100644
--- a/QuartzNetWebConsole.sln
+++ b/QuartzNetWebConsole.sln
@@ -1,6 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CAD78976-5F87-4988-BC1D-E3E70398F7CD}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
@@ -10,15 +12,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CAD789
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuartzNetWebConsole", "QuartzNetWebConsole\QuartzNetWebConsole.csproj", "{72A7A322-38DD-47DD-8948-6ED6E2F9DC5D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "SampleApp\SampleApp.csproj", "{F2832947-64D9-4B0A-A0BD-DDE7E90AC968}"
- ProjectSection(ProjectDependencies) = postProject
- {72A7A322-38DD-47DD-8948-6ED6E2F9DC5D} = {72A7A322-38DD-47DD-8948-6ED6E2F9DC5D}
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuartzNetWebConsole.Tests", "QuartzNetWebConsole.Tests\QuartzNetWebConsole.Tests.csproj", "{05021F00-C4D1-45C3-92EC-92C467B74F67}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "QuartzNetWebConsole.Views", "QuartzNetWebConsole.Views\QuartzNetWebConsole.Views.vbproj", "{7961AB01-1549-4340-8D3D-F0DA43B8C84F}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "SampleApp\SampleApp.csproj", "{AA2D041C-4CDC-4055-8FC5-C0ECD4D8AE48}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -29,10 +28,6 @@ Global
{72A7A322-38DD-47DD-8948-6ED6E2F9DC5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72A7A322-38DD-47DD-8948-6ED6E2F9DC5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72A7A322-38DD-47DD-8948-6ED6E2F9DC5D}.Release|Any CPU.Build.0 = Release|Any CPU
- {F2832947-64D9-4B0A-A0BD-DDE7E90AC968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F2832947-64D9-4B0A-A0BD-DDE7E90AC968}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F2832947-64D9-4B0A-A0BD-DDE7E90AC968}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F2832947-64D9-4B0A-A0BD-DDE7E90AC968}.Release|Any CPU.Build.0 = Release|Any CPU
{05021F00-C4D1-45C3-92EC-92C467B74F67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05021F00-C4D1-45C3-92EC-92C467B74F67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05021F00-C4D1-45C3-92EC-92C467B74F67}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -41,6 +36,10 @@ Global
{7961AB01-1549-4340-8D3D-F0DA43B8C84F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7961AB01-1549-4340-8D3D-F0DA43B8C84F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7961AB01-1549-4340-8D3D-F0DA43B8C84F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA2D041C-4CDC-4055-8FC5-C0ECD4D8AE48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA2D041C-4CDC-4055-8FC5-C0ECD4D8AE48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA2D041C-4CDC-4055-8FC5-C0ECD4D8AE48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA2D041C-4CDC-4055-8FC5-C0ECD4D8AE48}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SampleApp/Default.aspx b/SampleApp/Default.aspx
deleted file mode 100644
index 511add5..0000000
--- a/SampleApp/Default.aspx
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SampleApp._Default" %>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/SampleApp/Default.aspx.cs b/SampleApp/Default.aspx.cs
deleted file mode 100644
index d72d1d6..0000000
--- a/SampleApp/Default.aspx.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-
-namespace SampleApp
-{
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- Response.Redirect("/quartz/index.ashx");
- }
- }
-}
diff --git a/SampleApp/Default.aspx.designer.cs b/SampleApp/Default.aspx.designer.cs
deleted file mode 100644
index 20b2c12..0000000
--- a/SampleApp/Default.aspx.designer.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace SampleApp
-{
-
-
- public partial class _Default
- {
-
- ///
- /// form1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.HtmlControls.HtmlForm form1;
- }
-}
diff --git a/SampleApp/Global.asax b/SampleApp/Global.asax
index 77b4390..4f4fd30 100644
--- a/SampleApp/Global.asax
+++ b/SampleApp/Global.asax
@@ -1 +1 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="SampleApp.Global" Language="C#" %>
+<%@ Application Codebehind="Global.asax.cs" Inherits="SampleApp.MvcApplication" Language="C#" %>
diff --git a/SampleApp/Global.asax.cs b/SampleApp/Global.asax.cs
index d9af062..f30d103 100644
--- a/SampleApp/Global.asax.cs
+++ b/SampleApp/Global.asax.cs
@@ -1,21 +1,15 @@
using System;
using System.Web;
+using System.Web.Routing;
using Quartz;
using Quartz.Impl;
using QuartzNetWebConsole;
namespace SampleApp {
- public class Global : HttpApplication {
-
- static readonly HttpRequest InitialRequest;
-
- static Global() {
- // Workaround to fix error "Request is not available in this context" with IIS7 or IIS Express
- // http://sammyageil.com/post/Request-is-not-available-in-this-context-exception-in-Globalasaxs-Application_Start-IIS-7-Integrated-mode
- InitialRequest = HttpContext.Current.Request;
- }
-
- protected void Application_Start(object sender, EventArgs e) {
+ // Note: For instructions on enabling IIS6 or IIS7 classic mode,
+ // visit http://go.microsoft.com/?LinkId=9394801
+ public class MvcApplication : System.Web.HttpApplication {
+ void Application_Start() {
// First, initialize Quartz.NET as usual. In this sample app I'll configure Quartz.NET by code.
var schedulerFactory = new StdSchedulerFactory();
var scheduler = schedulerFactory.GetScheduler();
@@ -24,9 +18,6 @@ protected void Application_Start(object sender, EventArgs e) {
// This tells the QuartzNetWebConsole what scheduler to use
Setup.Scheduler = () => scheduler;
- // This adds an logger to the QuartzNetWebConsole. It's optional.
- var partialQuartzConsoleUrl = string.Format("http://{0}:{1}/quartz/", InitialRequest.Url.Host, InitialRequest.Url.Port);
- Setup.Logger = new MemoryLogger(1000, partialQuartzConsoleUrl);
// I'll add some global listeners
scheduler.ListenerManager.AddJobListener(new GlobalJobListener());
@@ -39,7 +30,7 @@ protected void Application_Start(object sender, EventArgs e) {
.WithIntervalInSeconds(6))
.StartNow()
.Build();
- var job = new JobDetailImpl("myJob", null, typeof (HelloJob));
+ var job = new JobDetailImpl("myJob", null, typeof(HelloJob));
scheduler.ScheduleJob(job, trigger);
// A cron trigger and job
@@ -52,19 +43,28 @@ protected void Application_Start(object sender, EventArgs e) {
scheduler.ScheduleJob(cron);
// A dummy calendar
- scheduler.AddCalendar("myCalendar", new DummyCalendar {Description = "dummy calendar"}, false, false);
+ scheduler.AddCalendar("myCalendar", new DummyCalendar { Description = "dummy calendar" }, false, false);
+ RouteTable.Routes.Add(new R());
}
- protected void Session_Start(object sender, EventArgs e) {}
-
- protected void Application_BeginRequest(object sender, EventArgs e) {}
-
- protected void Application_AuthenticateRequest(object sender, EventArgs e) {}
-
- protected void Application_Error(object sender, EventArgs e) {}
-
- protected void Session_End(object sender, EventArgs e) {}
-
- protected void Application_End(object sender, EventArgs e) {}
+ private class R : RouteBase {
+ private static readonly Lazy