Пример #1
0
		public static FilePath GetXspPath (AspNetExecutionCommand cmd)
		{
			var xspName = GetXspName (cmd);
			
			FilePath xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, xspName);
			
			if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
				xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, "xsp");
			
			//if the current runtime doesn't provide XSP, look for an exe (not script) bundled alongside the addin
			if (xspPath.IsNullOrEmpty) {
				FilePath addinPath = typeof (AspNetExecutionHandler).Assembly.Location;
				xspPath = addinPath.ParentDirectory.Combine (xspName + ".exe");
			}

			if (File.Exists (xspPath))
				return xspPath;

			//if xsp wasn't found there, check beside the entrypoint exe too
			FilePath rootExe = System.Reflection.Assembly.GetEntryAssembly ().Location;
			xspPath = rootExe.ParentDirectory.Combine (xspName + ".exe");

			if (File.Exists (xspPath))
				return xspPath;

			LoggingService.LogError ("Did not find web server {0}", xspName);
			throw new UserException (GettextCatalog.GetString (
				"The {0} web server cannot be found. Please ensure that it is installed.", xspName), null);
		}
Пример #2
0
        public static FilePath GetXspPath(AspNetExecutionCommand cmd)
        {
            var xspName = GetXspName(cmd);

            FilePath xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, xspName);

            if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
            {
                xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, "xsp");
            }

            //if the current runtime doesn't provide XSP, use one bundled alongside the addin
            if (xspPath.IsNullOrEmpty)
            {
                xspPath = Path.Combine(Path.GetDirectoryName(typeof(AspNetExecutionHandler).Assembly.CodeBase), xspName);
            }

            if (xspPath.IsNullOrEmpty || !File.Exists(xspPath))
            {
                throw new UserException(GettextCatalog.GetString(
                                            "The \"{0}\" web server cannot be started. Please ensure that it is installed.", xspName), null);
            }

            return(xspPath);
        }
Пример #3
0
		FilePath GetXspPath (AspNetExecutionCommand cmd, string xspName)
		{
			FilePath xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, xspName);
			
			if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
				xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, "xsp");
			
			//if the current runtime doesn't provide XSP, use one bundled alongside the addin
			if (xspPath.IsNullOrEmpty)
				 xspPath = Path.Combine (Path.GetDirectoryName (typeof (AspNetExecutionHandler).Assembly.CodeBase), xspName);
			
			return xspPath;
		}
Пример #4
0
		string GetXspName (AspNetExecutionCommand cmd)
		{
			string xspName;
			switch (cmd.ClrVersion) {
			case ClrVersion.Net_1_1:
				return "xsp1";
			case ClrVersion.Net_2_0:
				return "xsp2";
			case ClrVersion.Net_4_0:
				return "xsp4";
			default:
				return null;
			}
		}
Пример #5
0
		public static string GetXspName (AspNetExecutionCommand cmd)
		{
			switch (cmd.ClrVersion) {
			case ClrVersion.Net_1_1:
				return "xsp1";
			case ClrVersion.Net_2_0:
				return "xsp2";
			case ClrVersion.Net_4_0:
				return "xsp4";
			default:
				throw new UserException (GettextCatalog.GetString (
					"ASP.NET is not supported for unknown runtime version '{0}'.", cmd.ClrVersion));
			}
		}
        FilePath GetXspPath(AspNetExecutionCommand cmd, string xspName)
        {
            FilePath xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, xspName);

            if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
            {
                xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, "xsp");
            }

            //if the current runtime doesn't provide XSP, use one bundled alongside the addin
            if (xspPath.IsNullOrEmpty)
            {
                xspPath = Path.Combine(Path.GetDirectoryName(typeof(AspNetExecutionHandler).Assembly.CodeBase), xspName);
            }

            return(xspPath);
        }
        string GetXspName(AspNetExecutionCommand cmd)
        {
            string xspName;

            switch (cmd.ClrVersion)
            {
            case ClrVersion.Net_1_1:
                return("xsp1");

            case ClrVersion.Net_2_0:
                return("xsp2");

            case ClrVersion.Net_4_0:
                return("xsp4");

            default:
                return(null);
            }
        }
		public static FilePath GetXspPath (AspNetExecutionCommand cmd)
		{
			var xspName = GetXspName (cmd);
			
			FilePath xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, xspName);
			
			if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
				xspPath = cmd.TargetRuntime.GetToolPath (cmd.TargetFramework, "xsp");
			
			//if the current runtime doesn't provide XSP, use one bundled alongside the addin
			if (xspPath.IsNullOrEmpty)
				xspPath = Path.Combine (Path.GetDirectoryName (typeof (AspNetExecutionHandler).Assembly.CodeBase), xspName);
			
			if (xspPath.IsNullOrEmpty || !File.Exists (xspPath))
				throw new UserException (GettextCatalog.GetString (
					"The \"{0}\" web server cannot be started. Please ensure that it is installed.", xspName), null);
			
			return xspPath;
		}
        public static string GetXspName(AspNetExecutionCommand cmd)
        {
            switch (cmd.ClrVersion)
            {
            case ClrVersion.Net_1_1:
                return("xsp1");

            case ClrVersion.Net_2_0:
                return("xsp2");

            case ClrVersion.Net_4_0:
                return("xsp4");

            default:
                LoggingService.LogError("ASP.NET is not supported for unknown runtime version '{0}'.", cmd.ClrVersion);
                throw new UserException(GettextCatalog.GetString(
                                            "ASP.NET is not supported for unknown runtime version '{0}'.", cmd.ClrVersion));
            }
        }
        public static FilePath GetXspPath(AspNetExecutionCommand cmd)
        {
            var xspName = GetXspName(cmd);

            FilePath xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, xspName);

            if (xspPath.IsNullOrEmpty && cmd.ClrVersion == ClrVersion.Net_1_1)
            {
                xspPath = cmd.TargetRuntime.GetToolPath(cmd.TargetFramework, "xsp");
            }

            //if the current runtime doesn't provide XSP, look for an exe (not script) bundled alongside the addin
            if (xspPath.IsNullOrEmpty)
            {
                FilePath addinPath = typeof(AspNetExecutionHandler).Assembly.Location;
                xspPath = addinPath.ParentDirectory.Combine(xspName + ".exe");
            }

            if (File.Exists(xspPath))
            {
                return(xspPath);
            }

            //if xsp wasn't found there, check beside the entrypoint exe too
            FilePath rootExe = System.Reflection.Assembly.GetEntryAssembly().Location;

            xspPath = rootExe.ParentDirectory.Combine(xspName + ".exe");

            if (File.Exists(xspPath))
            {
                return(xspPath);
            }

            LoggingService.LogError("Did not find web server {0}", xspName);
            throw new UserException(GettextCatalog.GetString(
                                        "The {0} web server cannot be found. Please ensure that it is installed.", xspName), null);
        }