CUAHIS-HIS
RSS

Navigation





Quick Search
»
Advanced Search »

PoweredBy

Server URL for Web Application

RSS
Modified on 2007/07/12 10:47 by valentinedwv Categorized as ASP_NET

HttpContext aContext = this.Context;
string Port = aContext.Request.ServerVariables["SERVER_PORT"];

                if (Port == null || Port == "80" || Port == "443")
                    Port = "";
                else
                    Port = ":" + Port;


                string Protocol = aContext.Request.ServerVariables["SERVER_PORT_SECURE"];
                if (Protocol == null || Protocol == "0")
                    Protocol = "http://";
                else
                    Protocol = "https://";


                // *** Figure out the base Url which points at the application's root

                serviceUrl = Protocol + aContext.Request.ServerVariables["SERVER_NAME"] +
                                            Port +
                                            aContext.Request.ApplicationPath 
                                            + "/" 

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam.