Select Server Connection failure

Discussions concerning general integration topics.

Moderator: Phil Barton

roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Select Server Connection failure

Post by roteague »

I recently upgraded to a new machine running Windows 7. I'm having a bit of problem connecting to the Select Server via the API, but I'm having trouble seeing where my configuration isn't correct. Here is the line that is throwing the error:

SelectServer server = new Select.Client.SelectServer(_softProUri, credential);

The error I get is:

Object reference not set to an instance of an object.

The stack trace is:

" at SoftPro.Select.Client.SelectServer.OnInitialize()\r\n at SoftPro.ClientModel.ServerObject.SoftPro.ClientModel.ISupportInit.Initialize(IServiceProvider sp)\r\n at SoftPro.Select.Client.SelectServer..ctor(IServiceProvider serviceProvider, Uri uri, ICredentials credentials)\r\n at SoftPro.Select.Client.SelectServer..ctor(Uri uri, ICredentials credentials)\r\n at TG.SoftPro.OrderLookup.SoftProOrder.LoadOrderTrackingService() in C:\\Projects\\SoftPro\\Code\\TG.SoftPro Solution\\TG.SoftPro.OrderLookup\\SoftProOrder.cs:line 308"

The User ID and Password are the default, the Uri is "http://computername:8080/SelectServer". I have no problem with the Select Client.

Any idea what I could be missing?

Thanks,
Robert
Hadi Chemaly

Re: Select Server Connection failure

Post by Hadi Chemaly »

We need a little bit more details to figure this one out:
  1. What version of Select are you running on your Windows 7 box?
  2. Are you running Windows 7 64-bit or 32-bit?
  3. Does the same code work on an older OS with the same version of Select installed?
I believe you are already aware of the ProFormApiSample project shipped with the Select SDK, which might shed some light. You might simply be facing a server uri format issue.
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Select Server Connection failure

Post by roteague »

Sorry Hadi,

I'm running Select 2.4.30715.60 on Windows 7 Professional 64-bit. The code was originally developed on Windows XP and works fine there. I'm also confident with the URI, primarily because I convert the address string to a System.Uri before passing it into the SelectServer constructor.

Thanks,
Robert
Hadi Chemaly

Re: Select Server Connection failure

Post by Hadi Chemaly »

Robert,

You no longer need the "/SelectServer" part at the end of the Server Uri.

Check out this thread for details.
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Select Server Connection failure

Post by roteague »

Hadi Chemaly wrote:Robert,

You no longer need the "/SelectServer" part at the end of the Server Uri.

Check out this thread for details.
Sorry, I'm not using the "/SelectServer", not sure why I wrote it down. Too busy I guess.
Robert
Hadi Chemaly

Re: Select Server Connection failure

Post by Hadi Chemaly »

Try redirecting the output path of your project to the SoftPro Select folder (if it's not already) and let me know if it helps:

Code: Select all

<OutputPath>$(ProgramFiles)\SoftPro\Select\</OutputPath>
In the meantime, I will set up a Windows 7 64-bit environment and try to run our ProFormApiSample.
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Select Server Connection failure

Post by roteague »

Hadi Chemaly wrote:Try redirecting the output path of your project to the SoftPro Select folder (if it's not already) and let me know if it helps:

Code: Select all

<OutputPath>$(ProgramFiles)\SoftPro\Select\</OutputPath>
In the meantime, I will set up a Windows 7 64-bit environment and try to run our ProFormApiSample.
I run all my projects from the SoftPro directory, except for web services. In those cases I use SyncToy to keep the files sychronized between the SP directories and the webservice directories.

I can get the ProFormApiSample to connect, although it throws an error on EnsureAuthenticated: ""Method not found: 'Boolean SoftPro.Administration.Common.IAuthorizationService.HasPermission(System.String, SoftPro.Security.Rights)'."

BTW, the ProFormApiSample sample included with the SDK is broken I had to take a bit of time fixing it before I could get it to run. The AssemblyInfo.cs files is in the wrong place, the project is missing a reference to SoftPro.ClientMode, all the assembly references are out of date, the server address is incorrect, and the client model constant is incorrect. It's still using the old code.
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Select Server Connection failure

Post by roteague »

The code works stand alone, but doesn't work when called from a Web Service. May be an issue with how IIS is configured.
Robert
Hadi Chemaly

Re: Select Server Connection failure

Post by Hadi Chemaly »

I never asked you how you have Select deployed in your environment. Are you running Select Services, Server and Client all on the same box?

Thanks for reporting the outdated code in the ProFormApiSample. We have already brought the code up to date for the upcoming release.

I'll ask around some other devs, and hopefully manage to repro your issue. Stay tuned.
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Select Server Connection failure

Post by roteague »

Hadi Chemaly wrote:I never asked you how you have Select deployed in your environment. Are you running Select Services, Server and Client all on the same box?

Thanks for reporting the outdated code in the ProFormApiSample. We have already brought the code up to date for the upcoming release.

I'll ask around some other devs, and hopefully manage to repro your issue. Stay tuned.
Thanks Hadi,

Yes, I'm running everything on the same system. Setting it up the webservice under Windows 7 was tricky, and it looks like I still don't have it correct. I"ll let you know if I come up with anything else, or a solution.
Robert
Post Reply