Server Error in '/KMS' Application.

Cannot insert the value NULL into column 'CompanyId', table 'KMSWrexham.dbo.Users'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'UserId', table 'KMSWrexham.dbo.UserCampaignLink'; column does not allow nulls. INSERT fails.
Error 50004, severity 16, state 1 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
The statement has been terminated.
The statement has been terminated.

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.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'CompanyId', table 'KMSWrexham.dbo.Users'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'UserId', table 'KMSWrexham.dbo.UserCampaignLink'; column does not allow nulls. INSERT fails.
Error 50004, severity 16, state 1 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
The statement has been terminated.
The statement has been terminated.

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:


[SqlException (0x80131904): Cannot insert the value NULL into column 'CompanyId', table 'KMSWrexham.dbo.Users'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'UserId', table 'KMSWrexham.dbo.UserCampaignLink'; column does not allow nulls. INSERT fails.
Error 50004, severity 16, state 1 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
The statement has been terminated.
The statement has been terminated.]
   Bmg.Kms.Elab.Campaign.AddResponses() +13483
   Bmg.Kms.Elab.Campaign..ctor(Int32 campaignId, CampaignType campaignType, PageMenu menu, NameValueCollection form) +1008
   Bmg.Kms.Elab.ElabPage.Page_Load(Object sender, EventArgs e) +5222
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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