I am creating a user control page(ascx) using the web services from SharePoint Services/Project Server site. As we know that the user name and password needs to access the sites of them. I
used the following code(C#) to access the web services, it will work fine. There is already Windows Authentication in Sharepoint Site.
//UserGroupWS is Added Web Service
private static UserGroupWS.UserGroup userGroup = new UserGroupWS.UserGroup();
userGroup.Url = "http://DomainName/_vti_bin/UserGroup.asmx";
userGroup.Credentials = new System.Net.NetworkCredential("UserName", "Password", "DomainName");
Note that there are the parameters namded "Password" also in NetworkCredential() method. While this page is using as webpart in SharePoint Site, I can access the UserName currently logined to pass as first parameter in this method. But how to retrieve Password of the current UserName currently logined to pass as second parameter in this method? Is there any idea?
Please help!!!