BookmarkSubscribeRSS Feed
gansloaded
Calcite | Level 5

Hi all,

 

I'm fairly new to SAS. My team is trying to connect to SAS using .NET. We are using Chris Hemedinger's "https://github.com/cjdinger/SasHarness".  

 

I keep getting this error using the tool - "The client has connected to a SAS Metadata server (v1.0) when it intended to connect to a SAS Workspace server". I have verified the SAS workspace server name, machine dns name and the port with my SAS admin and these input looks correct. Could you please help me resolve this? Am i missing something? We are using SAS 9.4. I'm connecting to SAS using VS2017 from a 64 bit machine.

 

Below is the code:

 

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

obServer.MachineDNSName = Host;
obServer.Protocol = SASObjectManager.Protocols.ProtocolBridge;
obServer.Port = Convert.ToInt32(Port);
obServer.ClassIdentifier = "440196d4-90f0-11d0-9f41-00a024bb830c";

_workspace = (SAS.Workspace)obObjectFactory.CreateObjectByServer(
Name, true,
obServer,
string.IsNullOrEmpty(UserId) ? null : UserId,
string.IsNullOrEmpty(Password) ? null : Password);

objectKeeper.AddObject(1, Name, _workspace);

 

Thanks,

1 REPLY 1
ChrisHemedinger
Community Manager

You are probably connecting to the Metadata server port (default: 8561) instead of the Workspace server port (default: 8591). If using EG, your connection info includes the Metadata server, which then retrieves the list of available workspace servers (ex: "SASApp") and brokers the Workspace connection for you. With this app example, we're bypassing the Metadata server and going straight to the Workspace.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1012 views
  • 2 likes
  • 2 in conversation