WebCharts show red X when served from IIS 7

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
getdunne
Newbie
Newbie
Posts: 3
Joined: Fri Sep 02, 2011 12:00 am

WebCharts show red X when served from IIS 7

Post by getdunne » Sun Sep 04, 2011 9:07 pm

I have just purchased Steema TeeChart for .NET 2011, and cannot get WebChart to work, either using your Tutorial 10, or using the ASP.NET Demo web application you provide. In both cases, when the ASP.NET app is run under IIS 7, I see only a red X where the chart should be.

Your Tutorial 10 has one small code error: the line

Code: Select all

zoomedState = ((Steema.TeeChart.Tools.ZoomTool)wChart.Chart.Tools[0]).SetCurrentZoom(Request, zoomedState);
should be

Code: Select all

zoomedState = ((Steema.TeeChart.Tools.ZoomTool)wChart.Chart.Tools[1]).SetCurrentZoom(Request, zoomedState);
However, once that is fixed, the ASP.NET app works fine when run in debug mode from Visual Studio 2010. When I publish it to IIS 7, though, I get the red X.

You provide what looks like a nice ASP.NET demo app, including a shortcut which gets installed automatically to the Windows Start menu along with the other parts of the TeeChart package. However, you give NO instructions as to how to make this nice shortcut actually work, although your Tutorial 10 begins with the confusing words "See the TeeChartForNET Virtual Share installed with TeeChart for a working example...". Eventually I figured out how to use the IIS Manager control panel to install this, not as a "virtual directory", but as an "application". This makes your shortcut to "http://localhost/TeeChartForNET/index.aspx" work, but on every page where a chart should appear, again I get a red X.

I have tried different browsers. I have made sure that the IIS 7 Application Pools are set to use .NET 4.0. I have wasted hours searching the web and trying different settings for Session State options in IIS 7. I have tried everything on both 32-bit and 64-bit Windows 7 systems. I have read post after post in this forum, where users report this problem again and again, but there seems to be no answer. None of the threads ends with the user saying "Ah, that was it! Red X's are gone now. Thank you." Have all the users simply given up?

Let's forget about new ASP.NET apps created according to your Tutorial 10. Let's concentrate on the fact that the ASP.NET demo app you provide (the one which the "http://localhost/TeeChartForNET/index.aspx" shortcut points to) does not run properly under IIS 7, on Windows 7, either 32-bit or 64-bit. Can you tell me how to make this demo run properly?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: WebCharts show red X when served from IIS 7

Post by Narcís » Mon Sep 05, 2011 11:46 am

Hi getdunne,
Let's concentrate on the fact that the ASP.NET demo app you provide (the one which the "http://localhost/TeeChartForNET/index.aspx" shortcut points to) does not run properly under IIS 7, on Windows 7, either 32-bit or 64-bit. Can you tell me how to make this demo run properly?
This is most likely a permissions problem in the IIS share or the folder where the images are stored. I recommend you to set TempChart to Session as described in Tutorial 9. Tutorials can be found at TeeChart's program group. Don't forget to add GetChart.aspx.cs. This could be a good solution for both the demo and your ASP.NET applications.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

getdunne
Newbie
Newbie
Posts: 3
Joined: Fri Sep 02, 2011 12:00 am

Re: WebCharts show red X when served from IIS 7

Post by getdunne » Fri Sep 09, 2011 12:38 pm

Hi Narcis,

This is the same answer you have given everyone. I have ensured that IIS_IUSRS has full read/write permissions in the entire C:\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2011 4.1.2011.07280\Examples\TeeChartForNET folder and all subfolders. As for GetChart.aspx.cs and setting TempChart=Session, I have done this in my own code, and it appears that you have done it for your TeeChartForNET demo. (However I can't tell for sure, since your latest install package includes the useless TeeChartForNET.suo file, but not the corresponding .csproj or .sln files which I would need to actually open your demo project in VS2010.)

I suspect the problem may be specific to IIS 7, and/or 64-bit Windows 7. I know these are Microsoft products, hence technically not your responsibility, but since IIS is the only way to host ASP.NET applications, and 64-bit Windows 7 is now in widespread use, I suggest it IS your responsibility to help users get past this problem.

Have you had the TeeChartForNET demo application running under IIS 7, on 64-bit Windows 7? HAS ANYONE DONE THIS SUCCESSFULLY? If so, please post a short reply below.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: WebCharts show red X when served from IIS 7

Post by Sandra » Mon Sep 12, 2011 12:33 pm

Hello getdunne
I suspect the problem may be specific to IIS 7, and/or 64-bit Windows 7. I know these are Microsoft products, hence technically not your responsibility, but since IIS is the only way to host ASP.NET applications, and 64-bit Windows 7 is now in widespread use, I suggest it IS your responsibility to help users get past this problem.
Have you had the TeeChartForNET demo application running under IIS 7, on 64-bit Windows 7? HAS ANYONE DONE THIS SUCCESSFULLY? If so, please post a short reply below.
Probably the problem is caused, so you don't have TeeChartNet Asp shared in the server correctly. Therefore, to solve the problem you need check if you can access in this link: http://localhost:port/TeeChartForNET/SampleList.xml", where you have changed port to the default number that you can get, running the TeeChartNet in the browser. Once you have done this and you can access to the SampleList.xml file, you have modified two lines code of Page_load of Content.aspx file. You could modifier both line as next way:

Code: Select all

protected void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			if ((string)Request.Params["SampleID"]=="0")
			{
				string fname = (string)Session["fileName"];
				string path = "http://"+webServer+"port/TeeChartForNET/"+fname;				
				Response.Redirect(path);				
			}
			else
			{
				string DemoID = Request.Params["SampleID"];
				string DemoParentID = Request.Params["ParentID"];

				string strID ="";
				string strParentID="";
				string strTitle="";
				string strSamplePage="";
				//string strSeqOrd="";
				string strParentNodePath="";
				string val="";

        string xmlFile = "http://" + webServer + ":port/TeeChartForNET/SampleList.xml";
        HttpWebRequest rqst = (HttpWebRequest)WebRequest.Create(xmlFile);
        rqst.Credentials = CredentialCache.DefaultCredentials;
        HttpWebResponse rsp = (HttpWebResponse)rqst.GetResponse();
......


Note: Port is number that you got previously as example "http://localhost:1641/TeeChartForNET/SampleList"

Can you confirm us, if solution solve your problem? On the other hand, If you can't access to SampleList or solution doesn't solve the problem, please let me know.
This is the same answer you have given everyone. I have ensured that IIS_IUSRS has full read/write permissions in the entire C:\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2011 4.1.2011.07280\Examples\TeeChartForNET folder and all subfolders. As for GetChart.aspx.cs and setting TempChart=Session, I have done this in my own code, and it appears that you have done it for your TeeChartForNET demo. (However I can't tell for sure, since your latest install package includes the useless TeeChartForNET.suo file, but not the corresponding .csproj or .sln files which I would need to actually open your demo project in VS2010.)
Ok. I have made a simple project in windows 7 x64 bits and works fine for me. Please, check if next attach project, works correctly in your computer.
WebSite2.zip
(135.53 KiB) Downloaded 376 times
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

getdunne
Newbie
Newbie
Posts: 3
Joined: Fri Sep 02, 2011 12:00 am

Re: WebCharts show red X when served from IIS 7

Post by getdunne » Thu Sep 15, 2011 1:58 pm

Getting my own ASP.NET web apps to work under IIS 7 -- FIXED
Your sample ASP.NET (WebSite2.zip) worked fine under IIS 7 -- thank you -- when I did the following:
  1. Added IIS_IUSRS to the access control list for the folder
  2. Installed it manually using the "Add Application" function of the IIS Manager
My own code also works correctly when I do these two steps, so I think my earlier problem was related to trying to deploy to IIS 7 through Visual Studio 2010, instead of manually.

Getting the Steema TeeChartForNET demo to work under IIS 7 -- FIXED
My problems with your TeeChartForNET demo code had nothing to do with either port numbers or access permissions.
I studied your demo code, found several problems, and fixed them all myself:
  1. All your .aspx files had TempChart set to "HttpHandler"; I replaced this with "Session"
  2. Some of your .aspx files had GetChartFile set to just "GetChart.aspx"; I changed this to "/TeeChartForNET/GetChart.aspx"
  3. I replaced your Web.config file with the simpler one from your WebSite2 example, adding

    Code: Select all

    <add name="TeeChartConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\inetpub\wwwroot\TeeChartForNET\SampleData\TeeChart.mdb"" providerName="System.Data.OleDb" />
    
    to the <configuration> section
  4. I made a copy of your C:\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2011 4.1.2011.07280\Sample data
    folder, changed the name to SampleDataand put it is the TeeChartForNET root folder
  5. Added IIS_IUSRS to access control list for the TeeChartForNET folder
  6. Put the whole TeeChartForNET folder in C:\inetpub\wwwroot
  7. Manually added to IIS 7 using "Add Application" in the IIS Manager, specifying alias as "TeeChartForNET"
You can download my corrected version of the demo web app (it's too big to attach here) at http://www.getdunne.net/download/TeeCha ... d_demo.zip.
Just unzip it and do steps 5, 6, and 7 above, and everything will work -- no more red X's.

Comments
It is disappointing to buy a large software package, then have to spend many hours debugging the company's own demo code, just so I can see what I bought.

Now that I have the TeeChartForNET demo working, I can see that it is a good product. Thank you for trying to answer my questions.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: WebCharts show red X when served from IIS 7

Post by Sandra » Thu Sep 29, 2011 10:25 am

Hello getdunne,

First I have apologize for the delay. Second, thank you for suggestion, we will consider this to next maintenance releases of TeeChart.Net

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply