Released windows auth, connect to ES.Services.
This commit is contained in:
parent
2569e55609
commit
d29c347ff4
294 changed files with 329583 additions and 2315 deletions
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Web.Mvc;
|
||||
using WebsitePanel.WebDavPortal.Config;
|
||||
using WebsitePanel.WebDavPortal.Models;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.Controllers
|
||||
{
|
||||
public class ErrorController : Controller
|
||||
{
|
||||
public ActionResult Index(int statusCode, Exception exception, bool isAjaxRequet)
|
||||
{
|
||||
var model = new ErrorModel
|
||||
{
|
||||
HttpStatusCode = statusCode,
|
||||
Message = WebDavAppConfigManager.Instance.HttpErrors[statusCode],
|
||||
Exception = exception
|
||||
};
|
||||
|
||||
Response.StatusCode = statusCode;
|
||||
|
||||
if (!isAjaxRequet)
|
||||
return View(model);
|
||||
|
||||
var errorObject = new { statusCode = model.HttpStatusCode, message = model.Message };
|
||||
return Json(errorObject, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue