DASHBRD-34629-Changes for the Sub Application
This commit is contained in:
Родитель
f352dea413
Коммит
3754da3b1e
|
@ -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" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче