我的应用程序的 global.asax 文件中有一些代码。每次我调试我的网站时,我都会sqlexception
因为某种原因得到一个:
void Application_AuthorizeRequest(object sender, EventArgs e)
{
if (Membership.GetUser() != null && Roles.IsUserInRole("UnFilled")) // this is where I get the exception
{
if (Response.Cookies["Expiration"] == null)
{
HttpRequest request = Context.Request;
HttpResponse response = Context.Response;
response.ContentType = ".aspx";
response.Write(request.Url.Host + "/Activate.aspx?account="+Membership.GetUser().Email);
}
}
}
有谁知道我为什么会得到这个,我该如何解决?