Merge pull request #2 from syncfusion/private/C1053974_3.2.0.69_R1

Changes for Hosting Sub application
This commit is contained in:
Gangatharan Anandavel 2019-03-13 10:33:24 +05:30 коммит произвёл GitHub
Родитель f352dea413 139341d8ff
Коммит 05abdf82be
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Web.Configuration;
namespace Syncfusion.Dashboard.ExportWrapper
{
@ -27,6 +28,10 @@ namespace Syncfusion.Dashboard.ExportWrapper
{
phantomPath = Path.GetFullPath(Environment.GetEnvironmentVariable("Home").ToString() + @"\site\wwwroot\API\");
}
else if (HasSubAppName() && File.Exists(Path.GetFullPath(Environment.GetEnvironmentVariable("Home").ToString() + @"\site\wwwroot" + (HasSubAppName() ? WebConfigurationManager.AppSettings["SubAppName"] : string.Empty) + @"\API\" + fileName)))
{
phantomPath = Path.GetFullPath(Environment.GetEnvironmentVariable("Home").ToString() + @"\site\wwwroot" + (HasSubAppName() ? WebConfigurationManager.AppSettings["SubAppName"] : string.Empty) + @"\API\");
}
Environment.CurrentDirectory = phantomPath + "Temp\\";
p.StartInfo.FileName = phantomPath + fileName;
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
@ -34,6 +39,11 @@ namespace Syncfusion.Dashboard.ExportWrapper
p.Start();
p.WaitForExit(300000);
}
}
}
public static bool HasSubAppName()
{
return string.IsNullOrEmpty(WebConfigurationManager.AppSettings["SubAppName"]) ? false : true;
}
}
}

Просмотреть файл

@ -37,6 +37,7 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Web" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExportHandler.cs" />