webservice 中 获取 session
发布时间:2020-12-17 00:15:32 所属栏目:安全 来源:网络整理
导读:[WebMethod(EnableSession = true)] public bool login(string userName,string password) { if (Session["user"] != null) return true; if (userName == password userName.Length == 5) { Session["user"] = userName; return true; } return false; } ?
[WebMethod(EnableSession = true)] public bool login(string userName,string password) { if (Session["user"] != null) return true; if (userName == password && userName.Length == 5) { Session["user"] = userName; return true; } return false; } ? ? 设置 EnableSession=true 属性 必须滴 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 在我的tests / bootstrap / setup / etc中使用phpunit命令行
- AngularJS与Angular-ui-router和jQuery-File-Upload
- 在容器中运行 Jenkins pipeline 任务
- angularjs – 如何使用angular.js-resource启用cors请求
- Angular 4 依赖注入教程之一 依赖注入简介
- scala – 是特定语言的演员模式吗?
- angularjs – 用标准网络技术替换角度
- 企业Shell面试题18:破解RANDOM随机数案例
- webservice远程测试显示"测试窗体只能用于来自本地...
- 使用shell编写九九乘法表,mysql分库备份