Me._Gauge.DeploymentScenario.FilePath = "C:\Infragistics\GaugeImages"
and the page wont load at all. I also tried:
Me._Gauge.DeploymentScenario.FilePath = "C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Infragistics\GaugeImages" (and I created the dir of course)
Finally (yes, last of course) I read the directions and also tried creating the "ig_common" virtual directory and I put all images, scripts, forms, etc there as the instructions outlined. Still, I get the same error.
Any ideas? Is it something to do with directory permissions, or am I somehow setting the "FilePath" property wrong, or what?
Thanks!Shayne
Ideas??
Hi Shayne,
This sounds like a permissions issue. The ASP.NET_WP isn't going to have acecss to root folders like C:\infragistics\gaugeimages, you would need to specifically grant permissions to that folder for that process. Alternatively, you could use the virtual directory, which would have access granted through IIS. However, anything under wwwroot gets 'stepped' on by SharePoint. To tell SharePoint to keep its hands off your folder, you need to add it as a folder inclusion. I think that might be the step you're missing.
You will need to copy any Infragistics assemblies used as references, along with your custom assembly, to your Microsoft Office SharePoint Server. It is best to install the assemblies into the GAC to avoid Code Access Security exceptions. Because NetAdvantage for ASP.NET [CLR2] assemblies contain the necessary JavaScript files as embedded resources, creating a virtual directory for script files is not required; however, should you want to use custom images or CSS style sheets, you will want to set up a directory for those resources. You will also need to inform WSS of the directory and mark it for “Wildcard Inclusion.” You can use IIS to add a virtual directory, which will contain all of your resources, to your SharePoint site. Once you have added the virtual directory, use the SharePoint Central Administration page to include the directory.
Still nothing. I have submitted a support incident. Maybe the Infragistics folks can help me.
It's very frustraing becuase the "article" on the website makes it look very easy to add the controls to Web Parts, but obviously there are many setup/administration type steps that are missing in that article. :(
Shayne, are you using MOSS or Office 2003? In office 2003 you needed to add an "exclusion" in MOSS you need to add a wilcard inclusion. Minor difference, but something to note.
WSS 3.0
Here is what I have done (I followed the Deployment instructions in the Infragistics Help):
Created a "virtual" directory called "ig_common" in ISS, this virtual directory points to "C:\Infragistics". Inside this directory there are two folders: 20082CLR and Images. (With several files and subdirectories below these.)
I missed your original point about "excluding" the directory in SharePoint. Do I still need to do that with the Virtual Directory? If so, how???
Not only do I need to know how to seup the "exluding directory" I am also having a hard time understanding EXACTLY where in the file sytem I can redirect the image path to (evidently the "ig_common" virtual directory solutution doesn't work...). I mean, because of Sharepoint I am not sure exactly where the "root" of the path should be. I think it is "IT", but when I look in Inetput there is no "IT", even thought that is the path you take to the sharepoint site via URL. Understand what I am saying?
For Instance, the path to my Sharepoint site is http://loch24/IT/Infragistics/default.aspx Although, when I look in the Inetpub directory on the server, there is no "IT" or "Infragistics' directory anywhere. (It is obviously being handled by sharepoint.) So, if I wanted to redirect the Images to a location such as "Infragistics\Images" (using the "DeploymentScenario.FilePath" property), I am not even sure where to create the new directory in the filesystem and how to exclude it via Share Point admin, due to the fact that I am not sure what the "root" of my app is on the actual filesystem. Confused yet? haha I am!
I'm a bit stumped here. I don't know what the .Location property is, or where you found that. Was it in the SharePoint reference application code? If so, it may have been a mistake. The absolute simplest way to load up a gauge is to use the LoadPreset functionality, and feed it an XML file. That will allow you to create your Gauge at design-time using the designers and wizards.
-Tony
Evidently the "Location" property is gone in v 3.5 for the UltraGauge. What is the equivalent replacement?
I finally made some good progress using the following code, I actually have a gauge appearing on my SharePoint Web Part now! Horray!
Me._Gauge = New igGauge.UltraGauge()Me._Gauge.ID = "Gauge"
'Dim ultraGauge1 As New Infragistics.Win.UltraWinGauge.UltraGauge()Dim myDigitalGauge As New SegmentedDigitalGauge()Dim mySolidFillBrushElement As New SolidFillBrushElement()Dim mySolidFillBrushElement1 As New SolidFillBrushElement()
'Set the number of digits. myDigitalGauge.Digits = 8
'Set the mode to 14-segment and the digit text to FM : 96.4. myDigitalGauge.Mode = SegmentMode.FourteenSegmentmyDigitalGauge.Text = "FM : 96.4"
Me.Controls.Add(Me._Gauge)
I wish there was a better sample from Infragistics for people (ME!) that don't really know what they are doing. :)
The problem I have is I am not just not sure how to 'translate' the ASPX code. How do I "work through the codebehind file"? You mean, not use the wizard? It seems like there should be a "simple" way to just show a gauge (as a web part), that is all I was trying to do to demo this to my boss (and expalin why I needed to spend the $$$ to get this tool....lol).
Thank you for all the help. Eventually, it will start "clicking" for me... eventually!
I usually do the following - if I want to do some quick prototype work, I'll use the designer and wizards and have it generate the ASPX markup in my classic ASPX page. When I'm ready to turn it into a user control, I'll manually 'translate' the ASPX into propert settings, or use the Guage's ability to "Save Preset" to generage an external xml file. The Gauge also has the ability to load a preset, so you can write a line of code that reads the XML file in and loads up all of your settings. The only complexity you'll have here is loading the file in your sharepoint application. But now that you've figured out how to work with external resources, this should be a simple task for you.
As an alternative, you can work through the codebehind file the entire time, avoiding genrating any ASPX. This will be a little slower than using the designers, but when you're done, it's a simple copy and paste of your code from the aspx.cs file into the webpart file.
One last solution you may want to look into is the SharePoint SmartPart which allows you to create declarative markup (user controls) as part of your sharepoint webpart. The project is up on codeplex - http://www.codeplex.com/smartpart
Yes. This was the problem. Now the error is gone and the Web Part generates an image called "Gauge_0.jpg". Of course, the image is blank because the code is so simple.
I appreciate your suggestion about using a knows environment. My issue with that, is (I am sure it is my limited understanding of ASP.Net) I am just not sure how to take the ASPX generated code and move it over to the Web Part. I mean, the ASP generated code includes alof os ASP specific tags. When I am coding for Web Parts, I am strictly using C# or VB. Understand what I am saying? The wizard generates ASP code, not just C# and/or VB code. How do I "copy/implement" that code in my web part?