24. november 2005 - 16:44Der er
22 kommentarer og 1 løsning
Brug af en komponent i Visual Web Developer Express
Jeg har en komponent (dotnetCharting.dll), som jeg har placeret i rodens bin bibliotek og jeg har registreret den som anvist af firmaet i min .aspx fil:
Jeg har også lavet en reference til dotnetCharting.dll under fanen Browse og så viser den sig i Solution Explorer vinduet.
Mit problem er nu: hvordan får jeg graferne trukket ind i mit designvindue? Jeg ville have forventet, at de dukkede frem i Toolboxen, men jeg kan ikke finde dem her.
Altså skrive 'dotnetcharting.dll' i linien 'Filter'? Hvis jeg gør det, sker der ingenting.
Jeg har kørt en af deres testfiler på en webserver og den viste grafen pænt - hvis man kan det, har jeg så ikke downloadet den rigtige eller det kan man måske ikke antage (jeg mener bestemt, at jeg tog den rigtige ned)?
Create new project, ASP.NET Web Application. Copy the Database folder from the .netCHARTING bundle into your project root ( for example in c:\inetpub\wwwroot\webApplication) Copy dotnetCHARTING.dll to the bin folder within your web application (like you did for the database in step 2) Add a reference to dotnetCHARTING.dll under the References node in Solution Explorer. Select Customize Toolbox from Tools menu and then add the dll to Toolbox or right-click on the tool box > Add/Remove Items > .net tab > browse to the dll > click OK. Copy and Paste the code from any of the .netCHARTING samples included in the bundle to your aspx page (you can delete any default html code which has been created through Visual Studio .NET wizard) Create a Temp folder in the project path same as step 2 or 3 and modify the permissions to have write access (See installation for more information). Make sure the path for database is set correctly. When you start the project you should see a chart based on the sample code you added.
Nu har jeg downloadet den igen (den øverste = web 3.3) og jeg må have fået noget forkert ned første gang, da den sidste havde en anden dato og filstørrelse, men desværre giver den en ligeså giftig fejlmeddelelse (med brug af Choose Toolbox Item).
There was an error loading types from assembly N:\bin\dotnetCHARTING.dll . Request for permission of type System.Web.AspNetHostingPermission, System, Version 2.0.0.0, culture = neutral, PublicKeyToken ..... failed.
ja jeg tilføje det også som et item til min toolbox. prøv at gøre som beskrevet her:
Okay, I finally got it. This was fixed by running "Microsoft .NET Framework 2.0 Configuration" tool and Clicking on "Runtime Security Policy" and clicking the "Adust Zone Security" under "Tasks" in the right pane and increasing the intranet zone security settings.
Most likely I could have also used the "Increase Assembly Trust" settings instead.
I believe this is because I am doing development on one system with all my project files and assemblies on another.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.