<!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">
Sorry, I have no more ideas.<br>
<br>
I was guessing that there were some security implications<br>
because you had different results, but looking at your code, <br>
I cannot guess what is wrong.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
euskalmap skrev:
<blockquote cite="mid:1238669090156-2574461.post@n2.nabble.com"
 type="cite">
  <pre wrap="">Hi,
In my sample (sending in my before post <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/sample4.asp">http://patxi.mayol.free.fr/sample4.asp</a> ) I'm creating a session; so i do not understand your remark ?
Regards, Euskalmap

Perhaps the problem is that you are in a "wrong" session somehow?
Instead of connecting to a session, you are creating one?

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Sorry, number line 65

Hi,
Effectifly i have send bad tests. Sorry !!
You can see the new files here : <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/test_before.xml">http://patxi.mayol.free.fr/test_before.xml</a>  and <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/test_after.xml">http://patxi.mayol.free.fr/test_after.xml</a> 

So I do another test in my aspx file : <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/sample4.asp">http://patxi.mayol.free.fr/sample4.asp</a> 

With defaultUser="Anonymous" and defaultPassword="" :
*If I comment the line 69 (webLayoutId = new MgResourceIdentifier(str_NewMapDefinition)) I have this message : 'Unauthorized access.'
*If I uncomment the same line I have this mesage : 'Permission denied to resource: Session:bfba102a-ffff-ffff-8000-0016d44491c1_en_7F0000010AFC0AFB0AFA//Map_40312.MapDefinition'

With defaultUser="Administrator" and defaultPassword="admin" : (default value of MapguideOSE administrator)
*If I comment the line 69 : 'An exception occurred in DB XML component. Error: XML Indexer: Fatal Parse error in document at line, 1, char 1. Parser message: Invalid document structure '
*If I uncomment the same line I have the same message error mesage.

It seems there is perhaps a problem with the right authorization ant the method I use to init siteconnection ?

Perhaps this new information is interesting for you ?

Regards,
Francis


Not sure why, but both of those files have the UTF-8 BOM header :(.

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
  
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi,
Yes, the browser can read the xml file : i have generate 2 files : one just after reading the doc ( <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/test_before.xml">http://patxi.mayol.free.fr/test_before.xml</a> ) and another one after modify the Map id ( <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/test_after.xml">http://patxi.mayol.free.fr/test_after.xml</a> ) : the 2 files an be reading in my browser .
You can see my code here : <a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/sample3.asp">http://patxi.mayol.free.fr/sample3.asp</a> 
regards

Even if you don't have any xsd files in c:\temp, you should be able to 
open the xml document using Internet Explorer (just drag it into it).

Have you tried to not change the xml, and just save it back to MapGuide 
after reading it?
(In your code, just comment out the part that writes the new Map id into 
the xml.)

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
  
    
      </pre>
      <blockquote type="cite">
        <pre wrap="">HI,

Yes i have the file WebLayout-1.0.0.xsd in the directory C:\Program Files\MapGuideOpenSource2.0\Server\Schema\.
which method you want that I use to save the weblayout ?
If i save the weblayout in my code with the instruction ,
FileStream fs = File.Create("c:\\temp\\test.xml");
fs.Write(encodedBytes, 0, encodedBytes.Length);
it is normal that i can not read the weblayout because the file WebLayout-1.0.0.xsd is not present in c:\temp directory.
I have not understand how saving and reading the weblayout ?
Other question : Perhaps my mapguide server is not correctly parameterized? 
Thanks for your lelp.


Yes, it is very strange that it happens with only weblayouts.
Do you have the file:
C:\Program Files\MapGuideOpenSource2.0\Server\Schema\WebLayout-1.0.0.xsd

Can you save the weblayout if you just read it, and then save it? (eg. 
not changing anything).

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
  
    
      
        </pre>
        <blockquote type="cite">
          <pre wrap="">Hi,
I have try your maestro class in my sample like this : 
<a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/sample2.asp">http://patxi.mayol.free.fr/sample2.asp</a>
<a class="moz-txt-link-freetext" href="http://patxi.mayol.free.fr/sample2.asp">http://patxi.mayol.free.fr/sample2.asp</a> 
I have always the same error.
In the mapguide log file it say 'An exception occurred in the XML parser.'
and at the end i say about an error in
MgResourceContentManager.ValidateDocument.
Perhaps, Mapguide server can not find the WebLayout.1.0.0.xsd file ?
What you think about it?.
NB:It is very strange that there is no problem with filter in layer and as
much problem to modify mapdefinition in layout !!!

Thanks


  
    
      
        
          </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="">_______________________________________________
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="">_______________________________________________
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=""><!---->
_______________________________________________
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>
</body>
</html>