2016-01-05 17:14:10 +08:00
|
|
|
|
using System;
|
2015-12-02 10:06:30 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2016-04-25 11:53:21 +08:00
|
|
|
|
using System.Runtime.InteropServices;
|
2015-12-02 10:06:30 +08:00
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.Mvc;
|
2016-04-25 11:53:21 +08:00
|
|
|
|
using Infrastructure;
|
|
|
|
|
using OpenAuth.Mvc.Models;
|
2015-12-02 10:06:30 +08:00
|
|
|
|
|
|
|
|
|
namespace OpenAuth.Mvc.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class ErrorController : Controller
|
|
|
|
|
{
|
2016-04-25 11:53:21 +08:00
|
|
|
|
public ActionResult Http404()
|
2015-12-02 10:06:30 +08:00
|
|
|
|
{
|
2016-04-25 11:53:21 +08:00
|
|
|
|
return Content("貌似URL不在~~", "text/plain");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 演示版本禁止提交
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string DemoError()
|
|
|
|
|
{
|
|
|
|
|
Response.Charset = "utf-8";
|
2016-10-14 11:22:16 +08:00
|
|
|
|
var response = new Response
|
2016-04-25 11:53:21 +08:00
|
|
|
|
{
|
2017-11-28 23:54:49 +08:00
|
|
|
|
Code = 500,
|
2016-10-14 11:22:16 +08:00
|
|
|
|
Message = "演示版本,不能进行此操作"
|
2016-04-25 11:53:21 +08:00
|
|
|
|
};
|
|
|
|
|
return JsonHelper.Instance.Serialize(response);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 没有登录
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>ActionResult.</returns>
|
|
|
|
|
public ActionResult Http401()
|
|
|
|
|
{
|
|
|
|
|
return RedirectToAction("Index", "Login");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-11-01 17:14:51 +08:00
|
|
|
|
public ActionResult Http500()
|
2016-04-25 11:53:21 +08:00
|
|
|
|
{
|
2016-11-01 17:14:51 +08:00
|
|
|
|
return Content("哇哦!服务器内部出问题了,让站长看看日志吧~~", "text/plain");
|
2015-12-02 10:06:30 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|