I'm using IG v8.3 CLR35 (vers 8.3.20083.2039)
Have built an ASP.NET application, that heavily uses UltraWebChart (as well as several other controls)
Just starting to design/develop a status dahboard - and REALLY want to use UltraWebGauge!
I dropped an UltraGauge into Designer, and it got confused on which IG Version to use (tried to use UltraWebGauge8.2, etc.)
I fixed the assemblies in the page and web.config -- to be:
<%
@ Register TagPrefix="igGauge" Namespace="Infragistics.WebUI.UltraWebGauge"
Assembly="Infragistics35.WebUI.UltraWebGauge.v8.3, Version=8.3.20083.2039, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
%>
@ Register TagPrefix="igGaugeProp" Namespace="Infragistics.UltraGauge.Resources"
I can design the UltraWebGauge using Designer, and the UltraGaugeDesigner, and it renders nicely in Designer as well.
When I try to viewthe page in the browser, I get the following exception:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hp.siteglance\5014c89e\2a2a498d\App_Web_o3x63pgn.4.cs Line: 0 Stack Trace:
[IOException: The filename, directory name, or volume label syntax is incorrect. ] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7714920 System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1923 System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) +37 Infragistics.WebUI.UltraWebGauge.UltraGauge.DeleteOldImages() +574 Infragistics.WebUI.UltraWebGauge.UltraGauge.Dispose() +62 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +269 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188 System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23 System.Web.UI.Page.ProcessRequestCleanup() +43 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.status_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hp.siteglance\5014c89e\2a2a498d\App_Web_o3x63pgn.4.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
here's the code behind that I use to define deployment scenario:
(note this exception happens regardless of whether I specified these deployment scenarios...)
ugUpTime.DeploymentScenario.ImageType =
GaugeImageType.Png;
ugUpTime.DeploymentScenario.DeleteOldImages =
true;
ugUpTime.DeploymentScenario.Mode =
ImageDeploymentMode.FileSystem;
ugUpTime.DeploymentScenario.ImageURL =
@"ChartImages/Status_UptimeGauge_#SEQNUM(100).png";
ugUpTime.DeploymentScenario.FilePath =
@"ChartImages";
I've never seen that error before, but from a quick google search it seems there might be some invalid characters in your file path. What is the full path to the folder you expect to write your images to?
On my development mahine, I have no problem with UltraChart images, and they are using the same folder ...
here is thefull path:
D:\subversion\SiteGlance\srcM3\HP.SiteGlance\ChartImages
Using the same source code, a collegue does not see the problem.
I suspect that it may be due to my configuration. Ihave both 8.2 and 8.3 installed on my machine, due to having to maintain an older version of our codebase that runs on 8.2.
It gave me problems adding gauge controls from the toolbox - as it seemed to pull in the 8.2 asemblies - even when i dragged the 8.3 version ito my aspx page...
i am able to continue working by setting
ugTpi.DeploymentScenario.ImageType =
.Png;
ugTpi.DeploymentScenario.DeleteOldImages =
;
ugTpi.DeploymentScenario.Mode =
.FileSystem;
ugTpi.DeploymentScenario.ImageURL =
ugTpi.DeploymentScenario.FilePath =
This code runs fine in my ascx control.
are any of the existing gauge images marked read-only? sometimes the image files can get copied to source control which causes them to be marked read-only, then they become trickier to delete.
No,
I have the same exception, whether there are files in the folder, or not.
And when there are files in the folder, they are not read-onlt (I checked).
what is the ClientID property of the gauge control?
DeleteOldImages has this method call...
string[] files = Directory.GetFiles(this.mappedPath, this.ClientID + "*." + ext);
MappedPath should be the return value of Page.MapPath(theGauge.DeploymentScenario.FilePath)
the gauge ClientID is "ugTpi"
In the code-behind, I set
ugTpi.DeploymentScenario.ImageType = GaugeImageType.Png;
ugTpi.DeploymentScenario.DeleteOldImages = true; // exception when true, ok, when false
ugTpi.DeploymentScenario.Mode = ImageDeploymentMode.FileSystem;
ugTpi.DeploymentScenario.ImageURL = @"ChartImages/Status_TpiGauge_#SEQNUM(100).png";
ugTpi.DeploymentScenario.FilePath = @"ChartImages";
Two things to note:
1. ugTpi is in a User Control (./Controls folder)
2. Gantt Chart on same user control uses ChartImages folder for images as well - no problem.
I just tried setting ImageURL to "ugTpiGauge_#SEQNUM(100).png" - same behavior.
if you have #SEQNUM in your ImageURL, you can safely set DeleteOldImages = false because you will always have a finite number of images in that folder, 100.
maybe try this code in Page_Load to further investigate what the problem is:
string[] files = Directory.GetFiles(Page.MapPath(theGauge.DeploymentScenario.FilePath), "*.png");
does that throw an exception?