|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/04556082/ecc0c5af/ |
?#pragma checksum "d:\wwwroot\gzgunuo\wwwroot\global.asax" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "01E21FBE0C9A73EBBCD34CEE0517EDF2"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具天生。
// 运行时版本:2.0.50727.9044
//
// 对此文件的更改可能会导致不正确的行为,并且若是
// 沉新天生代码,这些更改将会迷失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ASP {
#line 285 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.Profile;
#line default
#line hidden
#line 280 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Text.RegularExpressions;
#line default
#line hidden
#line 282 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.Caching;
#line default
#line hidden
#line 278 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Configuration;
#line default
#line hidden
#line 277 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Collections.Specialized;
#line default
#line hidden
#line 289 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.UI.HtmlControls;
#line default
#line hidden
#line 287 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.UI.WebControls;
#line default
#line hidden
#line 276 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Collections;
#line default
#line hidden
#line 286 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.UI;
#line default
#line hidden
#line 288 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.UI.WebControls.WebParts;
#line default
#line hidden
#line 275 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System;
#line default
#line hidden
#line 284 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.Security;
#line default
#line hidden
#line 281 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web;
#line default
#line hidden
#line 283 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Web.SessionState;
#line default
#line hidden
#line 279 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
using System.Text;
#line default
#line hidden
[System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
public class global_asax : global::System.Web.HttpApplication {
private static bool @__initialized;
#line 3 "d:\wwwroot\gzgunuo\wwwroot\global.asax"
void Application_Start(object sender, EventArgs e)
{
//在利用法式启动时运行的代码
}
void Application_End(object sender, EventArgs e)
{
//在利用法式关关时运行的代码
}
void Application_Error(object sender, EventArgs e)
{
//在出现未处置的谬误时运行的代码
////文件夹是否存在,不存在则创建
//if (System.IO.Directory.Exists(Server.MapPath("~/谬误日志")) == false)
// System.IO.Directory.CreateDirectory(Server.MapPath("~/谬误日志"));
////纪录谬误信息
//Exception objErr = Server.GetLastError().GetBaseException();
//string err = "\r\n接见Url:" + Request.Url.ToString() + "\r\n要求IP:" + Request.UserHostAddress + "\r\n谬误信息: :" + objErr.Message.ToString();
//System.IO.File.AppendAllText(Server.MapPath("~/谬误日志/" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"), DateTime.Now.ToString() + err + "\r\n\r\n\r\n");
}
void Session_Start(object sender, EventArgs e)
{
//在新会话启动时运行的代码
}
void Session_End(object sender, EventArgs e)
{
//在会话实现时运行的代码。
// 把稳: 只有在 Web.config 文件中的 sessionstate 模式设置为
// InProc 时,才会引发 Session_End 事务。若是会话模式
//设置为 StateServer 或 SQLServer,则不会引发该事务。
}
protected void Application_BeginRequest(Object sender, EventArgs e)
{
//string Url = UrlString.GetUrl(HttpContext.Current.Request.RawUrl);
//if (Url != "")
// Context.RewritePath(Url);
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
try
{
HttpApplication app = (HttpApplication)sender;
HttpContext ctx = app.Context; ///获取本次Http要求有关的HttpContext对象
if (ctx.Request.IsAuthenticated) //验证过的用户才进行role的处置
{
FormsIdentity id = (FormsIdentity)ctx.User.Identity;
FormsAuthenticationTicket ticket = id.Ticket; //获取身份验证票
string[] roles = ticket.UserData.Split(','); //将身份验证票中的role数据转成字符串数字
//将原有的Identity加上角色信息新建一个GenericPrincipal暗示当前用户,这样当前用户就占有了role信息
ctx.User = new System.Security.Principal.GenericPrincipal(id, roles);
}
}
catch { /* 有异常也不要抛出,预防攻击者试探。 */ }
}
#line default
#line hidden
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global_asax() {
if ((global::ASP.global_asax.@__initialized == false)) {
global::ASP.global_asax.@__initialized = true;
}
}
protected System.Web.Profile.DefaultProfile Profile {
get {
return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
}
}
}
}