<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
MapGuide restricts you from writing into another session repository, so
it is intentional.<br>
When you call "CreateSession" you get a clean repository, and cannot
interact with the other sessions repository, even if you have the
correct path.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
nclayton skrev:
<blockquote cite="mid:17694835.post@talk.nabble.com" type="cite">
  <pre wrap="">I just got this to finally work.
I had to return the ResourceId generated inside the function to use in
mainframe.php

so now my code inside mainframe.php that sets up $webLayout looks like this:

  $resourceSrvc = $site-&gt;CreateService(MgServiceType::ResourceService);
  $rid = loadWebLayout($sessionId,$resourceSrvc);
  $webLayout = new MgWebLayout($resourceSrvc, $rid);

It's odd that you cannot just create another ResourceID that references that
resource...or maybe it isn't. Is there some sort of "locking" mechanism on
resources when resourceIdentifiers are created?



Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I belive that MapGuide runs in the "System" account, so it has full
access.
Are you certain that $sid is the same sessionid as the connection has?
You cannot save to another session (perhaps the Administrator can?).

Regards, Kenneth Skovhede, GEOGRAF A/S



nclayton skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">I am having this exact same problem. I am using php and the ajaxviewer.
I was able to store the weblayout in Library:// but get 'Permission
denied'
when trying to store in Session:

Here is my code:

function loadWebLayout($sid,$svc){

  $lyt = &lt;&lt;&lt;XML
    weblayout xml here...
XML;

  $dom = new domDocument;
  $dom-&gt;loadXML($lyt);
  $def = "Session:" . $sid . "//standard.WebLayout";
  $rid = new MgResourceIdentifier($def);
  $dat = $dom-&gt;saveXML();
  $src = new MgByteSource($dat,strlen($dat));
  $src-&gt;SetMimeType(MgMimeType::Xml);
  $svc-&gt;SetResource($rid,$src-&gt;GetReader(),null);
}

should the IUSR_* account have write/modify rights to the session folder
in
the repository perhaps?
  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>