Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ShapeLibrary problem (Read 3352 times)
lue
YaBB Newbies
*
Offline


I love NetDiagram!

Posts: 43
Location: Austria
Joined: Jan 9th, 2008
ShapeLibrary problem
Jul 28th, 2010 at 1:00pm
Print Post  
Hi all,
i cannot load an individual shape library from a subdirectory in the web (always i get the standard shapes ...). In the aspx Page i have only an placeholder with the id "PH".

Whats wrong?

Thanks and best regards Chris


Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

Dim DV1 As New DiagramView

DV1.ID = "DV1"

DV1.ClientSideMode = ClientSideMode.JavaApplet

PH.Controls.Add(DV1)


Dim D1 As Diagram = DV1.Diagram


Dim SLB1 As New ShapeListBox

SLB1.ID = "SLB1"

PH.Controls.Add(SLB1)


SLB1.Width = 300

SLB1.Height = 300


ShapeLibrary.LoadFrom(HttpContext.Current.Request.PhysicalApplicationPath() & "pNET_diagram/shl/pNET_process.shl")

SLB1.ShapeLibraryLocation() = "pNET_diagram/shl/pNET_process.shl"
End Sub

  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeLibrary problem
Reply #1 - Jul 28th, 2010 at 1:44pm
Print Post  
Hi,

If you don't specify the full URL, I think it will be resolved relatively to the applet location. So if the .jar file is inside the pNET_diagram folder, try removing that part from the location string.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
lue
YaBB Newbies
*
Offline


I love NetDiagram!

Posts: 43
Location: Austria
Joined: Jan 9th, 2008
Re: ShapeLibrary problem
Reply #2 - Jul 28th, 2010 at 3:32pm
Print Post  
Hi Stoyo,
thanks! i changed the links


ShapeLibrary.LoadFrom(HttpContext.Current.Request.PhysicalApplicationPath() & "pNET_process.shl")

SLB1.ShapeLibraryLocation() = "pNET_process.shl"

so, that the jar-file and the shl-file is in the same directory, but this solves not the problem ...

we use visual studio 2010 with .net 4.0

mysterious: with the build in webserver of vs2010 function is ok, published to iis of windows server 2003 or windows7: not ok.

best regards chris
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeLibrary problem
Reply #3 - Jul 28th, 2010 at 4:36pm
Print Post  
Hi,

Can you see any exceptions in the Java console?

If it works with the VS server, then the problem might be that IIS is not configured to serve .shl files. You might try changing the extension to .xml, or add .shl to the IIS content type list as here -
http://mindfusion.eu/Forum/YaBB.pl?board=netdg_disc;action=display;num=125661636...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
lue
YaBB Newbies
*
Offline


I love NetDiagram!

Posts: 43
Location: Austria
Joined: Jan 9th, 2008
Re: ShapeLibrary problem
Reply #4 - Jul 28th, 2010 at 6:14pm
Print Post  
Thanks! Renaming .shl in .xml is the solution. Mime definition in web.config was not succesfully.
Best regards from austria. Chris
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint