随笔分类 - Security
SPContext.Current.Web.CurrentUser 为 null
摘要:刚遇到个情况,记录一下。问题描述:网站为表单验证,并开启匿名。用户A从来没登陆过网站,也没有为A在网站中配置任何权限。就是说如果不开匿名,A无权法访问网站。这时使用A登陆网站(已开启匿名访问),SPContext.Current.Web.CurrentUser 就会为null。解决方法:将用户A或者所有验证用户加入访问者组,或者为A分配其他权限。配置完成后,重新用A登陆,SPContext.Current.Web.CurrentUser就可以正常工作了。原因:在没有被分配过任何权限的情况下,用户第一次登陆开启匿名的网站,Sharepint并不会登记该用户,而是当做匿名用户处理。所以会导致上述的
阅读全文
[转]Login over HTTPS from HTTP pages(使用https登陆)
摘要:Specifically we’ll have a look at how we can replace the SharePoint Welcome control with a custom control that meets the following requirements:Displays username and password fields in anonymous mode.Allow us to login securely (via HTTPS) from a unsecured page (e.g. the homepage).Display logged in u
阅读全文
浙公网安备 33010602011771号