<?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: serverobject becomes null in SOI in ArcGIS Enterprise Extensibility Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1066343#M263</link>
    <description>&lt;P&gt;get &lt;EM&gt;IServerObjectHelper&lt;/EM&gt; in init&lt;/P&gt;&lt;P&gt;The server object helper implements a weak reference on a server object such that a server object extension can keep a string reference on the server object helper (for example, in a member variable) and avoid keeping a strong reference on the server object itself.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 13:24:13 GMT</pubDate>
    <dc:creator>nicogis</dc:creator>
    <dc:date>2021-06-09T13:24:13Z</dc:date>
    <item>
      <title>serverobject becomes null in SOI</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1066001#M260</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have written an SOI for rights management in c# and let it run on ArcGIS server 10.7.1.&lt;/P&gt;&lt;P&gt;Normally it is working good, but sometimes the Service becomes unavailable. In the Log files I find the message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;Msg time="2021-05-31T10:13:27,277" type="SEVERE" code="9000" source="Rest" process="4724" thread="1" methodName="" machine="MU-KARTENSRV.REGIONHANNOVER.DE" user="" elapsed="" requestID="feed7716-61c9-4107-ad25-5133bfcc1d58"&amp;gt;Error performing query operation Error handling service request :0x80004003 - Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. in 'GlobalNetXXSOI'&amp;lt;/Msg&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error message says, that there is a null pointer.&lt;/P&gt;&lt;P&gt;The translation of the germen massage should be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Object&amp;nbsp;reference&amp;nbsp;not&amp;nbsp;set to&amp;nbsp;an&amp;nbsp;instance&amp;nbsp;of&amp;nbsp;an object"&lt;/P&gt;&lt;P&gt;I have a class attribute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private IServerObject serverObject;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Like in the esri samples it is filled in the init method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    public void Init(IServerObjectHelper pSOH)
        {
            try
            {
                serverObject = pSOH.ServerObject;
            }
            catch (Exception e)
            {
                logger.LogError(e);
                Logger.WriteSystemError(e.ToString());
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But now it seems, that this attribute becomes null some times. Is there any way I could get the ServerObject, outside the Init method, so I could restore it, when it becomes null?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Andreas Ruloffs&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 08:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1066001#M260</guid>
      <dc:creator>AndreasRuloffs2</dc:creator>
      <dc:date>2021-06-09T08:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: serverobject becomes null in SOI</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1066343#M263</link>
      <description>&lt;P&gt;get &lt;EM&gt;IServerObjectHelper&lt;/EM&gt; in init&lt;/P&gt;&lt;P&gt;The server object helper implements a weak reference on a server object such that a server object extension can keep a string reference on the server object helper (for example, in a member variable) and avoid keeping a strong reference on the server object itself.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 13:24:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1066343#M263</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2021-06-09T13:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: serverobject becomes null in SOI</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1067278#M264</link>
      <description>&lt;P&gt;Thank you for your answer,&lt;/P&gt;&lt;P&gt;OK, so I will change it, that I keep the helper in a member and access the serverObject from it.&lt;/P&gt;&lt;P&gt;But I am afraid, this wont fix my problem, cause I had the problem when I had solved it this way some time ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 08:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-extensibility-questions/serverobject-becomes-null-in-soi/m-p/1067278#M264</guid>
      <dc:creator>AndreasRuloffs2</dc:creator>
      <dc:date>2021-06-11T08:44:13Z</dc:date>
    </item>
  </channel>
</rss>

