首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >sqlexception 'timeout expired'?

sqlexception 'timeout expired'?
EN

Stack Overflow用户
提问于 2012-07-29 11:28:29
回答 1查看 254关注 0票数 1

我的应用程序的global.asax文件中有一些代码。每次我调试我的网站时,我都会因为某些原因得到一个sqlexception

代码语言:javascript
复制
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);  
        }
    }      
}

有人知道我为什么会这样吗,我该怎么解决它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-08 11:51:22

我已经找到了答案,但不确定为什么它会起作用。如果我将代码放入一个自定义的http处理程序中,它似乎可以工作。

感谢所有的贡献。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11706416

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档