sharepoint 2013 sign out problem

open iis manager,right click your sharepoint site,click 'Authentication',disable 'windows authentication'

 

Sharepoint 2010 complete sign out

When you using Windows Authentication  (NTLM + AD) with your sharepoint site you may want to enter credential after  you sign out from your site.But it is not easy and somehow imposible when using authentication NTLM and IE .Beacuse after you sign out and try to login again ,automatic login proccess logs you in immediately.

I can explain you two alternative way two prevent automatic log on.

First solution which is my suggested way. Dont use windows authentication . Use Claim Based Authentication (CBA)+ (Forms Based Authentication) FBA  with Active Directory (AD) membership.

http://blogs.msdn.com/b/sridhara/archive/2010/01/07/setting-up-fba-claims-in-sharepoint-2010-with-active-directory-membership-provider.aspx

And Second way:

1) Edit your v4.master and add fallowing js codes. (Using JQuery)

<script type="text/javascript" src="/_catalogs/Scripts/jquery.js"></script>
<script type="text/javascript" >
$(document).ready(function(){$("#zz15_ID_Logout").attr("onMenuClick","STSNavigate2(event,'/SitePages/logout.aspx');");});
</script>

//This code added for testing jquery working correctly.

<script type="text/javascript" >
$(document).ready(function(){alert("Jquery is working");});
</script>

2) create a new “logout.aspx” page which masterpage is v4.master using Sharepoint Designer

3) add the fallowing code to your new sign out page

<script type="text/javascript">
function _spBodyOnLoad()
{
try
{
   /* Note : this command is support with only IE  */
  document.execCommand("ClearAuthenticationCache",false);
}
  catch (e) { }
  window.location='/_layouts/signout.aspx'; 
}
</script>

4) For testing choose a different machine than sharepoint server and configure your browser Tools->Internet Options->Security->Local Intranet
Click Custom Level and find Logon and change it to “Prompt for user name and password”
And be sure your site not added to trusted zone sites.

Login your site and type your browser’s addres bar
http://%5BSharepointSiteURL:port%5D/SitePages/logout.aspx and press enter
Try again to login and see asking your credentials.

when your sharepoint site url does not contain dot “.” that IE suppose that its a Local Intranet site. Thats why we changes the Local Intranet Zone settings to “Prompt for user name and password”

If you want to be behave your site an Internet Site by IE

1) First complete solution above and test its working.
2) Set your sites host header url like “www.testsignout.com” in your IIS

  1. Open IIS mmc
  2. Select your Sharepoint Web Application
  3. Click bindings
  4. add your host header

3) Add an alternet access mapping as “www.testsignout.com” from Central Administration site.
4) If you dont want to add a dns record like me append this url to your client machine host file where you want to test your sign out process.

example:
192.168.10.55 http://www.testsingout.com

See default action for IE as Internet zone asking to you your credentials.
Warning : this solution is not compatible for browser except IE.and possible clear your auth cookies with other sites in IE tabs when you surfing in internet. (dame i need to remember my face pass again.)

Resources:

http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/f9021dbf-59e2-4aca-b4fc-3f464b802df9

 

转载于:https://www.cnblogs.com/zyip/archive/2013/05/13/3075094.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值