当前位置: 首页>>代码示例>>C#>>正文


C# SessionInfo.getSessionData方法代码示例

本文整理汇总了C#中SessionInfo.getSessionData方法的典型用法代码示例。如果您正苦于以下问题:C# SessionInfo.getSessionData方法的具体用法?C# SessionInfo.getSessionData怎么用?C# SessionInfo.getSessionData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionInfo的用法示例。


在下文中一共展示了SessionInfo.getSessionData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsPostBack)
     {
         SessionInfo info = new SessionInfo();
         if (!info.getSessionData(IsPostBack, out address, out user, out binding, out hostNameIdentifier, out configName, out hoster, out version, out platform, out hostedID))
             home(false);
         hostNameIdentifier = (string)ViewState["name"];
         configName = (string)ViewState["configname"];
         version = (string)ViewState["version"];
         platform = (string)ViewState["platform"];
         hoster = (string)ViewState["hoster"];
     }
     else
     {
         Input.getHostData(IsPostBack, ViewState, out userid, out address, out user, out binding, out hostNameIdentifier, out configName, out version, out platform, out hoster, false);
         ViewState["name"] = hostNameIdentifier;
         ViewState["configname"] = configName;
         ViewState["version"] = version;
         ViewState["platform"] = platform;
         ViewState["hoster"] = hoster;
     }
     LabelReq.Text = "Measured Page Requests";
     LabelReqDay.Text = "Measured Page Requests Per Day";
     UTC.Text = DateTime.Now.ToUniversalTime().ToString("f") + " (UTC)";
     NodeRepeater.ItemDataBound += new RepeaterItemEventHandler(NodeRepeater_ItemDataBound);
     List<ServiceNode> myNodeMap = null;
     traversePath = DynamicTraversePath.getTraversePath(hostNameIdentifier, configName, ref configProxy, address, binding, user);
     if (traversePath != null && traversePath.Count > 0)
     {
         if (traversePath[traversePath.Count - 1].MyNode.Status == ConfigSettings.MESSAGE_OFFLINE)
         {
             myNodeMap = new List<ServiceNode>();
             myNodeMap.Add(traversePath[traversePath.Count - 1].MyNode);
             if (traversePath[traversePath.Count - 1].PeerNodes != null)
                 myNodeMap.AddRange(traversePath[traversePath.Count - 1].PeerNodes);
         }
     }
     VirtualHost myVhost=null;
     if (myNodeMap == null)
     {
         myVhost = configProxy.getServiceNodeMap(hostNameIdentifier, configName, traversePath, user);
         if (myVhost == null)
             return;
         myNodeMap = myVhost.ServiceNodes;
     }
     VNODETotalReqs.Text = " (" + myVhost.TotalRequests.ToString() + ")";
     VNODETotalReqsPerDay.Text = " (" + myVhost.RequestsPerDay.ToString() + ")";
     TopNode.PostBackUrl = ConfigSettings.PAGE_NODES;
     ServiceVersion.Text = version;
     ServicePlatform.Text = platform;
     ServiceHoster.Text = hoster;
     TopNodeName.Text = hostNameIdentifier;
     NodeRepeater.DataSource = myNodeMap;
     NodeRepeater.DataBind();
     ReturnLabel.Text = "<a class=\"Return\" href=\"" + ConfigSettings.PAGE_NODES + "\">Return to Home Page</a>";
     GetImageButton.runtimePoweredBy(platform, RuntimePlatform);
 }
开发者ID:vactorwu,项目名称:catch23-project,代码行数:58,代码来源:NodeMap.aspx.cs

示例2: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Form.DefaultFocus = ViewTypeHosts.ClientID;
     SessionInfo info = new SessionInfo();
     info.getSessionData(IsPostBack,out address, out user, out binding, out hostNameIdentifier, out configName, out hoster, out version, out platform, out hostedID);
     if (!(Request["version"] == "drilldown"))
         Input.getHostData(IsPostBack, ViewState, out userid, out address, out user, out binding, out hostNameIdentifier, out configName, out version, out platform, out hoster, false);
     else
     {
         hostNameIdentifier = Request["name"];
         configName = Request["cfgSvc"];
     }
     MSMQ.Visible = false;
     ConnectionRepeater.ItemDataBound += new RepeaterItemEventHandler(ConnectionRepeater_ItemDataBound);
     viewTheType = (string)Request["viewType"];
     if (viewTheType == null || viewTheType == "")
         viewTheType = ConfigUtility.HOST_TYPE_CONNECTED_SERVICE.ToString();
     viewType = Convert.ToInt32(viewTheType);
     switch (viewType)
     {
         case ConfigUtility.HOST_TYPE_CONNECTED_SERVICE:
             {
                 ViewTypeHosts.CssClass = "LoginButton";
                 ViewTypeClients.CssClass = "LoginButtonNonSelected";
                 AddConnection.Enabled = true;
                 break;
             }
         case ConfigUtility.HOST_TYPE_CONNECTED_CLIENT_CONFIG:
             {
                 ViewTypeClients.CssClass = "LoginButton";
                 ViewTypeHosts.CssClass = "LoginButtonNonSelected";
                 AddConnection.Enabled = false;
                 break;
             }
     }
     getData();
     postback = "?name=" + hostNameIdentifier + "&cfgSvc=" + configName + "&version=" + version + "&platform=" + platform + "&hoster=" + hoster;
     ConnectionRepeater.DataBind();
     TopNode.PostBackUrl = ConfigSettings.PAGE_NODES;
     ServiceVersion.Text = version;
     ServicePlatform.Text = platform;
     ServiceHoster.Text = hoster;
     TopNodeName.Text = hostNameIdentifier;
     ReturnLabel.Text = "<a class=\"Return\" href=\"" + ConfigSettings.PAGE_NODES + postback + "\">Return to Home Page</a>";
     ViewTypeHosts.PostBackUrl = ConfigSettings.PAGE_CONNECTIONS + postback + "&viewType=" + ConfigUtility.HOST_TYPE_CONNECTED_SERVICE.ToString();
     ViewTypeClients.PostBackUrl = ConfigSettings.PAGE_CONNECTIONS + postback + "&viewType=" + ConfigUtility.HOST_TYPE_CONNECTED_CLIENT_CONFIG.ToString();
     AddConnection.PostBackUrl = ConfigSettings.PAGE_ADD_CONNECTION + postback;
     GetImageButton.runtimePoweredBy(platform, RuntimePlatform);
 }
开发者ID:vactorwu,项目名称:catch23-project,代码行数:49,代码来源:ConnectionPoint.aspx.cs

示例3: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     string hostedID = null;
     Page.Form.DefaultFocus = SoaMapButton.ClientID;
     Input.getHostData(IsPostBack, ViewState, out userid, out address, out user, out binding,out hostNameIdentifier, out configName, out theVersion, out thePlatform, out theHoster, true);
     if (IsPostBack)
     {
         SessionInfo info = new SessionInfo();
         info.getSessionData(false, out address, out user, out binding, out hostNameIdentifier, out configName, out theHoster, out theVersion, out thePlatform, out hostedID);
     }
     InProcessRepeater.ItemDataBound += new RepeaterItemEventHandler(InProcessRepeater_ItemDataBound);
     CompositeServicesRepeater.ItemDataBound += new RepeaterItemEventHandler(CompositeServicesRepeater_ItemDataBound);
     List<ServiceConfigurationData> blankData = new List<ServiceConfigurationData>();
     ServiceConfigurationData blankItem = new ServiceConfigurationData();
     blankItem.ServiceHost = "-";
     blankItem.ServiceContract = "-";
     blankItem.Status = "-";
     blankData.Add(blankItem);
     int level;
     string levelString = (string)Request["level"];
     if (levelString == null)
         level = ConfigUtility.CONFIG_LEVEL_BASIC;
     else
     {
         level = Convert.ToInt32(levelString);
     }
     TopNode.PostBackUrl = ConfigSettings.PAGE_NODES;
     string action = Request["action"];
     if (action != "navigate")
     {
         traversePath = DynamicTraversePath.getTraversePath(hostNameIdentifier, configName, ref configProxy, address, binding, user);
         compositeServiceData = configProxy.getServiceConfiguration(hostNameIdentifier, configName, level, true, traversePath, user);
         if (compositeServiceData != null)
         {
             if (compositeServiceData.Count > 0 && compositeServiceData[0] != null)
             {
                 string postback = "?name=" + compositeServiceData[0].ServiceHost + "&cfgSvc=" + compositeServiceData[0].ConfigServiceImplementationClassName + "&version=" + compositeServiceData[0].ServiceVersion + "&platform=" + compositeServiceData[0].RunTimePlatform + "&hoster=" + compositeServiceData[0].ServiceHoster;
                 Hosted.PostBackUrl = ConfigSettings.PAGE_VHOSTS + postback;
                 Connected.PostBackUrl = ConfigSettings.PAGE_CONNECTED_SERVICES + postback;
                 Connections.PostBackUrl = ConfigSettings.PAGE_CONNECTIONS + postback;
                 Logs.PostBackUrl = ConfigSettings.PAGE_AUDIT + postback;
                 Users.PostBackUrl = ConfigSettings.PAGE_USERS + postback;
                 InProcessRepeater.DataSource = compositeServiceData;
                 InProcessRepeater.DataBind();
                 TopNodeName.Text = hostNameIdentifier;
                 ServiceVersion.Text = theVersion;
                 ServiceHoster.Text = "" + theHoster;
                 ServicePlatform.Text = "" + thePlatform;
                 GetImageButton.runtimePoweredBy(thePlatform, RuntimePlatform);
                 if (compositeServiceData[0].ConnectedServiceConfigurationData != null && compositeServiceData[0].ConnectedServiceConfigurationData.Count > 0)
                 {
                     CompositeServicesRepeater.DataSource = compositeServiceData[0].ConnectedServiceConfigurationData;
                 }
                 else
                 {
                     CompositeServicesRepeater.DataSource = blankData;
                 }
                 CompositeServicesRepeater.DataBind();
             }
             else
                 Response.Redirect(ConfigSettings.PAGE_NODES,true);
         }
         else
         {
             Response.Redirect(ConfigSettings.PAGE_LOGOUT,true);
         }
     }
 }
开发者ID:vactorwu,项目名称:catch23-project,代码行数:68,代码来源:Nodes.aspx.cs

示例4: AutoGenButton_Click

        protected void AutoGenButton_Click(object sender, EventArgs e)
        {
            if (TextBoxConfigLoginAddress.Text == null || TextBoxConfigLoginAddress.Text == "")
            {
                LabelGetServices.ForeColor = System.Drawing.Color.Maroon;
                LabelGetServices.Text = "Please enter an address to the remote Configuration Service.";
                return;
            }
            try
            {
                Uri testConfigUri = new Uri(TextBoxConfigLoginAddress.Text);
            }
            catch (Exception)
            {
                LabelGetServices.ForeColor = System.Drawing.Color.Maroon;
                LabelGetServices.Text = "Please enter a valid address.  The address you entered is not a valid URI; no connection was attempted.";
                return;
            }
            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;
            SessionInfo info = new SessionInfo();
            info.getSessionData(false, out addressSes, out csUserSes, out clientSession, out nameSes, out confignameSes, out hosterSes, out versionSes, out platformSes, out IDSes);
            address = addressSes;
            string currentbinding = clientSession;
            user = csUserSes;
            if (address == null || user == null)
                Response.Redirect(FormsAuthentication.LoginUrl,true);
            traversePath = DynamicTraversePath.getTraversePath(hostNameIdentifier, configName, ref configProxy, address, currentbinding, user);
            DropDownListServiceName.Items.Clear();
            string addressConfig = TextBoxConfigLoginAddress.Text.Trim();
            ClientInformation theClient = clients.Find(delegate(ClientInformation ciExist) { return ciExist.ElementName.Equals(DropDownListConfigClient.SelectedValue); });
            BindingInformation binding = bindings.Find(delegate(BindingInformation bindingItem) { return bindingItem.BindingConfigurationName.Equals(theClient.BindingConfiguration); });
            string selectedBinding = theClient.ElementName;
            if (binding != null && binding.BindingType != null)
            {
                switch (binding.BindingType)
                {
                    case ConfigUtility.BASIC_HTTP_BINDING:
                        {
                            if (!addressConfig.ToLower().StartsWith("http"))
                            {

                                LabelGetServices.ForeColor = System.Drawing.Color.Maroon;
                                LabelGetServices.Text = "You have selected an <b>Http</b> binding: Please enter a valid http address.";
                                return;
                            }
                            break;
                        }
                    case ConfigUtility.WS_HTTP_BINDING:
                        {
                            goto case ConfigUtility.BASIC_HTTP_BINDING;
                        }

                    case ConfigUtility.WS_2007_HTTP_BINDING:
                        {
                            goto case ConfigUtility.BASIC_HTTP_BINDING;
                        }



                    case ConfigUtility.NET_TCP_BINDING:
                        {
                            if (!addressConfig.ToLower().StartsWith("net.tcp"))
                            {
                                LabelGetServices.ForeColor = System.Drawing.Color.Maroon;
                                LabelGetServices.Text = "You have selected a <b>Tcp</b> binding: Please enter a valid tcp address in form of net.tcp://";
                                return;
                            }
                            break;
                        }
                }
            }
            ServiceUsers configUser = new ServiceUsers();
            configUser = user;
            csusername= TextBoxConfigLoginUserId.Text.ToLower().Trim();
            cspassword = TextBoxConfigLoginPassword.Text.Trim();
            ServiceConfigurationClient newConfigProxy = null;
            try
            {
                newConfigProxy = new ServiceConfigurationClient(currentbinding, address, configUser);
                configServices = newConfigProxy.getMyConfigServiceDetails(hostNameIdentifier, configName, traversePath, addressConfig, selectedBinding,csusername,cspassword, configUser);
                if (configServices != null)
                {
                    if (configServices.Count == 0)
                    {
                        LabelGetServices.Text = "The remote host is currently not returning any Configuration Service Hosts to connect to.";
                        LabelGetServices.ForeColor = System.Drawing.Color.Maroon;
                        return;
                    }
                    LabelGetServices.Text = "<span style=\"font-size:1.2em;color:palegreen\">Connected!</span>";
                    ViewState["configServices"] = configServices;
                }
                else
//.........这里部分代码省略.........
开发者ID:vactorwu,项目名称:catch23-project,代码行数:101,代码来源:UpdateConnectedService.aspx.cs

示例5: 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;

        }
开发者ID:vactorwu,项目名称:catch23-project,代码行数:59,代码来源:ManageUsers.aspx.cs


注:本文中的SessionInfo.getSessionData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。