Format:
Recent snippets for: nobodybutca
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
222 Views
1 comments
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));
204 Views
no comments
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();
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 = "";
800 Views
no comments
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);
202 Views
no comments
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);
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)
467 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
