CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: nobodybutca
C#
public bool CreateStaticRouteAccount(string staticRouteAlias, string staticRouteName, string staticRouteForwardedToAddress)
       {
           //Create a new AccountObject
           AccountObject objAccount = new AccountObject();
           if (objAccount.LastErr < 0)
               throw new Exception("Unable to create static route account object : "
                                   + GetExceptionMessage(objAccount.LastErr));
 
 
           //assign token handle value to AccountObject
by nobodybutca   December 01, 2010 @ 2:54pm
222 Views
1 comments
 
C#
public bool CreateAccount(string Alias, string Name, string Password)
       {
           IceWarpServer.StatisticsObject statisticsObject = new StatisticsObject();
 
           //Create a new AccountObject
           IceWarpServer.AccountObject objAccount = new IceWarpServer.AccountObject();
           if (objAccount.LastErr < 0)
               throw new Exception("Unable to create account object : "
                   + GetExceptionMessage(objAccount.LastErr));
by nobodybutca   October 11, 2010 @ 10:30pm
204 Views
no comments
 
C#
protected void Button2_Click(object sender, EventArgs e)
        {
            string uri = "http://quality.osm.no";
            Uri weburi = new Uri(uri, false);
            StringBuilder sbuild = new StringBuilder();
            string temp = "";
            try
            {
                HttpWebRequest webrequest = (HttpWebRequest) WebRequest.Create(weburi);
                CredentialCache myCache = new CredentialCache();
by nobodybutca   August 31, 2010 @ 9:05pm
168 Views
no comments
 
function IsPassedPasswordPolicies()
        {
            var _newPassword = document.getElementById('txtPassword');
            var _confirmedPassword = document.getElementById('txtConfirmPass');
            var _oldPassword = document.getElementById('tbPasswordOld');
            var _buttonSave = document.getElementById('btnSave');
            var _errorLabel = document.getElementById('lblPasswordError');
                        
            var _disabled = false;
            _errorLabel.innerHTML = "";
by nobodybutca   October 07, 2009 @ 12:42am
800 Views
no comments
 
C#
public bool IsADUsernameExistsAndNotDisabled(string userName)
    {
        bool _return = false;
        if (userName.Length > 0)
        {
            string ldapConnection = ConfigurationManager.AppSettings["ADConnection"].ToString();
            string eCrewUserName = ConfigurationManager.AppSettings["ADUserName"].ToString();
            string eCrewUserPassword = ConfigurationManager.AppSettings["ADPassword"].ToString();
 
            DirectoryEntry searchRoot = new DirectoryEntry(ldapConnection, eCrewUserName, eCrewUserPassword);
by nobodybutca   October 07, 2009 @ 12:39am
Tags: ldap, AD, c#
202 Views
no comments
 
C#
public bool IsADUsernameExistsAndNotDisabled(string userName)
    {
        DirectoryEntry searchRoot = new DirectoryEntry(ldapConnection, eCrewUserName, eCrewUserPassword);
  
        DirectoryEntry searchRoot = new DirectoryEntry("LDAP://999.999.999.999/DC=CompanyDomain, DC=com", "ADUserAdmin", "AdUserAdminPassword");
        DirectorySearcher searchForUser = new DirectorySearcher(searchRoot);
 
        searchForUser.SearchScope = SearchScope.Subtree;
        //searchForUser.Filter = string.Format("(&(objectCategory=Person)(anr={0}))", userName);
        //searchForUser.Filter = string.Format("(&(objectCategory=Person)(anr={0})(userAccountControl:1.2.840.113556.1.4.803:=2))", userName);
by nobodybutca   October 04, 2009 @ 7:40pm
190 Views
no comments
 
 
C:\Users\administrator.OSM>dism /online /enable-feature /featurename:IIS-WebServ
erRole
 
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385
 
Image Version: 6.1.7600.16385
 
Enabling feature(s)
by nobodybutca   September 04, 2009 @ 1:38am
467 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate