Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts: src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs src/Umbraco.Core/Constants-Conventions.cs src/Umbraco.Core/Models/Member.cs src/Umbraco.Core/Models/Membership/IUser.cs src/Umbraco.Core/Models/Template.cs src/Umbraco.Core/Persistence/Factories/MemberReadOnlyFactory.cs src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs src/Umbraco.Core/Persistence/Repositories/Interfaces/IMemberRepository.cs src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs src/Umbraco.Core/Persistence/Repositories/MemberGroupRepository.cs src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs src/Umbraco.Core/Persistence/RepositoryFactory.cs src/Umbraco.Core/Services/ContentService.cs src/Umbraco.Core/Services/IMemberTypeService.cs src/Umbraco.Core/Services/IMembershipUserService.cs src/Umbraco.Core/Services/IUserService.cs src/Umbraco.Core/Services/MemberService.cs src/Umbraco.Core/Services/MemberTypeService.cs src/Umbraco.Core/Services/ServiceContext.cs src/Umbraco.Core/Services/UserService.cs src/Umbraco.Core/Umbraco.Core.csproj src/Umbraco.Tests/MockTests.cs src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs src/Umbraco.Web.UI/Umbraco.Web.UI.csproj src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Breadcrumb.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EditProfile.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListAncestorsFromCurrentPage.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListChildPagesFromCurrentPage.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListChildPagesOrderedByDate.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListChildPagesOrderedByName.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListChildPagesWithDoctype.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/ListDescendantsFromCurrentPage.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Login.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/LoginStatus.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/MultinodeTree-picker.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/Navigation.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/RegisterMember.cshtml src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/SiteMap.cshtml src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs src/Umbraco.Web.UI/config/umbracoSettings.config src/Umbraco.Web/Cache/CacheRefresherEventHandler.cs src/Umbraco.Web/Controllers/UmbLoginController.cs src/Umbraco.Web/Controllers/UmbLoginStatusController.cs src/Umbraco.Web/Controllers/UmbProfileController.cs src/Umbraco.Web/Controllers/UmbRegisterController.cs src/Umbraco.Web/Models/LoginModel.cs src/Umbraco.Web/Models/LoginStatusModel.cs src/Umbraco.Web/Models/ProfileModel.cs src/Umbraco.Web/Models/RegisterModel.cs src/Umbraco.Web/Models/UmbracoProperty.cs src/Umbraco.Web/Mvc/UmbracoViewPageOfTModel.cs src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedMediaCache.cs src/Umbraco.Web/Security/WebSecurity.cs src/Umbraco.Web/Umbraco.Web.csproj src/Umbraco.Web/UmbracoModule.cs src/Umbraco.Web/WebApi/UmbracoApiController.cs src/Umbraco.Web/umbraco.presentation/library.cs src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewMacrosTasks.cs src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs src/Umbraco.Web/umbraco.presentation/umbracobase/baseLibrary.cs src/Umbraco.Web/umbraco.presentation/umbracobase/restExtension.cs src/umbraco.businesslogic/User.cs src/umbraco.providers/UsersMembershipProvider.cs src/umbraco.providers/members/UmbracoMembershipProvider.cs
This commit is contained in:
@@ -98,7 +98,7 @@ namespace Umbraco.Web
|
||||
if (UmbracoContext.Current.RoutingContext == null)
|
||||
throw new InvalidOperationException("The UmbracoContext.RoutingContext has not been assigned, ProcessRequest cannot proceed unless there is a RoutingContext assigned to the UmbracoContext");
|
||||
|
||||
var umbracoContext = UmbracoContext.Current;
|
||||
var umbracoContext = UmbracoContext.Current;
|
||||
|
||||
//re-write for the default back office path
|
||||
if (httpContext.Request.Url.IsDefaultBackOfficeRequest())
|
||||
@@ -481,7 +481,8 @@ namespace Umbraco.Web
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rewrites to the correct Umbraco handler, either WebForms or Mvc
|
||||
/// Rewrites to the Umbraco handler - we always send the request via our MVC rendering engine, this will deal with
|
||||
/// requests destined for webforms.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <param name="pcr"> </param>
|
||||
@@ -492,49 +493,24 @@ namespace Umbraco.Web
|
||||
// rewritten url, but this is not what we want!
|
||||
// read: http://forums.iis.net/t/1146511.aspx
|
||||
|
||||
string query = pcr.Uri.Query.TrimStart(new[] { '?' });
|
||||
var query = pcr.Uri.Query.TrimStart(new[] { '?' });
|
||||
|
||||
string rewritePath;
|
||||
// GlobalSettings.Path has already been through IOHelper.ResolveUrl() so it begins with / and vdir (if any)
|
||||
var rewritePath = GlobalSettings.Path.TrimEnd(new[] { '/' }) + "/RenderMvc";
|
||||
// rewrite the path to the path of the handler (i.e. /umbraco/RenderMvc)
|
||||
context.RewritePath(rewritePath, "", query, false);
|
||||
|
||||
if (pcr.RenderingEngine == RenderingEngine.Unknown)
|
||||
{
|
||||
// Unkwnown means that no template was found. Default to Mvc because Mvc supports hijacking
|
||||
// routes which sometimes doesn't require a template since the developer may want full control
|
||||
// over the rendering. Can't do it in WebForms, so Mvc it is. And Mvc will also handle what to
|
||||
// do if no template or hijacked route is exist.
|
||||
pcr.RenderingEngine = RenderingEngine.Mvc;
|
||||
}
|
||||
|
||||
switch (pcr.RenderingEngine)
|
||||
{
|
||||
case RenderingEngine.Mvc:
|
||||
// GlobalSettings.Path has already been through IOHelper.ResolveUrl() so it begins with / and vdir (if any)
|
||||
rewritePath = GlobalSettings.Path.TrimEnd(new[] { '/' }) + "/RenderMvc";
|
||||
// rewrite the path to the path of the handler (i.e. /umbraco/RenderMvc)
|
||||
context.RewritePath(rewritePath, "", query, false);
|
||||
|
||||
//if it is MVC we need to do something special, we are not using TransferRequest as this will
|
||||
//require us to rewrite the path with query strings and then reparse the query strings, this would
|
||||
//also mean that we need to handle IIS 7 vs pre-IIS 7 differently. Instead we are just going to create
|
||||
//an instance of the UrlRoutingModule and call it's PostResolveRequestCache method. This does:
|
||||
// * Looks up the route based on the new rewritten URL
|
||||
// * Creates the RequestContext with all route parameters and then executes the correct handler that matches the route
|
||||
//we also cannot re-create this functionality because the setter for the HttpContext.Request.RequestContext is internal
|
||||
//so really, this is pretty much the only way without using Server.TransferRequest and if we did that, we'd have to rethink
|
||||
//a bunch of things!
|
||||
var urlRouting = new UrlRoutingModule();
|
||||
urlRouting.PostResolveRequestCache(context);
|
||||
break;
|
||||
|
||||
case RenderingEngine.WebForms:
|
||||
rewritePath = "~/default.aspx";
|
||||
// rewrite the path to the path of the handler (i.e. default.aspx)
|
||||
context.RewritePath(rewritePath, "", query, false);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new Exception("Invalid RenderingEngine.");
|
||||
}
|
||||
//if it is MVC we need to do something special, we are not using TransferRequest as this will
|
||||
//require us to rewrite the path with query strings and then reparse the query strings, this would
|
||||
//also mean that we need to handle IIS 7 vs pre-IIS 7 differently. Instead we are just going to create
|
||||
//an instance of the UrlRoutingModule and call it's PostResolveRequestCache method. This does:
|
||||
// * Looks up the route based on the new rewritten URL
|
||||
// * Creates the RequestContext with all route parameters and then executes the correct handler that matches the route
|
||||
//we also cannot re-create this functionality because the setter for the HttpContext.Request.RequestContext is internal
|
||||
//so really, this is pretty much the only way without using Server.TransferRequest and if we did that, we'd have to rethink
|
||||
//a bunch of things!
|
||||
var urlRouting = new UrlRoutingModule();
|
||||
urlRouting.PostResolveRequestCache(context);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user