Merge
This commit is contained in:
commit
c1e03ff34d
4 changed files with 32 additions and 26 deletions
|
@ -57,13 +57,7 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
public WPIApplicationGallery(string sufix)
|
public WPIApplicationGallery(string sufix)
|
||||||
{
|
{
|
||||||
_sufix = sufix;
|
_sufix = sufix;
|
||||||
//_feeds = new[]
|
|
||||||
// {
|
|
||||||
// "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml",
|
|
||||||
// "http://www.helicontech.com/zoo/feed/wsp"
|
|
||||||
// };
|
|
||||||
_cache = CacheFactory.GetCacheManager();
|
_cache = CacheFactory.GetCacheManager();
|
||||||
//_wpi = GetWpiHelper();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,8 +74,6 @@ namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery
|
||||||
|
|
||||||
public void InitFeeds(int UserId, string[] feeds)
|
public void InitFeeds(int UserId, string[] feeds)
|
||||||
{
|
{
|
||||||
//Log.WriteInfo("InitFeeds {0} ", UserId);
|
|
||||||
|
|
||||||
string CACHE_KEY = GetKey_Feeds(UserId);
|
string CACHE_KEY = GetKey_Feeds(UserId);
|
||||||
|
|
||||||
if (_cache.Contains(CACHE_KEY))
|
if (_cache.Contains(CACHE_KEY))
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>WebsitePanel.Server.WPIService</RootNamespace>
|
<RootNamespace>WebsitePanel.Server.WPIService</RootNamespace>
|
||||||
<AssemblyName>WebsitePanel.Server.WPIService</AssemblyName>
|
<AssemblyName>WebsitePanel.Server.WPIService</AssemblyName>
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile>
|
<TargetFrameworkProfile>
|
||||||
</TargetFrameworkProfile>
|
</TargetFrameworkProfile>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
|
@ -31,6 +31,7 @@ using System.IO;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -39,7 +40,6 @@ using System.Collections.Generic;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
using System.Web.Services.Protocols;
|
using System.Web.Services.Protocols;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.ServiceModel;
|
using System.ServiceModel;
|
||||||
using System.Runtime.Remoting;
|
using System.Runtime.Remoting;
|
||||||
|
@ -56,6 +56,11 @@ using WebsitePanel.Providers;
|
||||||
using WebsitePanel.Server.WPIService;
|
using WebsitePanel.Server.WPIService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace WebsitePanel.Server
|
namespace WebsitePanel.Server
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -615,31 +620,35 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void StartWpiService()
|
private void StartWpiService()
|
||||||
{
|
{
|
||||||
string binFolder = HttpContext.Current.Server.MapPath("/bin/");
|
string binFolder = HttpContext.Current.Server.MapPath("/bin/");
|
||||||
|
string workingDirectory = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
||||||
|
|
||||||
string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
//string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi");
|
||||||
string newAppData = Path.Combine(newUserProfile, "Roaming");
|
//string newAppData = Path.Combine(newUserProfile, "Roaming");
|
||||||
string newLocalAppData = Path.Combine(newUserProfile, "Local");
|
//string newLocalAppData = Path.Combine(newUserProfile, "Local");
|
||||||
try
|
//try
|
||||||
{
|
//{
|
||||||
Directory.CreateDirectory(newUserProfile);
|
// Directory.CreateDirectory(newUserProfile);
|
||||||
Directory.CreateDirectory(newAppData);
|
// Directory.CreateDirectory(newAppData);
|
||||||
Directory.CreateDirectory(newLocalAppData);
|
// Directory.CreateDirectory(newLocalAppData);
|
||||||
}
|
//}
|
||||||
catch (Exception)
|
//catch (Exception)
|
||||||
{
|
//{
|
||||||
//throw;
|
// //throw;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
Process wpiServiceExe = new Process();
|
Process wpiServiceExe = new Process();
|
||||||
wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe"));
|
wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe"));
|
||||||
|
wpiServiceExe.StartInfo.WorkingDirectory = workingDirectory;
|
||||||
wpiServiceExe.StartInfo.UseShellExecute = false;
|
wpiServiceExe.StartInfo.UseShellExecute = false;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile;
|
wpiServiceExe.StartInfo.LoadUserProfile = true;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData;
|
//wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile;
|
||||||
wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData;
|
//wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData;
|
||||||
|
//wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData;
|
||||||
if (wpiServiceExe.Start())
|
if (wpiServiceExe.Start())
|
||||||
{
|
{
|
||||||
_WpiServiceExe = wpiServiceExe;
|
_WpiServiceExe = wpiServiceExe;
|
||||||
|
@ -983,4 +992,6 @@ namespace WebsitePanel.Server
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue