<?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: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server in Developers</title>
    <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823212#M6105</link>
    <description>I am not at my machine right so winging it a bit. Check your dcom config for permissions.</description>
    <pubDate>Wed, 13 Jul 2022 19:21:40 GMT</pubDate>
    <dc:creator>AlanC</dc:creator>
    <dc:date>2022-07-13T19:21:40Z</dc:date>
    <item>
      <title>.NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823195#M6104</link>
      <description>&lt;P&gt;I am trying to build a solution that involves connecting to our Metadata server hosted on an AWS Red Hat instance through C# .NET, and am using Chris Hemedinger's C# example for .NET as an example. When I try to run the code, I immediately get a COMException from OMRInterface. Usually this results in a message of&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Could not connect: &amp;lt;connectionAttempts&amp;gt;&amp;lt;/connectionAttempts&amp;gt;"&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;System.Runtime.InteropServices.COMException (0x80042002): &amp;lt;connectionAttempts&amp;gt;&amp;lt;/connectionAttempts&amp;gt;
   at SASObjectManager.ObjectFactoryMulti2Class.CreateObjectByServer(String Name, Boolean synchronous, ServerDef pIServerDef, String LoginName, String Password)
   at SAS.BI.Itconfig.Library.ServerTests.SASServerTest.CreateConnectionWithObjectFactoryMulti()
   at SAS.BI.Itconfig.Library.ServerTests.SASServerTest.CreateConnection()&lt;/PRE&gt;&lt;P&gt;I have installed the SAS Integration Technologies Client, and have tried using the ITConfig.exe to test the connection, and will get this message every time&lt;/P&gt;&lt;PRE&gt;Function Name:CreateObjectByServer
0x80042002 - &amp;lt;connectionAttempts&amp;gt;
&amp;lt;connectionAttempt&amp;gt;
&amp;lt;description&amp;gt;Invalid pointer
&amp;lt;/description&amp;gt;
&amp;lt;status&amp;gt;0x80004003&amp;lt;/status&amp;gt;
&amp;lt;saslogin&amp;gt;&amp;lt;/saslogin&amp;gt;
&amp;lt;sasmachinednsname&amp;gt;[machine DNS name here]&amp;lt;/sasmachinednsname&amp;gt;
&amp;lt;sasport&amp;gt;8561&amp;lt;/sasport&amp;gt;
&amp;lt;sasclassid&amp;gt;2887E7D7-4780-11D4-879F-00C04F38F0DB&amp;lt;/sasclassid&amp;gt;
&amp;lt;threadid&amp;gt;31556&amp;lt;/threadid&amp;gt;
&amp;lt;/connectionAttempt&amp;gt;
&amp;lt;/connectionAttempts&amp;gt;
There is no additional error information available.&lt;/PRE&gt;&lt;P&gt;It does not matter what Machine DNS name I use, or whether or not I use a username and password when testing the IOM Bridge to our Metadata Server. I have run other tests to check that I do have access to the port, so that shouldn't be the issue. I think the issue is on my machine. I think it has something to do with the initial creation of&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SASObjectManager.IObjectFactory2 obObjectFactory = new SASObjectManager.ObjectFactoryMulti2();&lt;/PRE&gt;&lt;P&gt;As this results in an OMRInterface exception. I have also tried connecting to Workspace instead (port 8591), but get the exact same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an idea of what the Invalid Pointer in the error message is referring to? Are there other SAS libraries/programs/clients I need to install besides Integration Technologies Client?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 18:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823195#M6104</guid>
      <dc:creator>meiacopeland</dc:creator>
      <dc:date>2022-07-13T18:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823212#M6105</link>
      <description>I am not at my machine right so winging it a bit. Check your dcom config for permissions.</description>
      <pubDate>Wed, 13 Jul 2022 19:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823212#M6105</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2022-07-13T19:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823228#M6107</link>
      <description>&lt;P&gt;Thanks for the quick response! In the ITConfig, it says&lt;/P&gt;&lt;PRE&gt;An error occurred while trying to gather information about SAS. SAS may not be installed on this machine.&lt;BR /&gt;DCOM is enabled.
dcomcnfg Settings:
Default Authentication Level: Not Specified
Default Impersonation Level: Identify&lt;/PRE&gt;&lt;P&gt;The first part, I've been assuming it's because I don't have any SAS programs aside from the ITClient.&lt;/P&gt;&lt;P&gt;I also checked my DCOM permissions, and there doesn't seem to be anything wrong there. Although I have never played around with those kinds of settings before, so not sure what to do.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 20:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823228#M6107</guid>
      <dc:creator>meiacopeland</dc:creator>
      <dc:date>2022-07-13T20:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823231#M6109</link>
      <description>&lt;P&gt;I believe you are hitting a security issue, but that is the case in almost all circumstances with the IntTech connection. I know this is old (&lt;A href="https://support.sas.com/kb/26/056.html" target="_blank"&gt;26056 - Microsoft Visual Studio 2005 C# Code Snippets (sas.com)&lt;/A&gt;) but look at the IOM section and see if that helps you isolate the wrong parm. The CLSID is the best search term, not the error. You may need to call tech support or see if Chris picks up on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I never use IOM. I tend to put a web service on the server and call into SAS that way. Much, much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends on what you need to do as well. If the goal is to submit code or read a dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 21:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823231#M6109</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2022-07-13T21:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823233#M6110</link>
      <description>&lt;P&gt;I found some old code. I am sending a few snippets which you can piece together:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;       internal static SAS.Workspace ConnectToSAS()
        {
            SASObjectManager.ObjectFactoryClass objFactory = new SASObjectManager.ObjectFactoryClass();
            SASObjectManager.ServerDefClass serverDef = new SASObjectManager.ServerDefClass();
            // ************************************************
            // Configure the SAS server information.
            // ************************************************
            serverDef.BridgeEncryptionAlgorithm = "SASProprietary";
            serverDef.BridgeEncryptionLevel = SASObjectManager.EncryptionLevels.EncryptUserAndPassword;
            serverDef.MachineDNSName = "client.dnsexample.local";
            serverDef.MachineDNSName = "172.88.111.22";
            serverDef.MachineDNSName = "skycutter";
            serverDef.Port = 8592;
            serverDef.Port = 8591;
            serverDef.Protocol = SASObjectManager.Protocols.ProtocolBridge;
            // ************************************************
            // Create the connection.
            // ************************************************
            SAS.Workspace sasWorkspace = null;
            sasWorkspace = (SAS.Workspace)objFactory.CreateObjectByServer("BridgeConnection", true,
                serverDef, "uid", "password");
            // Add the SAS object to the ObjectKeeper. If the object is not
            // in the ObjectKeeper, it cannot be used by the IOM Data Provider.
            SASObjectManager.ObjectKeeperClass objKeeper = new SASObjectManager.ObjectKeeperClass();
            objKeeper.AddObject(1, "BridgeConnection", sasWorkspace);
            return sasWorkspace;
            // objKeeper.RemoveObject(sasWorkspace);
        } // connectToSAS()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
        /// &amp;lt;summary&amp;gt;
        ///     Submits SAS code using the IOM interface
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="sasCode"&amp;gt;The SAS statements to be submitted&amp;lt;/param&amp;gt;
        public SasRunObject SubmitSasCode(string sasCode)
        {
            try
            {
                Workspace ws = CreateWorkspace();
                SasCore.StepError = false;
                SasCore.SasLanguageService.Reset();
                SasCore.SasLanguageService = ws.LanguageService;
                SasCore.SasLanguageService.Submit(sasCode);
                SasCore.SasLanguageService.StepError += SasLanguageService_StepError;
                SasCore.SasLanguageService.LineSeparator = "\r\n";
                var sro = new SasRunObject();
                sro.SasCode = sasCode;
                sro.SasLog = SasCore.SasLanguageService.FlushLog(SasCore.LogCharactersToReturn);
                sro.SasList = SasCore.SasLanguageService.FlushList(SasCore.ListCharactersToReturn).Replace("\f", "");
                return sro;
            }
            catch (Exception ex)
            {
                util.HandleError(MethodBase.GetCurrentMethod().Name, ex);
                return null;
            }
        }&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 21:23:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823233#M6110</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2022-07-13T21:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823421#M6116</link>
      <description>&lt;P&gt;I tried the code you attached and was getting the same problem. We're thinking it's likely a security issue, especially since I am working on a company computer. We will be trying out other solutions, and contact tech support if we get stuck with those as well. Your help is much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 20:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823421#M6116</guid>
      <dc:creator>meiacopeland</dc:creator>
      <dc:date>2022-07-14T20:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823428#M6117</link>
      <description>Make sure you go into dcomcnfg utility in Windows and, on any SAS objects, set Permissions to None. That may help. When I looked, I didnt see any SAS objects in my DCOM which is strange. They used to always be there. Check yours and good luck.&lt;BR /&gt;&lt;BR /&gt;Fiddler may help you as would sysmon in the SysInternals suite.</description>
      <pubDate>Thu, 14 Jul 2022 21:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/823428#M6117</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2022-07-14T21:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: .NET: SASObjectManager COMException from OMRInterface when connecting to remote Metadata Server</title>
      <link>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/827871#M6137</link>
      <description>&lt;P&gt;Wanted to update this now that I have solved the issue.&lt;/P&gt;&lt;P&gt;I googled the SAS Integration Technologies Client, and the first several hits were for SAS 9.2. I have now gotten a link from SAS to the newest version, and am able to connect to the server remotely.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 15:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/NET-SASObjectManager-COMException-from-OMRInterface-when/m-p/827871#M6137</guid>
      <dc:creator>meiacopeland</dc:creator>
      <dc:date>2022-08-09T15:00:49Z</dc:date>
    </item>
  </channel>
</rss>

