<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to access HttpContext inside SOE? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520025#M20180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I apologize for the very late response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Second, we will cache some user resources in our server business table and we will compile statistics after users end their sessions. In that case, we may need Session_End event. What't more, we use SessionID which from HttpContext to identify a user in Session_End processing. &amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One can always access any database from inside SOEs to store info. However, HTTPContext info is not currently available to SOEs (at 10.1). Its not planned to be supported at 10.2 either. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, you have access to user name from inside SOEs and if the SOE client shares a session id and session status with the SOE, you could implement this behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following is a code snippet to retrieve user name:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EnvironmentManager envMgr = new EnvironmentManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UID envUID = new UID();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;envUID.setValue("{32d4c328-e473-4615-922c-63c108f55e60}");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object envObj = envMgr.getEnvironment(envUID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IServerEnvironment2 env2 = new IServerEnvironment2Proxy(envObj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IServerUserInfo userInfo = env2.getUserInfo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ajit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 16:34:05 GMT</pubDate>
    <dc:creator>AjitDharmik</dc:creator>
    <dc:date>2013-04-11T16:34:05Z</dc:date>
    <item>
      <title>Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520020#M20175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm wondering is it possible to access cookies or session from Httpcontext inside SOE?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 23:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520020#M20175</guid>
      <dc:creator>YanyiZhang</dc:creator>
      <dc:date>2012-07-19T23:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520021#M20176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And can we handle Session_End event by any chance?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 21:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520021#M20176</guid>
      <dc:creator>YanyiZhang</dc:creator>
      <dc:date>2012-07-20T21:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520022#M20177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd be shocked if this were possible.&amp;nbsp; The interface to SOE's is very limited.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want this type of information then I think that you have to take care of this yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, we do something similar by providing our own ASP.NET web application which all REST (and other) end points have to go through.&amp;nbsp; The web application serves as a proxy, adds custom business logic, etc.&amp;nbsp; It is also able to add information (using URL arguments) to the REST calls.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 10:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520022#M20177</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2012-07-21T10:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520023#M20178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;feng0hua0,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SOEs at 10.1 do not have access to the HTTPContext of incoming request. The REST/Web Services handler intercepts all requests to SOEs and allows only pre-defined ArcGIS specific request information pieces in, such as query params.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you share more info about what you are trying to accomplish and require the http context inside SOEs for?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ajit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2012 02:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520023#M20178</guid>
      <dc:creator>AjitDharmik</dc:creator>
      <dc:date>2012-07-24T02:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520024#M20179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;feng0hua0,&lt;BR /&gt;&lt;BR /&gt;SOEs at 10.1 do not have access to the HTTPContext of incoming request. The REST/Web Services handler intercepts all requests to SOEs and allows only pre-defined ArcGIS specific request information pieces in, such as query params.&lt;BR /&gt;&lt;BR /&gt;Could you share more info about what you are trying to accomplish and require the http context inside SOEs for?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Ajit&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, sure. First, we do need to retrieve Post/Get params from client side and server side will processing data base on these params. Second, we will cache some user resources in our server business table and we will compile statistics after users end their sessions. In that case, we may need Session_End event. What't more, we use SessionID which from HttpContext to identify a user in Session_End processing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2012 17:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520024#M20179</guid>
      <dc:creator>YanyiZhang</dc:creator>
      <dc:date>2012-07-24T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520025#M20180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I apologize for the very late response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt; Second, we will cache some user resources in our server business table and we will compile statistics after users end their sessions. In that case, we may need Session_End event. What't more, we use SessionID which from HttpContext to identify a user in Session_End processing. &amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One can always access any database from inside SOEs to store info. However, HTTPContext info is not currently available to SOEs (at 10.1). Its not planned to be supported at 10.2 either. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, you have access to user name from inside SOEs and if the SOE client shares a session id and session status with the SOE, you could implement this behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following is a code snippet to retrieve user name:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EnvironmentManager envMgr = new EnvironmentManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UID envUID = new UID();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;envUID.setValue("{32d4c328-e473-4615-922c-63c108f55e60}");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object envObj = envMgr.getEnvironment(envUID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IServerEnvironment2 env2 = new IServerEnvironment2Proxy(envObj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IServerUserInfo userInfo = env2.getUserInfo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ajit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 16:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520025#M20180</guid>
      <dc:creator>AjitDharmik</dc:creator>
      <dc:date>2013-04-11T16:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520026#M20181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ajit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you know by any chance how to get more information from the AGS about the User or Roles?&lt;/P&gt;&lt;P&gt;I need Role's title to work with it, not role ID. I found that there is some method ESRI.ArcGIS.Server.IRoleStore.GetRolesForUser() or other methods on that inteface. But I have no clue how to get hold of that instance in my SOE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2016 14:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520026#M20181</guid>
      <dc:creator>PetrDiviš</dc:creator>
      <dc:date>2016-11-10T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520027#M20182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you found an answer to this question? How to get access to the interface IRoleStore? There's no documentation on how to get it and no CoClass.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 09:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520027#M20182</guid>
      <dc:creator>LorenzMeyer1</dc:creator>
      <dc:date>2017-01-24T09:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520028#M20183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can get user and roles from soe :&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsupport.esri.com%2Ftechnical-article%255C000011331" rel="nofollow" target="_blank"&gt;http://support.esri.com/technical-article%5C000011331&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 13:23:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520028#M20183</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2017-01-25T13:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520029#M20184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Domenico&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the link, but this does not solve my Problem. I know how to return my logged in user and roles, but how can I get Access to the Interface IRoleStore to get all users and all roles to some user?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 13:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520029#M20184</guid>
      <dc:creator>LorenzMeyer1</dc:creator>
      <dc:date>2017-01-25T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520030#M20185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IRoleStore is used if you need do a custom provider. if you are in a soe you can use rest admin&amp;nbsp;&lt;A href="http://resources.arcgis.com/en/help/server-admin-api/security.html"&gt;http://resources.arcgis.com/en/help/server-admin-api/security.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:37:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520030#M20185</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2017-01-25T14:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to access HttpContext inside SOE?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520031#M20186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes, I know that with the REST Interface I could get the users and roles. My question was more related to the Interface iRoleStore and how to get it. I mean if we can do it by REST then there MUST be an ArcObjects Interface to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:10:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/is-it-possible-to-access-httpcontext-inside-soe/m-p/520031#M20186</guid>
      <dc:creator>LorenzMeyer1</dc:creator>
      <dc:date>2017-01-25T15:10:08Z</dc:date>
    </item>
  </channel>
</rss>

