mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Remove default.aspx from Orchard.web
It hasn't been needed since MVC2, and it now broken with MVC3. --HG-- branch : dev extra : transplant_source : N%CA%B4%F6%13%9C%BE%2AL%14z_%13%A9%90cF%00%DCn
This commit is contained in:
@@ -184,7 +184,7 @@ Scenario: I set my blog to be the content for the home page and the posts for th
|
|||||||
| Body.Text | Hi there. |
|
| Body.Text | Hi there. |
|
||||||
And I hit "Publish Now"
|
And I hit "Publish Now"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
And I go to "/Default.aspx"
|
And I go to "/"
|
||||||
Then I should see "<h1>My Blog</h1>"
|
Then I should see "<h1>My Blog</h1>"
|
||||||
When I go to "/my-blog"
|
When I go to "/my-blog"
|
||||||
Then the status should be 404 "Not Found"
|
Then the status should be 404 "Not Found"
|
||||||
|
8
src/Orchard.Specs/Blogs.feature.cs
generated
8
src/Orchard.Specs/Blogs.feature.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||||
// SpecFlow Version:1.4.0.0
|
// SpecFlow Version:1.3.2.0
|
||||||
// Runtime Version:4.0.30319.1
|
// Runtime Version:4.0.30319.1
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
@@ -14,7 +14,7 @@ namespace Orchard.Specs
|
|||||||
using TechTalk.SpecFlow;
|
using TechTalk.SpecFlow;
|
||||||
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
|
||||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[NUnit.Framework.TestFixtureAttribute()]
|
[NUnit.Framework.TestFixtureAttribute()]
|
||||||
[NUnit.Framework.DescriptionAttribute("Blog")]
|
[NUnit.Framework.DescriptionAttribute("Blog")]
|
||||||
@@ -31,7 +31,7 @@ namespace Orchard.Specs
|
|||||||
{
|
{
|
||||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" +
|
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" +
|
||||||
", publish and edit blog posts", GenerationTargetLanguage.CSharp, ((string[])(null)));
|
", publish and edit blog posts", ((string[])(null)));
|
||||||
testRunner.OnFeatureStart(featureInfo);
|
testRunner.OnFeatureStart(featureInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 186
|
#line 186
|
||||||
testRunner.And("I am redirected");
|
testRunner.And("I am redirected");
|
||||||
#line 187
|
#line 187
|
||||||
testRunner.And("I go to \"/Default.aspx\"");
|
testRunner.And("I go to \"/\"");
|
||||||
#line 188
|
#line 188
|
||||||
testRunner.Then("I should see \"<h1>My Blog</h1>\"");
|
testRunner.Then("I should see \"<h1>My Blog</h1>\"");
|
||||||
#line 189
|
#line 189
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
<%@ Page AutoEventWireup="true" Inherits="Orchard.Specs.Hosting.Orchard.Web._Default, Orchard.Specs" %>
|
|
@@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using System.Web.UI;
|
|
||||||
|
|
||||||
namespace Orchard.Specs.Hosting.Orchard.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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -74,6 +74,9 @@ namespace Orchard.Specs.Hosting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static string StripVDir(string urlPath, string virtualDirectory) {
|
private static string StripVDir(string urlPath, string virtualDirectory) {
|
||||||
|
if (urlPath == "/")
|
||||||
|
return urlPath;
|
||||||
|
|
||||||
return urlPath.StartsWith(virtualDirectory, StringComparison.OrdinalIgnoreCase)
|
return urlPath.StartsWith(virtualDirectory, StringComparison.OrdinalIgnoreCase)
|
||||||
? urlPath.Substring(virtualDirectory.Length)
|
? urlPath.Substring(virtualDirectory.Length)
|
||||||
: urlPath;
|
: urlPath;
|
||||||
|
@@ -203,9 +203,6 @@
|
|||||||
<Compile Include="Hosting\WebHostAgent.cs" />
|
<Compile Include="Hosting\WebHostAgent.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Bindings\SanityCheck.cs" />
|
<Compile Include="Bindings\SanityCheck.cs" />
|
||||||
<Compile Include="Hosting\Orchard.Web\_Default.aspx.cs">
|
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="WebHosting.feature.cs">
|
<Compile Include="WebHosting.feature.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
@@ -332,9 +329,6 @@
|
|||||||
<Content Include="Hosting\Simple.Web\Content\Static.txt">
|
<Content Include="Hosting\Simple.Web\Content\Static.txt">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Hosting\Orchard.Web\Default.aspx">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Hosting\Orchard.Web\Global.asax">
|
<Content Include="Hosting\Orchard.Web\Global.asax">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Orchard.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. --%>
|
|
@@ -1,20 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
using System.Web.UI;
|
|
||||||
|
|
||||||
namespace Orchard.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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -118,10 +118,6 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Default.aspx.cs">
|
|
||||||
<DependentUpon>Default.aspx</DependentUpon>
|
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -130,7 +126,6 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Default.aspx" />
|
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
<Content Include="Media\OrchardLogo.png" />
|
<Content Include="Media\OrchardLogo.png" />
|
||||||
<Content Include="Refresh.html" />
|
<Content Include="Refresh.html" />
|
||||||
|
Reference in New Issue
Block a user