Simple Order Validation

Discussions related to custom development with Select.
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Simple Order Validation

Post by czentman »

The sample project simple order validation compiles but when I try to run in debug mode I get the following error:

Visual Studio cannot start debugging because the debug target "c:\program files (x86)\common files\softpro\select server\instances\spsserver\spssvc.exe" is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly.

In Debug: in project properties:
Under Start Options: The CommandLine says
/debug /autostart /pkg:"SimpleOrderValidation.spspkg"

and under Start Action: Start External Program: C:\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\spssvc.exe
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Simple Order Validation

Post by BobRichards »

Server package development is done by stopping the Select mid-tier service (spssvc.exe) that is on the current machine. When you run the debug version of your package from Visual Studio will it will start the Select service and load your package into it. I assume that you do not have the Select mid-tier software installed on your development machine.

Make sure that you do not do package development on production machines because when you hit a breakpoint, the server will become unresponsive to clients. Your development machine should have its own Select server and non-production database.
Bob Richards, Senior Software Developer, SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Simple Order Validation

Post by czentman »

We set up another server to be able to run another dev for the purposes of developing a server package, but it's not local to the machine that I'm developing on. I put in the start project the executable from this server but it doesn't work. It has an error with allowExeDefinition='MachineOnly' in the section registered. I don't see an app.config for this project. What is the proper setting for this and is it doable to run the package in debug mode with the service on another server?

'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded '\\SPAPP01\c$\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\spssvc.exe'
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceProcess\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ServiceProcess.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded '\\SPAPP01\c$\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\SoftPro.ClientModel.dll'
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'spssvc.exe' (Managed (v4.0.30319)): Loaded '\\SPAPP01\c$\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\SoftPro.ServerModel.dll'
spssvc.exe Error: 0 : Error: Configuration system failed to initialize
Stack Trace:
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
at System.Diagnostics.TraceInternal.InitializeSettings()
at System.Diagnostics.TraceInternal.get_Listeners()
at System.Diagnostics.Trace.get_Listeners()
at SoftPro.Select.WindowsServiceRunner..ctor(Boolean autoStart, IWindowsService service)
at SoftPro.Select.Program.Main(String[] args)
***********************************************************************************
Error: It is an error to use a section registered as allowExeDefinition='MachineOnly' beyond machine.config. (\\SPAPP01\c$\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\spssvc.exe.Config line 40)
Stack Trace:
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

The program '[9352] spssvc.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).


When I look at this file (spssvc.exe.Config) I don't see anything with allowExeDefinition='MachineOnly'. Below is the contents of the file (\\SPAPP01\c$\Program Files (x86)\Common Files\SoftPro\Select Server\Instances\spssvr\spssvc.exe.Config)

<?xml version="1.0" encoding="utf-8"?>
<configuration>

<configSections>
<!-- SoftPro Select Runtime Configuration -->
<section name="softpro.select.server" type="SoftPro.Select.Configuration.ServerSection, spssvc"/>
</configSections>

<runtime>
<gcServer enabled="true"/>
</runtime>

<!-- SoftPro Select Server Configuration -->
<softpro.select.server>
<instance name=""/>
<repository value="select-mt"/>
<reporting maxConcurrentPerCore="5" loadTimeout="600000" runTimeout="1200000"/>
<packages>
<add type="SoftPro.Select.Server.Package, SoftPro.Select.Server"/>
<add type="SoftPro.Select.Persistence.Package, SoftPro.Select.Persistence"/>
<add type="SoftPro.OrderTracking.Server.Package, SoftPro.OrderTracking.Server"/>
<add type="SoftPro.OrderTracking.Persistence.Package, SoftPro.OrderTracking.Persistence"/>
<add type="SoftPro.Accounting.Server.Package, SoftPro.Accounting.Server"/>
<add type="SoftPro.Accounting.Persistence.Package, SoftPro.Accounting.Persistence"/>
<add type="SoftPro.ProceedsTracking.Server.Package, SoftPro.ProceedsTracking.Server"/>
<add type="SoftPro.ProceedsTracking.Persistence.Package, SoftPro.ProceedsTracking.Persistence"/>
<add type="SoftPro.ProceedsTracking.Integration.Package, SoftPro.ProceedsTracking.Integration"/>
<add type="SoftPro.Documents.Server.Package, SoftPro.Documents.Server"/>
<add type="SoftPro.Documents.Persistence.Package, SoftPro.Documents.Persistence"/>
<add type="SoftPro.Register.Server.Package, SoftPro.Register.Server"/>
<add type="SoftPro.Register.Persistence.Package, SoftPro.Register.Persistence"/>
<add type="SoftPro.Reporting.Server.Package, SoftPro.Reporting.Server"/>
<add type="SoftPro.Imaging.Server.Package, SoftPro.Imaging.Server"/>
<add type="SoftPro.Imaging.Persistence.Package, SoftPro.Imaging.Persistence"/>
</packages>

</softpro.select.server>

<system.transactions>
<machineSettings maxTimeout="02:00:00"/>
</system.transactions>

</configuration>
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Simple Order Validation

Post by BobRichards »

I don't entirely follow your initial setup. Are you saying that you cannot put an instance of Select Server on each developer's system who is writing a custom server package? Your development should be as close as possible to your deployment environment.
Bob Richards, Senior Software Developer, SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Simple Order Validation

Post by czentman »

How do I debug this sample project while using a remote server as the select mid-tier service?
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Simple Order Validation

Post by czentman »

Can one help with this? I just want to run this project from my dev machine using a mid-tier with another remote dev machine. Please help.
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Simple Order Validation

Post by John Morris »

You cannot debug a server-side package from a remote machine. You need to run the server on the same machine you're attempting to debug from.
John Morris
Sr. Software Architect
SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Simple Order Validation

Post by czentman »

How can I resolve this?

{"Failed to listen on prefix 'http://+:8084/ClientSetup/' because it conflicts with an existing registration on the machine."}
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Simple Order Validation

Post by czentman »

I'm also not sure of the order. Should I first start to debug the app, then open select and open and save an order?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Simple Order Validation

Post by John Morris »

That error message means you have another app running on the same port. If you are trying to run the server (spssvc.exe) in debug mode, then you need to remember to stop the one that is running from the original install. Go to local services on your machine and stop the SoftPro Select Server instance.

You need to start the server (spssvc.exe) first, before attempting to launch the client (select.exe). The client has a flag (/delay) that will inject a delay to the startup time. Ex: select.exe /delay:10000 delays for 10 seconds before starting the client.
John Morris
Sr. Software Architect
SoftPro
Post Reply