Call to GetService<OrderTracking> Failing
Moderator: Phil Barton
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Call to GetService<OrderTracking> Failing
What files are you copying to your app's bin folder? It looks like you are missing something. The easiest fix would be to copy the entire select client folder contents into your bin folder. It that fixes it, then you are missing a dependency.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro
Re: Call to GetService<OrderTracking> Failing
John, here is more complete error information. I think I can see the problem:
I get a 404 error when I try to connect to this site with IE. I'll follow up.
Code: Select all
Connecting to SoftPro Select ServerConnect failed: SoftProOrderActivity::LoadOrder - Looking up Order #: 1012008020050001 failed. Error: There was no endpoint listening at http://softpro2/Integration/v1/Security.svc/select that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.. Stack Trace:
Server stack trace:
at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout)
at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ClientBase`1.Open()
at SoftPro.Select.Client.SelectServerObject.CreateProxy[TProxy,TChannel](Guid service, Guid endpoint)
at SoftPro.Select.Client.SelectServer.Authenticate()
at SoftPro.Select.Client.SelectServer.EnsureAuthenticated()
at SoftPro.Select.Client.SelectServer.GetService[T]()
at TG.SoftPro.OrderLookup.SoftProOrder.LoadOrder(String orderNumber) in C:\Projects\SoftPro\Code\TG.SoftPro.OrderPrintProcessor\TG.SoftPro.OrderLookup\SoftProOrder.cs:line 75
Done
Robert
Re: Call to GetService<OrderTracking> Failing
Ignore the last post. I didn't have the URL correct.
Robert
Re: Call to GetService<OrderTracking> Failing
Followup:
I created a small Winforms client, that connects this way:
If I run the client app on the Select Server, in my WCF service bin directory, it executes with no problem, returning the order. If I run the client app from the Select Client machine I get a similar error to the one I originally reported:
The second version does return a little more information about the error.
Also, I did copy most of the files from the client install to the server (all except the exe's and .config files).
I created a small Winforms client, that connects this way:
Code: Select all
NetworkCredential credential = new NetworkCredential(_userName, _userPasword, Select.Client.Constants.SelectDomain);
Select.Client.SelectServer server = new Select.Client.SelectServer(null, new Uri(_selectServer), credential);
_ot = server.GetService<OrderTracking>();
if (_ot != null)
{
// Create the specification for the existing order.
OrderQuerySpec spec = new OrderQuerySpec()
{
BaseOrderNumber = orderNumber,
Prefix = @"",
Suffix = @""
};
// Open the order
_order = _ot.GetOrder(spec, true);
Code: Select all
Connecting to SoftPro Select ServerConnect failed: OrderLookup::LoadOrder - Looking up Order #: 09001006 failed. Error: Method not found: 'Boolean SoftPro.Administration.Common.IAuthorizationService.HasPermission(System.String, SoftPro.Security.Rights)'.. Stack Trace: at SoftPro.Select.Client.SelectServer.InitLegacySupport()
at SoftPro.Select.Client.SelectServer.Authenticate()
at SoftPro.Select.Client.SelectServer.EnsureAuthenticated()
at SoftPro.Select.Client.SelectServer.GetService[T]()
at TG.SoftPro.OrderLookup.SoftProOrder.LoadOrder(String orderNumber)
Done
Also, I did copy most of the files from the client install to the server (all except the exe's and .config files).
Robert
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Call to GetService<OrderTracking> Failing
Make sure your application is setup to always run as a 32-bit app. By default, .NET apps will compile with the AnyCPU setting. That will cause the executable to run as 64-bit on a 64-bit OS and 32-bit on a 32-bit OS. At this point in time, our client APIs (the one you are using) are not 64-bit compatible and must be run in a 32 bit process (or a WOW process on a 64-bit OS).
This setting can be found in your exe project's settings.
This setting can be found in your exe project's settings.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro
Re: Call to GetService<OrderTracking> Failing
Good point John. I've reset all our projects to x86. Our application servers are 32-bit, but it never hurts to be prepared.
Robert
Re: Call to GetService<OrderTracking> Failing
I've restructured the code a bit, but am still running into the same errors. Any insight to what could be causing this to fail? I'm running into a roadblock here.
Robert
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Call to GetService<OrderTracking> Failing
At this point, you may need to contact support to get direct help with the issue. Anytime that we have seen this before, it has always been resolved with the 32/64 bit changes. If that's not fixing it, then we will probably need to investigate using some sort of remote session.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro
Re: Call to GetService<OrderTracking> Failing
Thanks John. I'm going to try setting it up on another server first. Since this is a 32 bit server, the problem must be elsewhere.John Morris wrote:At this point, you may need to contact support to get direct help with the issue. Anytime that we have seen this before, it has always been resolved with the 32/64 bit changes. If that's not fixing it, then we will probably need to investigate using some sort of remote session.
Robert
Re: Call to GetService<OrderTracking> Failing
John,
We finally got this working. We set the App Pool and Website to use the same domain account (SQL Server account). Then we set SoftPro Server, via the config file, to use a SQL Login. I had to give the SQL Login dbo_owner access, but I may go back and see if it will work with lesser rights. Not an optimum solution, but it will work while we try to refine it further.
Thanks for all your help,
We finally got this working. We set the App Pool and Website to use the same domain account (SQL Server account). Then we set SoftPro Server, via the config file, to use a SQL Login. I had to give the SQL Login dbo_owner access, but I may go back and see if it will work with lesser rights. Not an optimum solution, but it will work while we try to refine it further.
Thanks for all your help,
Robert