From 8cc9daeff6f9dc4441ef962163e95391c005d717 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 13 Oct 2010 11:46:42 -0700 Subject: [PATCH] Adding static root files to Azure solution --HG-- branch : dev --- .../Orchard.Azure.Web/Advisory.html | 14 +++++++++++++ .../Orchard.Azure.Web/Default.aspx | 3 +++ .../Orchard.Azure.Web/Default.aspx.cs | 20 +++++++++++++++++++ .../Orchard.Azure.Web.csproj | 7 +++++++ .../Orchard.Azure.Web/Refresh.html | 15 ++++++++++++++ src/Orchard.sln | 3 --- 6 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 src/Orchard.Azure/Orchard.Azure.Web/Advisory.html create mode 100644 src/Orchard.Azure/Orchard.Azure.Web/Default.aspx create mode 100644 src/Orchard.Azure/Orchard.Azure.Web/Default.aspx.cs create mode 100644 src/Orchard.Azure/Orchard.Azure.Web/Refresh.html diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Advisory.html b/src/Orchard.Azure/Orchard.Azure.Web/Advisory.html new file mode 100644 index 000000000..e1951380b --- /dev/null +++ b/src/Orchard.Azure/Orchard.Azure.Web/Advisory.html @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx b/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx new file mode 100644 index 000000000..fcae21248 --- /dev/null +++ b/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx @@ -0,0 +1,3 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Orchard.Azure.Web._Default" %> + +<%-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. --%> diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx.cs b/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx.cs new file mode 100644 index 000000000..924ecd969 --- /dev/null +++ b/src/Orchard.Azure/Orchard.Azure.Web/Default.aspx.cs @@ -0,0 +1,20 @@ +using System; +using System.Web; +using System.Web.Mvc; +using System.Web.UI; + +namespace Orchard.Azure.Web { + public class _Default : Page { + public void Page_Load(object sender, EventArgs e) { + // Change the current path so that the Routing handler can correctly interpret + // the request, then restore the original path so that the OutputCache module + // can correctly process the response (if caching is enabled). + + var originalPath = Request.Path; + HttpContext.Current.RewritePath(Request.ApplicationPath, false); + IHttpHandler httpHandler = new MvcHttpHandler(); + httpHandler.ProcessRequest(HttpContext.Current); + HttpContext.Current.RewritePath(originalPath, false); + } + } +} \ No newline at end of file diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj index c9cd6af6e..af11c3fa4 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj +++ b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj @@ -143,6 +143,10 @@ + + Default.aspx + ASPXCodeBehind + Global.asax @@ -150,6 +154,8 @@ + + @@ -185,6 +191,7 @@ + Designer diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Refresh.html b/src/Orchard.Azure/Orchard.Azure.Web/Refresh.html new file mode 100644 index 000000000..d113ec296 --- /dev/null +++ b/src/Orchard.Azure/Orchard.Azure.Web/Refresh.html @@ -0,0 +1,15 @@ + + + + Configuration Changing... + + +

+ Orchard is temporarily unavailable as a change in configuration requires a restart. + A simple page refresh usually solves this issue.

+ + + + diff --git a/src/Orchard.sln b/src/Orchard.sln index 9d386c948..240ea3903 100644 --- a/src/Orchard.sln +++ b/src/Orchard.sln @@ -44,9 +44,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Tests", "Tools\Orchard.Tests\Orchard.Tests.csproj", "{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Notes", "_Notes", "{8A49DB66-40B2-4B6A-BFF0-D4839A240D00}" - ProjectSection(SolutionItems) = preProject - Shapes.txt = Shapes.txt - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Modules", "Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj", "{17F86780-9A1F-4AA1-86F1-875EEC2730C7}" EndProject