Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DCode.Models/Enums/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public enum ErrorRedirectType
[Description("You are unauthorized to view this page")]
Unauthorized,

[Description("Hello Practitioner! Please access the <a href='https://www.freelancer.com/deloitte/'>MyGigs</a> site henceforth.")]
MyGigsRedirect,

[Description("An unknown error occurred while processing your request.")]
Unknown
}
Expand Down
14 changes: 10 additions & 4 deletions DCode.Web/App_Start/RouteConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ public static void RegisterRoutes(RouteCollection routes)
// defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
//);

// routes.MapRoute(
// name: "Default",
// url: "{*any}",
// defaults: new { controller = "Error", action = "Index", id = UrlParameter.Optional }
//);

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);

routes.MapRoute(
name: "ErrorPage",
Expand Down
1 change: 1 addition & 0 deletions DCode.Web/App_Start/Startup.Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Owin.Security.Google;
using Owin;
using DCode.Web.Models;
using System.Threading.Tasks;

namespace DCode.Web
{
Expand Down
1 change: 1 addition & 0 deletions DCode.Web/Controllers/ErrorController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class ErrorController : Controller
// GET: Error
public ActionResult Index()
{
TempData[Constants.ErrorRedirectType] = ErrorRedirectType.MyGigsRedirect;

var redirectType = TempData[Constants.ErrorRedirectType] != null
? (ErrorRedirectType)TempData[Constants.ErrorRedirectType]
Expand Down
16 changes: 9 additions & 7 deletions DCode.Web/Views/Error/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@
<div style="height:38vh;padding:20px;">
<div>&nbsp;</div>
<div class="background-color-fff" style="padding:20px;">
@*<h3 class="dark-grey-blue font-size-24 text-danger">Info</h3>
<p class="myDescription margin-bottom-25">@Html.Raw(Model.Message)</p>*@
<h3 class="dark-grey-blue font-size-24 text-danger">Error</h3>
<p class="myDescription margin-bottom-25">@Model.Message</p>
</div>
@*<div class="new-style-DTM-profile-main-inner-body" style="padding-right:20px;padding-bottom:20px;">
<div class="background-color-fff">
<div class="fst-login" >
<div style="padding-top:10px;padding-bottom:10px;">
<h3 class="dark-grey-blue font-size-24 text-danger">Error</h3>
<p class="myDescription margin-bottom-25">@Model.Message</p>
<div class="background-color-fff">
<div class="fst-login" >
<div style="padding-top:10px;padding-bottom:10px;">
<h3 class="dark-grey-blue font-size-24 text-danger">Error</h3>
<p class="myDescription margin-bottom-25">@Model.Message</p>
</div>
</div>
</div>
</div>
</div>*@
</div>*@

</div>

Expand Down