public object Create(string appId, string appPath) { object obj2; try { if (appPath[0] == '.') { FileInfo info = new FileInfo(appPath); appPath = info.FullName; } if (!StringUtil.StringEndsWith(appPath, '\\')) { appPath = appPath + @"\"; } ISAPIApplicationHost appHost = new ISAPIApplicationHost(appId, appPath, false); ISAPIRuntime o = (ISAPIRuntime)this._appManager.CreateObjectInternal(appId, typeof(ISAPIRuntime), appHost, false, null); o.StartProcessing(); obj2 = new ObjectHandle(o); } catch (Exception) { throw; } return(obj2); }
public Object Create(String appId, String appPath) { try { // // Fill app a Dictionary with 'binding rules' -- name value string pairs // for app domain creation // // if (appPath[0] == '.') { System.IO.FileInfo file = new System.IO.FileInfo(appPath); appPath = file.FullName; } if (!StringUtil.StringEndsWith(appPath, '\\')) { appPath = appPath + "\\"; } // Create new app domain via App Manager #if FEATURE_PAL // FEATURE_PAL does not enable IIS-based hosting features throw new NotImplementedException("ROTORTODO"); #else // FEATURE_PAL ISAPIApplicationHost appHost = new ISAPIApplicationHost(appId, appPath, false /*validatePhysicalPath*/); ISAPIRuntime isapiRuntime = (ISAPIRuntime)_appManager.CreateObjectInternal(appId, typeof(ISAPIRuntime), appHost, false /*failIfExists*/, null /*hostingParameters*/); isapiRuntime.StartProcessing(); return(new ObjectHandle(isapiRuntime)); #endif // FEATURE_PAL } catch (Exception e) { Debug.Trace("internal", "AppDomainFactory::Create failed with " + e.GetType().FullName + ": " + e.Message + "\r\n" + e.StackTrace); throw; } }
public void FixtureSetUp () { // we're at full trust here isapi = new ISAPIRuntime (); }