public DashboardServer(string deployPath)
        {
            if (string.IsNullOrWhiteSpace(deployPath))
            {
                throw new ArgumentNullException(deployPath);
            }

            _server = WebServer.Create(WebServerType.IISExpress);
            _application = _server.CreateWebApplication(ApplicationName);
            _application.Deploy(deployPath);

            _webConfigFilePath = Path.Combine(_server.RootPhysicalPath, ApplicationName, "web.config");
            _virtualPath = _server.GetApplicationVirtualPath(_application, TestEasyConfig.Instance.Client.Remote);
        }
示例#2
0
        public void SetupWebsite()
        {
            // common logic to arrange the test website
            _server = WebServer.Create();
            _appInfo = _server.CreateWebApplication("TestEasyWAP");

            _server.DeployWebApplication(_appInfo.Name, new List<DeploymentItem>
                {
                    new DeploymentItem { Type = DeploymentItemType.Directory, Path = WebSiteName }
                });
        }