This project is read-only.

I get a error when trying to access licensing service of scutex

Jun 1, 2012 at 3:55 AM

I have copied the error below:

 

ContractDescription 'ILicensingService' has zero operations; a contract must have at least one operation.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: ContractDescription 'ILicensingService' has zero operations; a contract must have at least one operation.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

[InvalidOperationException: ContractDescription 'ILicensingService' has zero operations; a contract must have at least one operation.]
   System.ServiceModel.Description.ContractDescription.EnsureInvariants() +12284015
   System.ServiceModel.Description.ServiceEndpoint.EnsureInvariants() +36
   System.ServiceModel.Description.ServiceDescription.EnsureInvariants() +40
   System.ServiceModel.Description.DispatcherBuilder.ValidateDescription(ServiceDescription description, ServiceHostBase serviceHost) +22
   System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +109
   System.ServiceModel.ServiceHostBase.InitializeRuntime() +60
   System.ServiceModel.ServiceHostBase.OnBeginOpen() +27
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +50
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +318
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +206
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +651

[ServiceActivationException: The service '/managementservice/LicensingService.svc' cannot be activated due to an exception during compilation.  The exception message is: ContractDescription 'ILicensingService' has zero operations; a contract must have at least one operation..]
   System.Runtime.AsyncResult.End(IAsyncResult result) +688590
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
   System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +310694
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +94



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

I copied the text from the errorpage to show you what the error says and I want to know how to fix it, could you please help me fix this error?

Jun 11, 2012 at 3:03 PM

What version of Scutex was this?

Jun 11, 2012 at 11:58 PM
Edited Jun 12, 2012 at 12:53 AM

It was version 0.4.1204.408 and it is in version 0.2.1101.312

also I get all errors when trying to test only my webservices in scutex 0.4.1204.408 even though the url is accessible and the files are there and the db is setup but it fails anyway and this is hosted on my web hosting providers server.

also I think the file system check fails because I do not think you can create a file on my web hosting providers server like FileSysTest.txt on my web hosting providers server.

Jul 6, 2012 at 4:04 AM

I'm working on some final testing of the services now and will try and reproduce the issue. I've posted a 2nd preview release of the new 0.4 client with working large keys.

Jul 6, 2012 at 4:31 AM

As for the FileSysTest.txt it doesn't need to be created by the service and should have been included in the zip package. I've tracked it down to the build server not including the FileSysTest.txt and AllowDatabaseTest.emp being copied over to the proper directory for packaging. This is being corrected now and I'll update the installer.

Jul 6, 2012 at 6:14 AM

LicensingService.svc (LicensingService.cs and ILicensingService.cs) are not used and are just stubs for some new planned development. They won't work (Causing the error you saw above) but are never called in any Scutex code paths, so it will never affect the normal operation of the system. I did find an issue that prevents final testing to work and am testing a final fix, should be available as the primary download within the hour.

Jul 6, 2012 at 11:00 PM
Edited Jul 6, 2012 at 11:04 PM

I now get the db checks to work only on my computer(not the web hosting provider) because I am testing the services and the database on my computer to see if there is something wrong with the configuration that I have on the web hosting provider. And so The Test Only Button That I am testing the services on my computer only are all returning success, But When I click the Test And Initialize Button for the services on my computer Scutex Crashes, and then I enabled "includeExceptionDetailInFaults" and then when I debugged Scutex with the "includeExceptionDetailInFaults" option set to true the inner exception says: "Padding is invalid and cannot be removed."

Could you please help me fix the error below(This is the detail below):

{An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
   at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at WaveTech.Scutex.Providers.SymmetricEncryptionProvider.SymmetricEncryptionProvider.(String cipherText, EncryptionInfo info)
   at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.ControlService.ValidateManagementToken(String token)
   at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.Management.StatusService.GetServiceStatus(String token)
   at SyncInvokeGetServiceStatus(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Jul 7, 2012 at 6:35 AM

The padding is invalid error usually means there is an issue creating the encryption/decryption keys on the web service. Ensure that the Master table in the Services database is populated and ensure that there are 3 .config files ({GUID}-IN.config, {GUID}-OUT.config and {GUID}-TK.config) on both your management and client services folders and that the account that the worker process is using in IIS has access to read those config files.

What happens is that the encryption and decryption keys are split in half and half is stored in the guid config files and the other half in the columns of the Master table in the Service database. If they aren't correct or can't be combined then you will get that Padding error, which is happening when it trys to decrypt the management token.

Jul 7, 2012 at 3:44 PM
Edited Jul 7, 2012 at 3:46 PM

I found out that the table dbo.Master is not populated.

I used this sql script from off the internet below

And it said "empty" so how do I populate the database? Also The Config Files Exist both on the management and client service.

 

if exists(select * from dbo.Master)
  select 'not empty'
else
  select 'empty'
Jul 8, 2012 at 5:42 PM

The Master table should be populated during the 'Initialize' step when you test and initialize the service. If the service got erroneously set to Initialized then you need to manually reset it, because it won't try and initialize it again. If you look in your Sctuex application database, the one used by the manager application, (Either on your SQL server or SQL Express) there is a Services table with two columns (Initialized and Tested) set those to false/0 and run the Test and Initialize process against the service again. Make sure that the FileSysTest.txt and AllowDatabaseTest.emp files exist in both services (Client and Management) and all the tables are empty so that all the tests will pass.

Jul 10, 2012 at 3:23 AM
Edited Jul 10, 2012 at 3:24 AM

I fixed it but Scutex Crashed when I was trying to upload the License Sets to the server. And when I debugged it, it said "Object reference not set to an instance of an object."

And It said it was coming from the Upload Products Window and it said it was coming from the Upload License Sets Button.

Could you please tell me how to fix this?

Also Since my hosting provider that I am hosting the scutex services on doesn't provide ssl support, Could I host the client and managment service on mono on linux on a vps where I have ssl support?

Jul 12, 2012 at 4:34 PM

Let me test the upload product facility to see if there is an issue. I'll start testing, but can you answer a couple questions so I an target it better?

  1. How many products are you uploading?
  2. What type if license key are your using? (Small/Large)
  3. How many license sets (Editions) are you uploading?
  4. What options are configured on those license sets (Editions) [i.e. Single User, Multi User, Enterprise, etc]?

Thanks!

    Shawn

Jul 12, 2012 at 7:29 PM
Edited Jul 12, 2012 at 7:38 PM

1.  I am only uploading one product

2. Large

3. 1

4. Only These: (Single User, Multi User, Hardware Lock, Unlimited, Enterprise)

Jul 13, 2012 at 7:20 PM

Thanks, I've identified the issue and have a fix checked in. I'm testing a UI fix right now as well and hope to have a new release up today.

 

Thanks!
     Shawn 

Jul 13, 2012 at 7:49 PM

Uploaded the new preview release (3) which fixes this issue.

Thanks,
    Shawn 

Jul 14, 2012 at 3:35 AM
Edited Jul 14, 2012 at 8:11 PM

Now When I try to access the Products And Services Tab it throws this error:

StructureMap Exception Code:  202No Default Instance defined for PluginFamily WaveTech.Scutex.Model.Interfaces.Services.IServicesService, WaveTech.Scutex.Model, Version=0.4.1207.1311, Culture=neutral, PublicKeyToken=d9e244627cc0a396

And When I try to access my saved project from Open Project Window on Home Nothing Shows up even though their is a product saved.

Also It Says Access to the path of DemoHost.exe is denied when I try to test the demo and also The New Project Button it said: The invocation of the constructor on type 'WaveTech.Scutex.Manager.Forms.BasicSettings' that matches the specified binding constraints threw an exception And the InnerException says: "StructureMap Exception Code:  202\nNo Default Instance defined for PluginFamily WaveTech.Scutex.Model.Interfaces.Providers.IAsymmetricEncryptionProvider, WaveTech.Scutex.Model, Version=0.4.1207.1311, Culture=neutral, PublicKeyToken=d9e244627cc0a396"

And the StackTrace Says:

 "at StructureMap.BuildSession.<.ctor>b__0(Type t)   at StructureMap.Util.Cache`2.get_Item(KEY key)   at StructureMap.BuildSession.CreateInstance(Type pluginType)   at StructureMap.Container.GetInstance[T]()   at StructureMap.ObjectFactory.GetInstance[PLUGINTYPE]()   at WaveTech.Scutex.Framework.ObjectLocator.GetInstance[T]()   at WaveTech.Scutex.Manager.Classes.UIContext.InitializeForNewLicense()   at WaveTech.Scutex.Manager.Forms.BasicSettings..ctor()"

I set the error messages to bold to show you what they said and to help you find them easier.

Jul 16, 2012 at 3:07 PM

Looks like something happened on the build server. Let me generate another build and test it.

Jul 16, 2012 at 3:53 PM

I cleaned out and compiled from the build server and did some quick testing and it seems that it's working better now. I've updated the default release binary, so try redownloading it and trying again. Sorry about that, sometimes the build can get jacked up if the server is busy.

Shawn

Jul 24, 2012 at 8:25 PM

I now get this error message when I try to upload products

it says:

Object reference not set to an instance of an object.

And The Stack Trace Says:

   at WaveTech.Scutex.Manager.Windows.UploadProductsWindow.<>c__DisplayClass5.<DoesLicenseSetExistOnService>b__0(KeyValuePair`2 l)   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)   at WaveTech.Scutex.Manager.Windows.UploadProductsWindow.DoesLicenseSetExistOnService()   at WaveTech.Scutex.Manager.Windows.UploadProductsWindow.btnUploadLicenseSets_Click(Object sender, RoutedEventArgs e)   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)   at System.Windows.Controls.Primitives.ButtonBase.OnClick()   at System.Windows.Controls.Button.OnClick()   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)   at System.Windows.Input.InputManager.ProcessStagingArea()   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)   at System.Windows.Application.RunDispatcher(Object ignore)   at System.Windows.Application.RunInternal(Window window)   at System.Windows.Application.Run(Window window)   at Scutex.ManagerWpf.App.Main()

Could you please fix the error above? I put the error messages in bold so you could see them better.

Aug 8, 2012 at 4:58 PM

Thanks for the information and sorry for the delay. I fixed the bug in the latest build (4th Preview release). Let me know if you have any other issues.

Mar 3, 2013 at 9:20 PM
Edited Mar 4, 2013 at 3:32 AM
I have a new problem now, when I try to initialize the service, scutex crashes and when I debug it the innerexception detail message says: "Sequence contains no elements" So could you please help me?

Edit: I fixed the "Sequence contains no elements" Error
But Now I get a new error, it says: Object reference not set to an instance of an object.

Here is the stack trace:

at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.KeyPairService.GetOutboundHalfFromFile() in d:\temp\c1ooaawj.s5a\input\Services\ServicesLibrary\Services\KeyPairService.cs:line 88
at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.ControlService.GetStandardEncryptionInfo() in d:\temp\c1ooaawj.s5a\input\Services\ServicesLibrary\Services\ControlService.cs:line 39
at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.ControlService.ValidateManagementToken(String token) in d:\temp\c1ooaawj.s5a\input\Services\ServicesLibrary\Services\ControlService.cs:line 67
at WaveTech.Scutex.WcfServices.ServicesLibrary.Services.Management.StatusService.GetServiceStatus(String token) in d:\temp\c1ooaawj.s5a\input\Services\ServicesLibrary\Services\Management\StatusService.cs:line 46
at SyncInvokeGetServiceStatus(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)


the stack trace came from appharbor where I have the scutex service hosted.
I made the stack trace bold so you could find it better.