<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">But i saw when session expired in the log it’s “Session Expired…” not “Permission Denied…’<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">crazy<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Rémy<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> zspitzer [via OSGeo.org] [mailto:ml-node+<a href="/user/SendEmail.jtp?type=node&node=5057109&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>]
<br>
<b>Envoyé :</b> vendredi 31 mai 2013 04:33<br>
<b>À :</b> Rémy GOURRAT<br>
<b>Objet :</b> Re: [MapGuide 2.4] Web .Net API SetResource failed 1 to 2 times<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I'd guess the session expired?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, May 30, 2013 at 9:22 PM, Rémy Gourrat <<a href="/user/SendEmail.jtp?type=node&node=5057078&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Hello,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I have a .net web api  wich edit feature source definition</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">At the end of the function, I update the new feature source definition by this code in the session repository</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">“...<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:35.4pt;text-indent:35.4pt">
// Chargement du String xml dans une variable type MgByteSource  <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                               MgByteSource contentByteSource = new MgByteSource(encodedDefinition, encodedDefinition.Length);<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                                                              
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                               //Ecriture du nouveau FeatureSourceID dans la Session: en lieu et place du précédent s'appuyant sur Library<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                              
<span lang="EN-US">String str_NewFeatureSourceId = FeatureSourceListElem.Replace("Library:","Session:" + sessionId);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                               MgResourceIdentifier new_MgfeatureSourceId = new MgResourceIdentifier(str_NewFeatureSourceId);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                                                                             
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                              
</span>// Sauvegarde de la ressource avec la nouvelle définition<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">                              
<span lang="EN-US">ag_ResourceService.SetResource(new_MgfeatureSourceId, contentByteSource.GetReader(), null);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">…                                                                          
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">”</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">During many hours it’s running very very  well
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">And suddenly it’s failing, and after few minutes or hours or enable the iis trace it’s running well again !</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">But when it failed, my Exception Catch code is not executing in my function</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">“</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                catch (MgException mge)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                {</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                               errMsg = mge.GetExceptionMessage() + "\n" + mge.GetDetails();</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                               ag_PrintMessage("ag_proc.aspx : " +  "ag_SetSRSFeatureSource : ","Erreur ! Exception levée par Catch " + errMsg);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">                }</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">“</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">But I have a message in the Errors.log :</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">“</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"><2013-04-26T12:12:16>                2084                                      Anonymous</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> Error: Permission denied to resource: Session:c3b53a1a-ae59-11e2-8000-00155d2d5706_en_MTI3LjAuMC4x0AFC0AFB0AFA//Ag Base/2 - Calques/ASSC_LDE/LDE_A_COLLEC_EP.LayerDefinition</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> StackTrace:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgResourceServiceHandler.ProcessOperation() line 80 file c:\mg-2.4-x64\mgdev\server\src\services\resource\ResourceServiceHandler.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgOpSetResource.Execute() line 103 file c:\mg-2.4-x64\mgdev\server\src\services\resource\OpSetResource.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgServerResourceService.SetResource() line 1064 file c:\mg-2.4-x64\mgdev\server\src\services\resource\ServerResourceService.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgRepositoryManager.SetResource() line 563 file c:\mg-2.4-x64\mgdev\server\src\services\resource\RepositoryManager.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgRepositoryManager.AddResource() line 536 file c:\mg-2.4-x64\mgdev\server\src\services\resource\RepositoryManager.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgResourceContentManager.AddResource() line 183 file c:\mg-2.4-x64\mgdev\server\src\services\resource\ResourceContentManager.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgResourceContentManager.PutDocument() line 624 file c:\mg-2.4-x64\mgdev\server\src\services\resource\ResourceContentManager.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgSessionRepositoryManager.CheckPermission() line 238 file c:\mg-2.4-x64\mgdev\server\src\services\resource\SessionResourceContentManager.cpp</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">  - MgSessionResourceContentManager.CheckPermission() line 235 file c:\mg-2.4-x64\mgdev\server\src\services\resource\SessionResourceContentManager.cpp“</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Somebody have an explanation for this ? is there a specific concept that I don’t understand ?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Thanks</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Rémy</span><o:p></o:p></p>
</div>
<div style="margin-top:12.0pt">
<p class="MsoNormal"><span style="font-size:8.5pt;color:#666666">AG-Carto - Bayonne
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal">
<hr size="2" width="300" style="width:225.0pt" align="left">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/MapGuide-2-4-Web-Net-API-SetResource-failed-1-to-2-times-tp5056933.html" target="_blank" rel="nofollow" link="external">
[MapGuide 2.4] Web .Net API SetResource failed 1 to 2 times</a><br>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html" target="_blank" rel="nofollow" link="external">
MapGuide Users mailing list archive</a> at Nabble.com.<br>
<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="/user/SendEmail.jtp?type=node&node=5057078&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br clear="all">
<br>
-- <br>
Zac Spitzer<br>
Solution Architect / Director<br>
Ennoble Consultancy Australia<br>
+61 405 847 168<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________ <br>
mapguide-users mailing list <br>
<a href="/user/SendEmail.jtp?type=node&node=5057078&i=2" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
<br>
<o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#444444">If you reply to this email, your message will be added to the discussion below:<o:p></o:p></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";
color:#444444"><a href="http://osgeo-org.1560.x6.nabble.com/MapGuide-2-4-Web-Net-API-SetResource-failed-1-to-2-times-tp5056933p5057078.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/MapGuide-2-4-Web-Net-API-SetResource-failed-1-to-2-times-tp5056933p5057078.html</a>
<o:p></o:p></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="line-height:18.0pt"><span lang="EN-US" style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To start a new topic under MapGuide Users, email
</span><span style="font-size:
8.5pt;font-family:"Tahoma","sans-serif";color:#666666"><a href="/user/SendEmail.jtp?type=node&node=5057109&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a></span><span lang="EN-US" style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">
<br>
To unsubscribe from MapGuide Users, </span><span style="font-size:8.5pt;
font-family:"Tahoma","sans-serif";color:#666666"><a href="" target="_top" rel="nofollow" link="external"><span lang="EN-US">click
 here</span></a></span><span lang="EN-US" style="font-size:8.5pt;
font-family:"Tahoma","sans-serif";color:#666666">.<br>
</span><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";
color:#666666"><a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_top" rel="nofollow" link="external"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a>
<o:p></o:p></span></p>
</div>
</div>




        
        
        <div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
                                AG-Carto - Bayonne
                        </div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/MapGuide-2-4-Web-Net-API-SetResource-failed-1-to-2-times-tp5056933p5057109.html">RE: [MapGuide 2.4] Web .Net API SetResource failed 1 to 2 times</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html">MapGuide Users mailing list archive</a> at Nabble.com.<br/>