|116268||May 6,2014 05:11 PM||May 7,2014 04:45 AM||ASP.NET MVC (Classic)||2|
For development purposes, I would like to store a diagram.xml file among my web site files, then load the diagram using DiagramBuilder. I have successfully loaded a file from the local file system in the %Temp% location, but can't seem to get it to work for a file stored in the web site itself. I have tried passing the following strings to the Load method, all of which result in an empty DiagramModel:
By the way, if I enter the fully qualified URL into a browser, I can see the XML stored in the file.
Is what I want to do possible? If so, can anyone help me with getting the right syntax? Thanks for your help.
I was able to answer this question myself. Here's what I needed:
HttpContextWrapper context = new HttpContextWrapper(System.Web.HttpContext.Current);
var filePath = context.Server.MapPath("~/Content/diagram.xml");
diagramView.Model.Load(filePath); // diagramView was previously assigned
Guess I should have looked a little more diligently before posting!
Sorry for the delay in getting back to you,
We are glad that your issue got resolved.
Could you please let us know whether you are in need of any other assistance from us? Please get back to us if you need further assistance
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.