Commit 10ecabc5c3bb7074c100aadfc3582b70ea5cb517
1 parent
8ca2173e
Vrh.Web.Reporting v1.1.2.0
Showing
2 changed files
with
9 additions
and
7 deletions
Show diff stats
Vrh.Web.Reporting/Properties/AssemblyInfo.cs
| @@ -36,6 +36,6 @@ using System.Runtime.InteropServices; | @@ -36,6 +36,6 @@ using System.Runtime.InteropServices; | ||
| 36 | // You can specify all the values or you can default the Build and Revision Numbers | 36 | // You can specify all the values or you can default the Build and Revision Numbers |
| 37 | // by using the '*' as shown below: | 37 | // by using the '*' as shown below: |
| 38 | // [assembly: AssemblyVersion("1.0.*")] | 38 | // [assembly: AssemblyVersion("1.0.*")] |
| 39 | -[assembly: AssemblyVersion("1.1.1.0")] | ||
| 40 | -[assembly: AssemblyFileVersion("1.1.1.0")] | ||
| 41 | -[assembly: AssemblyInformationalVersion("1.1.1")] | 39 | +[assembly: AssemblyVersion("1.1.2.0")] |
| 40 | +[assembly: AssemblyFileVersion("1.1.2.0")] | ||
| 41 | +[assembly: AssemblyInformationalVersion("1.1.2")] |
Vrh.Web.Reporting/WebServerHostedServiceStarter.cs
| @@ -286,7 +286,9 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | @@ -286,7 +286,9 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | ||
| 286 | websitename = websitename ?? HostingEnvironment.SiteName; //websitename = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName(); | 286 | websitename = websitename ?? HostingEnvironment.SiteName; //websitename = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName(); |
| 287 | webapplicationname = webapplicationname ?? HostingEnvironment.ApplicationVirtualPath; //webapplicationname = System.Web.HttpRuntime.AppDomainAppVirtualPath; | 287 | webapplicationname = webapplicationname ?? HostingEnvironment.ApplicationVirtualPath; //webapplicationname = System.Web.HttpRuntime.AppDomainAppVirtualPath; |
| 288 | applicationpoolname = applicationpoolname ?? GetCurrentApplicationPoolName(websitename); | 288 | applicationpoolname = applicationpoolname ?? GetCurrentApplicationPoolName(websitename); |
| 289 | - string autostartprovidername = (websitename + "____" + applicationpoolname + "____" + webapplicationname).Replace(" ", "_").Replace("-", "_").Replace("/", "_"); | 289 | + const string PARTSEP = "____"; |
| 290 | + string autostartprovidername = string.Concat(websitename,PARTSEP,applicationpoolname,PARTSEP,webapplicationname, PARTSEP, typeof(WebServerHostedServiceStarter).FullName) | ||
| 291 | + .Replace(" ", "_").Replace("-", "_").Replace("/", "_").Replace(".", "_"); | ||
| 290 | string serviceAutoStartProviderTypeFullName = serviceAutoStartProviderType.FullName; | 292 | string serviceAutoStartProviderTypeFullName = serviceAutoStartProviderType.FullName; |
| 291 | string serviceAutoStartProviderAssassemblyName = serviceAutoStartProviderType.Assembly.GetName().Name; | 293 | string serviceAutoStartProviderAssassemblyName = serviceAutoStartProviderType.Assembly.GetName().Name; |
| 292 | string configfilepath = Path.Combine(NativeSystemPath, CONFIGFILEDIRECTORY, CONFIGFILENAME); | 294 | string configfilepath = Path.Combine(NativeSystemPath, CONFIGFILEDIRECTORY, CONFIGFILENAME); |
| @@ -325,7 +327,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | @@ -325,7 +327,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | ||
| 325 | } | 327 | } |
| 326 | 328 | ||
| 327 | reader = new StreamReader(file, Encoding.ASCII); | 329 | reader = new StreamReader(file, Encoding.ASCII); |
| 328 | - filecontent = ProcessFileContent(le, reader.ReadToEnd(), applicationpoolname, websitename, webapplicationname, autostartprovidername, serviceAutoStartProviderAssassemblyName, serviceAutoStartProviderTypeFullName, disablemode.Value); | 330 | + filecontent = ProcessFileContent(reader.ReadToEnd(), applicationpoolname, websitename, webapplicationname, autostartprovidername, serviceAutoStartProviderAssassemblyName, serviceAutoStartProviderTypeFullName, disablemode.Value); |
| 329 | configchanged = filecontent != null; | 331 | configchanged = filecontent != null; |
| 330 | if (configchanged) | 332 | if (configchanged) |
| 331 | { | 333 | { |
| @@ -337,7 +339,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | @@ -337,7 +339,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | ||
| 337 | } | 339 | } |
| 338 | else | 340 | else |
| 339 | { | 341 | { |
| 340 | - filecontent = ProcessFileContent(le, System.IO.File.ReadAllText(configfilepath), applicationpoolname, websitename, webapplicationname, autostartprovidername, serviceAutoStartProviderAssassemblyName, serviceAutoStartProviderTypeFullName, disablemode.Value); | 342 | + filecontent = ProcessFileContent(System.IO.File.ReadAllText(configfilepath), applicationpoolname, websitename, webapplicationname, autostartprovidername, serviceAutoStartProviderAssassemblyName, serviceAutoStartProviderTypeFullName, disablemode.Value); |
| 341 | configchanged = filecontent != null; | 343 | configchanged = filecontent != null; |
| 342 | if (configchanged) System.IO.File.WriteAllText(configfilepath, filecontent); | 344 | if (configchanged) System.IO.File.WriteAllText(configfilepath, filecontent); |
| 343 | } | 345 | } |
| @@ -348,7 +350,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | @@ -348,7 +350,7 @@ namespace Vrh.Web.WebServerHostedServiceStarterNS | ||
| 348 | catch (Exception ex) { le.AddDataField("SetupAutoStart EXCEPTION",ex.Message); le.SetLogLevel(LogLevel.Error); return; } | 350 | catch (Exception ex) { le.AddDataField("SetupAutoStart EXCEPTION",ex.Message); le.SetLogLevel(LogLevel.Error); return; } |
| 349 | finally { if (writele) le.Write(); } | 351 | finally { if (writele) le.Write(); } |
| 350 | } | 352 | } |
| 351 | - private static string ProcessFileContent(DCLogEntry le, string filecontent,string applicationpoolname,string websitename,string webapplicationname,string autostartprovidername,string serviceAutoStartProviderAssassemblyName, string serviceAutoStartProviderTypeFullName,bool disablemode) | 353 | + private static string ProcessFileContent(string filecontent,string applicationpoolname,string websitename,string webapplicationname,string autostartprovidername,string serviceAutoStartProviderAssassemblyName, string serviceAutoStartProviderTypeFullName,bool disablemode) |
| 352 | { | 354 | { |
| 353 | const string SYSTEMAPPLICATIONHOST_ELEMENT = "system.applicationHost"; | 355 | const string SYSTEMAPPLICATIONHOST_ELEMENT = "system.applicationHost"; |
| 354 | const string APPLICATIONPOOLS_ELEMENT = "applicationPools"; | 356 | const string APPLICATIONPOOLS_ELEMENT = "applicationPools"; |