首页新闻找找看学习计划

谁能给解析下 代码!

0
[待解决问题]

  public class Handler1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {

            string fDate = context.Request.Form["fDate"];
            string InfoContent=context.Request.Form["InfoContent"];
            int InfoKind = Convert.ToInt32(context.Request.Form["InfoKind"]);
            string Author = context.Request.Form["Author"];

            loginReturn lr = new loginReturn();

            int userId = SSO.Class2.ValidateUserInfo(fDate,InfoKind,InfoContent,Author);
            if (userId > 0)
            {
                SSORequest ssorequest = new SSORequest();
         
                if (Authentication.CreateAppToken(ssorequest))
                {
                    lr.userId = userId;
                    lr.AA_Token = ssorequest.AA_Token;
                    context.Response.Write(JsonHelper.JsonSerializer(lr));
                }
            }
            lr.userId = -1;
            lr.AA_Token = "";
            context.Response.Write(JsonHelper.JsonSerializer(lr));
        }

水嫩小白菜的主页 水嫩小白菜 | 初学一级 | 园豆:3
提问于:2012-09-22 16:33
< >
分享
所有回答(1)
0

.ashx ,ajax 异步的查询 用户信息

当前用户已经登录的话就输出用户信息,不过看了好像代码错了把,, 

                  lr.AA_Token = ssorequest.AA_Token;
                    context.Response.Write(JsonHelper.JsonSerializer(lr));

后面应该要停止输出  context.Response.End();

不然后面应该后面继续输出,没登陆信息。。

阿K&LiveCai | 园豆:514 (小虾三级) | 2012-09-22 16:42

大神能加个QQ说么!麻烦你给小弟分析下!

支持(0) 反对(0) 水嫩小白菜 | 园豆:3 (初学一级) | 2012-09-22 16:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册