2

I’m using SharpSVN.

I have to delete the SVN authentication credentials stored in the PC.

I try with

using (SvnClient client = new SvnClient())
{
    // Clear predefined handlers and previous authentication
    client.Authentication.Clear();
}

it delete credential for the during of program, but it doesn't delete the credentials data stored in the computer.

Someone now how to do it?

Thanks!!

4

1 回答 1

2

我找到的解决方案是:

using (SvnClient client = new SvnClient())

{

    //delete all Svn Authentication credential stored in the computer    
    foreach (var svnAuthenticationCacheItem in client.Authentication.GetCachedItems(SvnAuthenticationCacheType.UserNamePassword))    
    {   
        svnAuthenticationCacheItem.Delete();    
    }

}  

此解决方案删除存储的所有 SVN 凭据数据。

svnAuthenticationCacheItem 有很多关于存储在计算机中的凭证的信息。

我在这里找到了解决方案的想法: http ://sharpsvn.open.collab.net/ds/viewMessage.do?dsForumId=728&viewType=browseAll&dsMessageId=319851

我希望这可以帮助某人

于 2013-06-14T08:36:38.037 回答