本文整理汇总了C#中SessionInfo.getHostNameConfigName方法的典型用法代码示例。如果您正苦于以下问题:C# SessionInfo.getHostNameConfigName方法的具体用法?C# SessionInfo.getHostNameConfigName怎么用?C# SessionInfo.getHostNameConfigName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionInfo
的用法示例。
在下文中一共展示了SessionInfo.getHostNameConfigName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: successPersisted
private void successPersisted(string supplmentmessage, ServiceUsers updateUser)
{
if (supplmentmessage == null)
supplmentmessage = "<span style=\"color:PaleGreen \">The user was sucessfully " + actiontext + ".</span>";
else
supplmentmessage = "<span style=\"color:Maroon\">" + supplmentmessage + ".</span>";
SessionInfo info = new SessionInfo();
string hostnameSession = null;
string confignameSession = null;
info.getHostNameConfigName(out hostnameSession, out confignameSession);
if (oldUser != null && oldUser.UserKey == user.UserKey && (hostnameSession.Equals(hostNameIdentifier) && confignameSession.Equals(configName)))
{
string addressSes = null;
string IDSes = null;
ServiceUsers csUserSes = null;
string confignameSes = null;
string hosterSes = null;
string versionSes = null;
string platformSes = null;
string clientSession = null;
string nameSes = null;
info.getSessionData(false, out addressSes, out csUserSes, out clientSession, out nameSes, out confignameSes, out hosterSes, out versionSes, out platformSes, out IDSes);
HttpCookie cookie = info.setSessionData(addressSes, updateUser, clientSession, nameSes, confignameSes, hosterSes, versionSes, platformSes,IDSes);
Response.Cookies.Remove(cookie.Name);
Response.Cookies.Add(cookie);
user = updateUser;
}
userList = configProxy.getServiceUsers(hostNameIdentifier, configName, traversePath, user);
if (userList == null)
Response.Redirect(ConfigSettings.PAGE_NODES, true);
if (action.Equals(ConfigUtility.ADD_USER))
thisUser = userList.Find(delegate(ServiceUsers userExist) { return userExist.UserId.ToLower().Equals(updateUser.UserId.ToLower()) && userExist.LocalUser == updateUser.LocalUser && userExist.Password.Equals(updateUser.Password); });
else
if (action.Equals(ConfigUtility.UPDATE_USER))
thisUser = userList.Find(delegate(ServiceUsers userExist) { return userExist.UserKey == thisUser.UserKey; });
UpdateMessage.Text = supplmentmessage;
if (action == ConfigUtility.REMOVE_USER && !oldUser.LocalUser)
UpdateMessage.Text = UpdateMessage.Text + "<br>Note that all Connected Service Definitions and corresponding active Connection Point instances associated with the Connected Service user have also been removed from the configuration database.";
ViewState["thisUser"] = thisUser;
ViewState["oldUser"] = thisUser;
ViewState["identify"] = thisUser.UserKey.ToString();
if (action.Equals(ConfigUtility.ADD_USER))
{
Add.Enabled = false;
Update.Enabled = true;
Delete.Enabled = true;
}
if (action.Equals(ConfigUtility.REMOVE_USER))
{
Add.Enabled = false;
Update.Enabled = false;
Delete.Enabled = false;
}
ViewState["userList"] = userList;
action = ConfigUtility.UPDATE_USER;
ViewState["action"] = action;
ViewState["CompositeServiceData"] = null;
}