1
public ActionResult Index(
int pindex =
0)
2 {
3
try
4 {
5
var profiler = MiniProfiler.Current;
//
it's ok if this is null
6
using (profiler.Step(
"
Test Bless page
"))
7 {
//
something more interesting here
8 ViewBag.BlessMessageList = GetBlessingStr(pindex);
9 Thread.Sleep(
100);
10
11 }
12 }
13
catch (Exception ex)
14 {
15
#region 操作失败发送邮件给管理员
16 EmailServer send =
new EmailServer();
17
string body =
"
祭奠在线网站祈福墙出现错误,错误信息:
" + ex.Message;
18
//
这个是附件列表
19 List<
string> list =
new List<
string>();
20
string reciveMail = StringHelper.GetReceiveMail();
21
string CcEmailList = StringHelper.GetCCMailList();
22 send.Send(reciveMail,
"", CcEmailList,
"
祭奠在线网站报错邮件
", body, list);
23
#endregion
24
//
并记录错误日志
25 Log.WriteLog(
"
网站祈福墙信息
",
"
/Log/Blessing/
", ex.Message);
26
//
strJson = "系统正在升级,请稍候再试!";
27 }
28
return View();
29