BookmarkSubscribeRSS Feed
zyp911
Calcite | Level 5

I created client app(.NET) and  tried to connect to remote SAS server , but I could not connect to remote server.

Code:

                // Connect remote SAS server

                SASObjectManager.IObjectFactory2 obObjectFactory = new SASObjectManager.ObjectFactoryMulti2();

                SASObjectManager.ServerDef obServer =  new SASObjectManager.ServerDef();

                obServer.MachineDNSName = "abc.sas.com";

                obServer.Protocol = SASObjectManager.Protocols.ProtocolBridge;

                obServer.Port = Convert.ToInt32(8591);

                obServer.ClassIdentifier = "440196d4-90f0-11d0-9f41-00a024bb830c";

                object _workspace = obObjectFactory.CreateObjectByServer( "MyObject", true, obServer,userid,password);

Catch exception "The launch of the server process failed because of a SAS kernel initialization failure"

How to solve this problem?

2 REPLIES 2
ChrisHemedinger
Community Manager

I have a sample .NET application on GitHub, and it shows how to connect.  (See the SasServer.cs file in particular.)  Your sample code looks correct though, so it might be that the SAS command that is registered to launch with SAS object spawner has a bad option.  Also, it's best practice to use the name of the SAS server as registered in metadata ("SASApp" by default).  SAS has a feature of "server security" that may enforce the use of the proper name as described within metadata.

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
kshirley
Calcite | Level 5

Hi Zyp,  here 's a little help:

The launch of the server process failed because of a SAS kernel initialization failure.

Explanation:   For some reason, the SAS kernel cannot initialize.

Resolution:  Check the command line of the server to make sure that there are no invalid command line options. Also check any configuration files that are used to make sure that they are correct.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1873 views
  • 0 likes
  • 3 in conversation