Page 1 of 1

Webchart problems

Posted: Thu Oct 27, 2005 7:12 am
by 9637231
I found problems during using the webchart. It points to a
absolute directory on my PC. This is not correct. On internet all directories are relative.

How to solve this?

Hans



Serverfout in toepassing /Grafiek2.
--------------------------------------------------------------------------------

Toegang tot pad C:\Program Files\Steema Software\TeeChart for .NET v2\TeeChartForNET\_chart_temp\Chart1127001386523821299884.png is geweigerd.
Beschrijving: Er is een onverwerkte uitzondering opgetreden tijdens het uitvoeren van de huidige webaanvraag. Raadpleeg de stacktracering voor meer informatie over deze fout en de oorsprong ervan in de code.

Details van uitzondering: System.UnauthorizedAccessException: Toegang tot pad C:\Program Files\Steema Software\TeeChart for .NET v2\TeeChartForNET\_chart_temp\Chart1127001386523821299884.png is geweigerd.

ASP.NET heeft geen machtiging voor toegang tot de gevraagde bron. Probeer toegangsrechten voor de bron te verlenen aan de ASP.NET-aanvraagidentiteit. ASP.NET heeft een basisprocesidentiteit (meestal {MACHINE}\ASPNET op IIS 5 of Network Services op IIS 6) die wordt gebruikt als de toepassing niet imiteert. Als de toepassing imiteert via <identity impersonate="true"/>, wordt de identiteit de anonieme gebruiker (meestal IUSR_MACHINENAME) of de geverifieerde aanvraaggebruiker.

Als u ASP.NET schrijftoegang tot een bestand wilt verlenen, klikt u met de rechtermuisknop op het bestand in Verkenner, kiest u Eigenschappen en selecteert u het tabblad Beveiliging. Klik op Toevoegen om de juiste gebruiker of groep toe te voegen. Markeer de ASP.NET-account en schakel de vakjes voor de gewenste toegang in.

Fout in bron:

Er is een onverwerkte uitzondering gegenereerd tijdens het uitvoeren van de huidige webaanvraag. Aan de hand van de onderstaande tracering van de uitzonderingsstack kunt u meer informatie verkrijgen over de oorsprong en de locatie van de uitzondering.

Stacktracering:


[UnauthorizedAccessException: Toegang tot pad C:\Program Files\Steema Software\TeeChart for .NET v2\TeeChartForNET\_chart_temp\Chart1127001386523821299884.png is geweigerd.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode) +52
Steema.TeeChart.Export.ImageExportFormat.Save(String FileName)
Steema.TeeChart.Web.WebChart.CreatePictureFile(HtmlTextWriter writer)
Steema.TeeChart.Web.WebChart.Render(HtmlTextWriter output)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Versiegegevens: Microsoft .NET Framework Versie:1.1.4322.2032; ASP.NET Versie:1.1.4322.2032

Posted: Thu Oct 27, 2005 8:05 am
by narcis
Hi Hans,

This absolute path is where the temporary image file is stored. To solve this issue you should have a look at Tutorial 9 - TeeChart and WebChart and ASP.NET, specially the File or Session setting (TempChart property). Set TempChart property to Session and add the GetChart.aspx.cs file to your project.

One step further

Posted: Thu Oct 27, 2005 11:57 am
by 9637231
OK, thanks, I don't see errors anymore, but I also don't see eny chart on the webpage, only the standard small red cross of a not existing link to a picture file.

I hope you can help me with this also.

Hans

Uploading

Posted: Thu Oct 27, 2005 12:08 pm
by 9637231
I also tried to upload to our website and run it, but following problem occured:


Attempt to access the method failed.
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.MethodAccessException: Attempt to access the method failed.

Source Error:


Line 11: <p>Tweede grafiek</p>
Line 12: <p>
Line 13: <tchart:WebChart id="Chart"
Line 14: style="Z-INDEX: 1; LEFT: 14px; POSITION: absolute; TOP: 54px"
Line 15: runat="server" tempchart="Session" clickedy="0" clickedx="0"


Source File: d:\www\balloonsoft.nl\www\webform2.aspx Line: 13

Stack Trace:


[MethodAccessException: Attempt to access the method failed.]
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) +0
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +664
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +200
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +19
System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey) +256
System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license) +44
System.ComponentModel.LicenseManager.Validate(Type type, Object instance) +32
Steema.TeeChart.Chart..ctor() +98
Steema.TeeChart.Web.WebChart..ctor() +117
ASP.WebForm2_aspx.__BuildControlChart() in d:\www\balloonsoft.nl\www\webform2.aspx:13
ASP.WebForm2_aspx.__BuildControl__control2() in d:\www\balloonsoft.nl\www\webform2.aspx:10
ASP.WebForm2_aspx.__BuildControlTree(Control __ctrl) in d:\www\balloonsoft.nl\www\webform2.aspx:1
ASP.WebForm2_aspx.FrameworkInitialize() in 4klrpnzn.0.cs:0
System.Web.UI.Page.ProcessRequest() +85
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Further help request

Posted: Mon Oct 31, 2005 12:26 pm
by 9637231
NarcĂ­s,

Could you help me with this problem?

Hans

Posted: Wed Nov 02, 2005 11:02 am
by narcis
Hi Hans,

Can you please try if the ASP.NET demo, available at TeeChart's program group, works on your machine?

Problems

Posted: Wed Nov 02, 2005 6:26 pm
by 9637231
First I get following problem during compiling:

[C# Error] Resource identifier 'WebDemo.ShowSeries.aspx.resources' has already been used in this assembly

I don't know what happens if I remove these files from project.

Hans

Posted: Thu Nov 03, 2005 11:43 am
by narcis
Hi Hans,

You should start from basics and create a new WebForm project, drop a WebChart on it and set the TempChart property to session, include the GetChart.aspx.cs file (you should read "Tutorial 17 - Designtime, Runtime and License Requirements". You'll find TeeChart tutorials at its program group). Can you compile and run it successfully?

I builded from scratch

Posted: Thu Nov 03, 2005 6:00 pm
by 9637231
I did that as mentioned above. I get no chart displayed, only a little red cross, that indicates that a link to a picture is broken.

If I upload this to the internet I get problems as mentioned above.

Second problem is that the link between TChart and the series are instable. If I add series to the chart, I see the sample chart based on the series. Suddenly I have a blank chart again and is the series thumb still visible at the bottom, but the sample chart is blank.


If I upload this to the internet I get problems as mentioned above

Has this all been tested with Delphi 2005?

Posted: Wed Nov 09, 2005 2:45 pm
by narcis
Hi Hans,

We've tested this here using Delphi 2005 and works fine using both TeeChart for .NET versiones (1 and 2). Your problem may be IIS security related. You should check that the IIS entry for your applications have an application created. You can check that right-clicking on the IIS entry and selecting properties.

Posted: Thu Nov 10, 2005 8:18 am
by 9637231
Narcis,

1. With the File option it works fine, but not with the session option. This is on the IIS on my PC. All my other applications work fine with session variables.
But what is the problem with line 13 of the .aspx file when I use this on the server of my internet provider?
Of course my ISP is running under medium trust level. But this shouldn't be a problem.

2. What about losing contact between the Chart and the series?

Hans

Posted: Thu Nov 10, 2005 11:30 am
by narcis
Hi Hans,
1. With the File option it works fine, but not with the session option. This is on the IIS on my PC. All my other applications work fine with session variables.
But what is the problem with line 13 of the .aspx file when I use this on the server of my internet provider?
Of course my ISP is running under medium trust level. But this shouldn't be a problem.
It works fine here using File=Session and having added GetChart.aspx.cs file to the project as told in the tutorials I commented before.
2. What about losing contact between the Chart and the series?


Could you please extend yourself on that? You may include some code or an example we can run "as-is" to reproduce the problem here. You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Posted: Fri Nov 11, 2005 11:45 am
by narcis
Hi Hans,

It works for me starting from a blank project here using latest TeeChart for .NET v2 Debug Build available and Delphi 2005 version 9.0.1935.22056 Update 3. Which TeeChart and D2005 versions are you using?