Install clean Windows Server 2022 Standard with Desktop Experience
Install NCS 1.9.5.0
Start NCS Server to create initial folders and settings then close
Copy over configuration files from previous server
Set NCS service to Automatic and attempt to start
Outcome:
The following message is displayed in the Event Log:
Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object. at Moonware.Security.MoonwarePrincipal..ctor(IIdentity identity, String authToken, Boolean forceServiceAccount)
This is a known issue with .NET Framework installation
Attempts to resolve:
Remove .NET Framework 4.8 and reinstall
1.1. Server Manager | Manage | Remove Roles and Features
1.2. Select .NET Framework 4.8 Features | .NET Framework 4.8
1.3. The following warning is displayed:
Install .NET Framework 3.5
2.1. Server Manager | Manage | Add Roles and Features
2.2. Select .NET Framework 3.5 Features | .NET Framework 3,5
2.3. After install, reboot server and attempt to start NCS
2.4. Same error message appears
Repair NCS install
3.1. Click on NCS download, run as administrator
3.2. Select Repair, allow to complete
3.3. Same error message appears
I will continue to review other potential solutions. Please can someone look into this.
Hi,
First, running NCS on server 2022 is not officially approved yet.
For that error this sometimes help:
-stop NCS.
-go to C:\Users%username%\AppData\Local\Moonware and delete all.
-go to C:\Users%username%\AppData\Roaming\Moonware and delete all.
-start NCS again.
If still that error, do a clean installation.
I also attempted to restart NCS on my previous server and got the same message. Will be attempting to reset my install on that device to get it working. It is running Windows Server 2016 Essentials.
This is legitimately odd, I can’t get the service to start on the old server. Here are the steps:
Stop NCS
Copy configuration files to network location to be used on new server
That’s all I did - and now when I access the server and start the service, I get the error message: Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object. at Moonware.Common.RuleManager.NotifyEvent(BaseEvent evnt) at Moonware.Core.MoonwareCore..ctor(NetConfig ) at Moonware.Server.WCF.MoonwareServerWCF..ctor(NetConfig ) at ..( ) at ..(String[] ) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
Nothing else has changes on this server at all - no changes to config files, no changes to system set up, no updates to system.
I am confirming that my previous server was running v1.9.5.0 and my new server is running v1.9.5.0. both 64-bit.
I reviewed all forums posts related to this and tried the following:
Uninstall Netcam Studio 1.9.5.0 64-bit
Remove all data from:
2.1. C:\ProgramData\Moonware\
2.2. C:\Program Files\Netcam Studio - 64-bit
2.3. C:\Users\[user]\AppData\Local\Moonware_Studios\
2.4. C:\Users\[user]\AppData\Roaming\Moonware\
Confirm installation of:
3.1. Feature : .NET Framework 4.8
3.2. Feature : Media Foundation
3.3. Program: Microsoft Visual C++ 2015-2019 Redistributable (x64)
Reinstall Netcam Studio 1.9.5.0 64-bit
Start the NCS service successfully
Access Netcam Studio Client to confirm connectivity
Stop the NCS service
Copy files Netcam.Security.xml, Rules.xml, & Server.config to C:\ProgramData\Moonware\Netcam Studio\Server\
Start the NCS service
Error Service cannot be started. System.NullReferenceException: Object reference not set to an instance of an object occured
Removed Netcam.security.xml and Rules.xml
Start NCS service
Service started correctly
When accessing Netcam Studio Client, had to use u:admin p:1234 rather than my previous settings
Confirmed all camera sources were correct
Checked settings and confirmed library target and other values were correct
Used Access Control to set admin password and add other users
Exited Netcam Studio Client
Restarted Netcam Studio Client and confirmed settings were saved
Closed Netcam Studio Client
Stopped NCS service (only way to make the next bit work)
Opened Netcam Studio X
Accessed the license key area
Entered license key and confirmed online activation
Closed Netcam Studio X
Started NCS service
Confirmed with both web view and Netcam Studio Client that all sources were visible, logging, and licensed
Problem fixed. The root cause seems to be an issue when copying over the security and/or rules configuration XML files. This may warrant testing and adjusting the directions if necessary.