困惑我好长时间的问题:还是webchart的问题.这次我把使用过程序粘出来(全是英文).如能解决,小弟出300分绝不失言.
英文使用过程是这样的:
To use the control you just need to:
1) Add a reference to WebChart.dll in VS.NET and optionally you can add it to your toolbox.
2) Add the correct register tag in the page:
<%@ Register TagPrefix="Web" Namespace="WebChart" Assembly="WebChart" %>
3) Add the simplest chart possible:
<Web:ChartControl id="chart" runat="server">
</Web>
4) From this point you can use the VS.NET designer to format your chart.
5) BTW. Remember to call RedrawChart() whenever you want the chart to be
redrawn (usually in Page_Load or after changing the data, etc) if not you
will only receive an empty image, this is by design to avoid redrawing
unnecesary charts for performance.
FOR USERS OF VS.NET
The steps above are only needed if you like doing things manually, with VS.NET things
can be easier:
1) Open or Create a New Web Project in the language of your choice
2) Just open your toolbox (if it does not appears click Ctrl+Alt+X)
3) Right click on it and Select the option 揅ustomize Toolbox?
4) select
the Tab ?NET Framework Components? then click 揃rowse厰 and just search
for the extracted WebChart.dll file.
5) Doing this, will add a small chart icon in your toolbox,
and now, you can just drag/drop it in the VS.NET Designer, a
nd it will actually add the reference automatically for you in any web project.
6) From this point, you can add/remove charts from the designer,
use the AutoFormat task (right click on the chart) to customize look & feel. etc
SETUP KNOWN ISSUES:
The way the chart works is rendering the charts into a folder called WebCharts, so,
if the folder does not exist, it tries to create it, so it can store the charts there.
One known issue is with Windows XP, and probably Win 2K3, that they do not grant write
permission to the folders to the ASPNET account (or Network Service account).
So just to be sure, if the chart is working on the vs.net designer, but it is not working
when seeing the actual page:
1) Under your application virtual directory create a folder named WebCharts
2) grant NTFS write permissions to the ASPNET account (be sure not to grant write permissions
in the IIS MMC since that could be a security hole).
Try again.
So for example if your virtual directory is named MyApplication and lives in the default dirs.
You would need to create
C:\inetpub\wwwroot\MyApplication\WebCharts\
And assign read and write permissions to ASPNET account.
If this doesn抰 work, tell me and we will find out a solution quickly.
And please check the Application Event log to see if there are any (Application) errors to give us a clue.
Thanks for using the WebChart control.
Carlos
More details on troubleshooting:
If you find this exception, it means it is trying to write an error to the event viewer,
and it couldnt gain access to it. This is normally because of Write Permissions on the
registry.
So the problem usually is because it couldn't create the WebCharts folder mentioned above,
so follow the steps mentioned above.
Security Exception
Description: The application attempted to perform an operation not allowed by the security
policy. To grant this application the required permission please contact your system administrator
or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Requested registry access is not allowed.
IF you find an exception of Generic Error GDI+ .... then it means the folder is there, but the
user (ASPNET or whatever user you are using) do not have write permissions on the folder.
有哪能位高手,使用这控件,我无论怎调都是出现最后的那个错--GDI+ .... .请大家帮帮我.小弟将十分感激.
问题点数:50、回复次数:5Top
1 楼jasonboy(骑着小猪看夕阳)回复于 2004-11-02 11:14:08 得分 5
出什么错,说出来听听Top
2 楼wuxiaofeng(frog)回复于 2004-11-02 11:16:33 得分 5
So for example if your virtual directory is named MyApplication and lives in the default dirs.
You would need to create
C:\inetpub\wwwroot\MyApplication\WebCharts\
And assign read and write permissions to ASPNET account.
Top
3 楼rickjelly2004(每逢佳节倍思亲-------------快乐生活)回复于 2004-11-02 11:25:41 得分 20
就是教你如何用DLL,
你先要在控件栏中加一下你的控件,也就是右键,参照追加你下载的那个控件,如果你要用的话,就直接拖上去。
当然你要注意一下,你必须把你的那个控件的目录建在你的工程目录的下面,起一个名字就是WebCharts
不然的话,你运行起来会找不到的,说白了就是在你的工程的虚拟的目录下就行了
还有记得参照一下Top
4 楼rickjelly2004(每逢佳节倍思亲-------------快乐生活)回复于 2004-11-02 11:37:58 得分 20
1。你去C:\inetpub\wwwroot\看看你建的工程,看里面是不是有个WebCharts的文件夹,
这个文件夹里面放着一个控件:WebCharts.dll
2.如果没有的建一个,里面放你的控件。
3。右键你的工程项目右边的一缆,显示所有的项目,然后包含你钢材建的那个文件加,
4。参照你的哪个控件,添加控件,拖进你的页面用Top
5 楼chenxiaoguo20(chenxiaoguo20)回复于 2004-11-03 08:05:23 得分 0
不是那样的.问题解决.Top




