Navigation

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Chavi
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 22
    • Best 0
    • Groups 0

    Posts made by Chavi

    • RE: Problem with Toec Client export

      In my case, I haven't used any extra mysql dump or restore parameters, simply the shortest possible commands:

      mysqldump -u root -p theopenem > theopenem_dump.sql
      mysql -u root -p theopenem < theopenem_dump.sql
      

      The dump created this way is UTF8 by default. And it worked without issues.

      posted in Support
      C
      Chavi
    • RE: Problem with Toec Client export

      This is what I'm doing at step 9.

      posted in Support
      C
      Chavi
    • RE: Problem with Toec Client export

      @cycy Well, technically it should work, but to be fair I haven't tested it. As part of this procedure, the certificates are re-generated from the old installation, I assume you are going to keep the same server IP address (unlike what I do in step 2) and unless there's something else bound within the Toec client from the old machine other than that, the clients should be able to connect as the IP address is the same. If the IP address is different, there's no way for the old client installations to connect. @theopenem_admin may have more to say here.

      posted in Support
      C
      Chavi
    • Inventory Collection Script Modules

      Hi. I have two powershell script modules, both having "Add To Inventory Collection" enabled. I have them assigned to my "Collect Inventory" policy. When I review a given computer "Effective Policy", I can see both scripts being part of the "Collect Inventory" policy.
      However when I issue "Collect Inventory" request, the scripts don't seem to run (I don't get any updates in "Custom Inventory"). When I use "Instant Module Runner", they run fine. Am I missing something? Can those modules be assigned to "Collect Inventory" policy or do I need separate policy for them?

      Update. When adding a new computer, after provisioning, the modules do run as part of the "Collect Inventory" policy. So it seems the issue I have only occurs when I manually request inventory collection.

      posted in Support
      C
      Chavi
    • Highest UAC level reported as 'Unknown' UAC Status

      The highest UAC level:
      UAC_max.png
      gets reported as 'Unknown' in System Info - Security - UAC Status

      Toems 1.5.5.0, Windows 10 client. Best regards.

      posted in Support
      C
      Chavi
    • Custom Attributes cause computer records to duplicate in the main Computers list

      Hello. At some point I started using custom attributes (very useful btw) and noticed computers started duplicating in the main Computers screen list. Each attribute saved per computer is causing its record to appear once, so if you have two attributes filled in, there would be two identical records for that PC. If you have three attributes, it will appear three times. Sounds like one-to-many table join related 🙂 Count totals on the right above the list are like "14 Result(s) / 7 Computer(s)"
      This is only on the main screen. The "Search all screen" does not have this issue, neither the Group -> Current Group Members list for a group I have created with "add everything" dynamic criteria.
      Duplication however is also present in the response of the "Computer/Get" API call. Not a big deal as I'm applying array unique method.
      Best regards!

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      @theopenem_admin - Don't chase this further - I believe this is a remnant from my failed attempt at upgrading MariaDB - https://forum.theopenem.com/topic/466/unable-to-to-login-system-invalidcastexception-object-cannot-be-cast-from-dbnull-to-other-types .
      Back then I had to downgrade and because of all the database enconding and collation changes I had to manually edit my MariaDB 10.11 backup so I can have it restored under 10.5. I belive this is now causing my database schema, although working to be out of sync with the model/schema in your coude - hense 'The model backing the context has changed since the database was created.'. What I did was go back to a pre-MariaDB upgrade backup, had that restored, it properly updated to 1.5.5. and now I can login fine. Thanks for your help anyway!

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      Thank you, that ran without issues, however unfortunately the problem still persists:

      2023-07-03 13:26:20,688 [14] ERROR Toems_ApiCalls.ApiRequest Response Data Was Null For Resource: Version/GetAllVersionInfo
      2023-07-03 13:26:20,704 [14] ERROR Toems_ApiCalls.ApiRequest Response Data Was Null For Resource: Setting/CheckMfaEnabled/
      2023-07-03 13:26:20,766 [14] ERROR Toems_ApiCalls.TokenApi Error Obtaining Token: System.Xml.XmlException: '100' is an unexpected token. The expected token is '"' or '''. Line 28, position 65.
         at System.Xml.XmlTextReaderImpl.Throw(Exception e)
         at System.Xml.XmlTextReaderImpl.ParseAttributes()
         at System.Xml.XmlTextReaderImpl.ParseElement()
         at System.Xml.XmlTextReaderImpl.ParseElementContent()
         at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
         at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
         at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
         at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
         at RestSharp.Deserializers.XmlDeserializer.Deserialize[T](IRestResponse response)
         at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
      2023-07-03 13:26:20,766 [14] ERROR Toems_ApiCalls.TokenApi Error Obtaining Token: <!DOCTYPE html>
      <html>
          <head>
              <title>The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).</title>
              <meta name="viewport" content="width=device-width" />
              <style>
               body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
               p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
               b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
               H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
               H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
               pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
               .marker {font-weight: bold; color: black;text-decoration: none;}
               .version {color: gray;}
               .error {margin-bottom: 10px;}
               .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }
               @media screen and (max-width: 639px) {
                pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
               }
               @media screen and (max-width: 479px) {
                pre { width: 280px; }
               }
              </style>
          </head>
      
          <body bgcolor="white">
      
                  <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
      
                  <h2> <i>The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).</i> </h2></span>
      
                  <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
      
                  <b> Description: </b>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.
      
                  <br><br>
      
                  <b> Exception Details: </b>System.InvalidOperationException: The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).<br><br>
      
                  <b>Source Error:</b> <br><br>
      
                  <table width=100% bgcolor="#ffffcc">
                     <tr>
                        <td>
                            <code>
      
      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.                      </code>
      
                        </td>
                     </tr>
                  </table>
      
                  <br>
      
                  <b>Stack Trace:</b> <br><br>
      
                  <table width=100% bgcolor="#ffffcc">
                     <tr>
                        <td>
                            <code><pre>
      
      [InvalidOperationException: The model backing the &#39;ToemsDbContext&#39; context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).]
         System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) +286
         System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +75
         System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +502
         System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +171
         System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +272
         System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +20
         System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +69
         System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
         System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +66
         System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +64
         Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy) +177
         Toems_Service.Entity.ServiceSetting.GetSetting(String settingName) +562
         Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName) +91
         Toems_ApplicationApi.Startup.Configuration(IAppBuilder app) +289
      
      [TargetInvocationException: Exception has been thrown by the target of an invocation.]
         System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
         System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +216
         System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +182
         Owin.Loader.&lt;&gt;c__DisplayClass19_1.&lt;MakeDelegate&gt;b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:429
         Owin.Loader.&lt;&gt;c__DisplayClass9_0.&lt;LoadImplementation&gt;b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:128
         Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinAppContext.cs:82
         Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinBuilder.cs:64
         Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:46
         System.Threading.LazyInitializer.EnsureInitializedCore(T&amp; target, Boolean&amp; initialized, Object&amp; syncLock, Func`1 valueFactory) +139
         Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:24
         System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +587
         System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
         System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255
         System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347
      
      [HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
         System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
         System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
         System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +732
      </pre>                      </code>
      
                        </td>
                     </tr>
                  </table>
      
                  <br>
      
                  <hr width=100% size=1 color=silver>
      
                  <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9037.0
      
                  </font>
      
          </body>
      </html>
      <!-- 
      [InvalidOperationException]: The model backing the &#39;ToemsDbContext&#39; context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
         at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
         at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
         at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
         at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
         at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
         at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
         at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
         at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
         at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
         at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
         at Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy)
         at Toems_Service.Entity.ServiceSetting.GetSetting(String settingName)
         at Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName)
         at Toems_ApplicationApi.Startup.Configuration(IAppBuilder app)
      [TargetInvocationException]: Exception has been thrown by the target of an invocation.
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
         at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at Owin.Loader.DefaultLoader.<>c__DisplayClass19_1.<MakeDelegate>b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:line 429
         at Owin.Loader.DefaultLoader.<>c__DisplayClass9_0.<LoadImplementation>b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:line 128
         at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinAppContext.cs:line 82
         at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinBuilder.cs:line 64
         at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:line 46
         at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
         at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:line 24
         at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
         at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
         at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
         at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
      [HttpException]: Exception has been thrown by the target of an invocation.
         at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
         at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
         at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
      -->
      
      
      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      d8d99be1-faf3-4123-a2d1-7dc0138bafdd-image.png

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      Correct. Theopenem.Update-1.5.5.msi.
      I believe however that I have seen the message "Could Not Determine Database Version" appear even on 1.5.2, but because everything was working, I haven't chased it.

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      Getting this:
      f13f682c-a4cc-4c81-bdb7-16a15a84c7bd-image.png

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      Restarted IIS. When I browse to the UI, I get a login page with message below "Could Not Determine Database Version" and the log shows:

      2023-06-29 16:09:33,756 [7] ERROR Toems_ApiCalls.ApiRequest Response Data Was Null For Resource: Version/GetAllVersionInfo
      2023-06-29 16:09:33,774 [7] ERROR Toems_ApiCalls.ApiRequest Response Data Was Null For Resource: Setting/CheckMfaEnabled/
      

      Could it be related to that?

      posted in Support
      C
      Chavi
    • RE: Unable to login after update 1.5.2 -> 1.5.5

      @theopenem_admin You mean the installer itself? No. My understanding from the instruction was this would happen after first login via GUI, yet I never managed to login.

      posted in Support
      C
      Chavi
    • Unable to login after update 1.5.2 -> 1.5.5

      I have just updated from 1.5.2 to 1.5.5 and after the update installer completed (without visible issues), and I need to login for database update, I'm getting "Unknown Error Obtaining Token" on the login screen and the following in the FrontEnd.log:

      2023-06-29 15:24:15,099 [16] ERROR Toems_ApiCalls.TokenApi Error Obtaining Token: System.Xml.XmlException: '100' is an unexpected token. The expected token is '"' or '''. Line 28, position 65.
         at System.Xml.XmlTextReaderImpl.Throw(Exception e)
         at System.Xml.XmlTextReaderImpl.ParseAttributes()
         at System.Xml.XmlTextReaderImpl.ParseElement()
         at System.Xml.XmlTextReaderImpl.ParseElementContent()
         at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
         at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
         at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
         at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
         at RestSharp.Deserializers.XmlDeserializer.Deserialize[T](IRestResponse response)
         at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
      2023-06-29 15:24:15,101 [16] ERROR Toems_ApiCalls.TokenApi Error Obtaining Token: <!DOCTYPE html>
      <html>
          <head>
              <title>The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).</title>
              <meta name="viewport" content="width=device-width" />
              <style>
               body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
               p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
               b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
               H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
               H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
               pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
               .marker {font-weight: bold; color: black;text-decoration: none;}
               .version {color: gray;}
               .error {margin-bottom: 10px;}
               .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }
               @media screen and (max-width: 639px) {
                pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
               }
               @media screen and (max-width: 479px) {
                pre { width: 280px; }
               }
              </style>
          </head>
      
          <body bgcolor="white">
      
                  <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
      
                  <h2> <i>The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).</i> </h2></span>
      
                  <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
      
                  <b> Description: </b>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.
      
                  <br><br>
      
                  <b> Exception Details: </b>System.InvalidOperationException: The model backing the 'ToemsDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).<br><br>
      
                  <b>Source Error:</b> <br><br>
      
                  <table width=100% bgcolor="#ffffcc">
                     <tr>
                        <td>
                            <code>
      
      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.                      </code>
      
                        </td>
                     </tr>
                  </table>
      
                  <br>
      
                  <b>Stack Trace:</b> <br><br>
      
                  <table width=100% bgcolor="#ffffcc">
                     <tr>
                        <td>
                            <code><pre>
      
      [InvalidOperationException: The model backing the &#39;ToemsDbContext&#39; context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).]
         System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) +286
         System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +75
         System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +502
         System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +171
         System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +272
         System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +20
         System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +69
         System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
         System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +66
         System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +64
         Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy) +177
         Toems_Service.Entity.ServiceSetting.GetSetting(String settingName) +562
         Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName) +91
         Toems_ApplicationApi.Startup.Configuration(IAppBuilder app) +289
      
      [TargetInvocationException: Exception has been thrown by the target of an invocation.]
         System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
         System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +216
         System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +182
         Owin.Loader.&lt;&gt;c__DisplayClass19_1.&lt;MakeDelegate&gt;b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:429
         Owin.Loader.&lt;&gt;c__DisplayClass9_0.&lt;LoadImplementation&gt;b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:128
         Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinAppContext.cs:82
         Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinBuilder.cs:64
         Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:46
         System.Threading.LazyInitializer.EnsureInitializedCore(T&amp; target, Boolean&amp; initialized, Object&amp; syncLock, Func`1 valueFactory) +139
         Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:24
         System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +587
         System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
         System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +255
         System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347
      
      [HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
         System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
         System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
         System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +732
      </pre>                      </code>
      
                        </td>
                     </tr>
                  </table>
      
                  <br>
      
                  <hr width=100% size=1 color=silver>
      
                  <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9037.0
      
                  </font>
      
          </body>
      </html>
      <!-- 
      [InvalidOperationException]: The model backing the &#39;ToemsDbContext&#39; context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
         at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
         at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
         at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
         at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
         at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
         at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
         at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
         at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
         at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
         at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
         at Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy)
         at Toems_Service.Entity.ServiceSetting.GetSetting(String settingName)
         at Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName)
         at Toems_ApplicationApi.Startup.Configuration(IAppBuilder app)
      [TargetInvocationException]: Exception has been thrown by the target of an invocation.
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
         at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at Owin.Loader.DefaultLoader.<>c__DisplayClass19_1.<MakeDelegate>b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:line 429
         at Owin.Loader.DefaultLoader.<>c__DisplayClass9_0.<LoadImplementation>b__0(IAppBuilder builder) in /_/src/Owin.Loader/DefaultLoader.cs:line 128
         at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinAppContext.cs:line 82
         at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinBuilder.cs:line 64
         at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:line 46
         at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
         at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) in /_/src/Microsoft.Owin.Host.SystemWeb/OwinHttpModule.cs:line 24
         at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
         at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
         at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
         at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
      [HttpException]: Exception has been thrown by the target of an invocation.
         at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
         at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
         at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
      -->
      
      posted in Support
      C
      Chavi
    • RE: Toec-1.5.0-x64 installation failed

      @mahesh if you're going through the Server Installation steps for a second time, see if you have re-enabled AllowCAGen and AllowProvisionKeygen in your Toems-API Web.config. There is a step in the installation when you have them disabled (set to false).

      posted in Support
      C
      Chavi
    • RE: Toec-1.5.0-x64 installation failed

      I had similar issue in the past - if the "5K" on the screeshot is the size of your toec client installer, it means it was not built properly server-side. It should be over 5 Megs in size.
      Check your Admin Settings -> Toec screen and see 'Client MSI Arguments'. Does it have value for all the arguments (SERVER_KEY, CA_THUMBPRINT, COM_SERVERS)? Mine was having empty SERVER_KEY due to having wrong dbencryption key in web.config.
      Application log was saying "ERROR Toems_Service.EncryptionServices Could Not Decrypt Password. Ensure Your Encryption Key is Correct."
      Once I've put the correct dbencryption key, the toec client installer started builing correctly.

      posted in Support
      C
      Chavi
    • RE: Unable to to login - System.InvalidCastException: Object cannot be cast from DBNull to other types.

      no problem, happy to help 🙂

      posted in Support
      C
      Chavi
    • RE: Unable to to login - System.InvalidCastException: Object cannot be cast from DBNull to other types.

      There are two issues here, both seem connected to upgrading my MariaDB to 10.11.

      1. From MariaDB 10.6.1, the main name of the previous 3 byte utf character set has been changed to utf8mb3. This causes an error MySql.Data.MySqlClient.MySqlException: Character set 'utf8mb3' is not supported by .Net Framework.
      2. From MariaDB 10.10.1 the ID field has been made Nullable which appears to be causing the 'Object cannot be cast from DBNull to other types'

      Unfortunately the database files have been changed and downgrading back to 10.4 and 10.5 can't read them. I would have to backup my db, recreate 10.4 or 10.5 instance and restore.

      Stackoverflow suggests updating the MySql.Data package or switching to different connector like MysqlConnector.

      Hopefully this will help.

      posted in Support
      C
      Chavi
    • Unable to to login - System.InvalidCastException: Object cannot be cast from DBNull to other types.

      Hi, suddenly, I'm no longer able to login to the UI (with 'Unknown Error Obtaining Token' error). The logs however started showing "Object cannot be cast from DBNull to other types." error as follows:
      FrontEnd.log

      [InvalidCastException]: Object cannot be cast from DBNull to other types.
         at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
         at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)
         at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)
         at MySql.Data.MySqlClient.MySqlConnection.Open()
         at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
         at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
         at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
      [EntityException]: The underlying provider failed on Open.
         at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
         at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
         at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
         at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass41_0.<GetResults>b__0()
         at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
         at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__31_0()
         at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
         at Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy)
         at Toems_Service.Entity.ServiceUser.GetUserForLogin(String userName)
         at Toems_Service.AuthenticationServices.GlobalLogin(String userName, String password, String loginType, String verificationCode)
         at Toems_ApplicationApi.SimpleAuthorizationServerProvider.GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
         at Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.<InvokeTokenEndpointResourceOwnerPasswordCredentialsGrantAsync>d__10.MoveNext() in /_/src/Microsoft.Owin.Security.OAuth/OAuthAuthorizationServerHandler.cs:line 567
      

      Application.log

      System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.InvalidCastException: Object cannot be cast from DBNull to other types.
         at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
         at MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)
         at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)
         at MySql.Data.MySqlClient.MySqlConnection.Open()
         at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
         at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
         at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
         --- End of inner exception stack trace ---
         at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
         at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
         at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
         at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass41_0.<GetResults>b__0()
         at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
         at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__31_0()
         at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
         at Toems_DataModel.GenericRepository`1.GetFirstOrDefault(Expression`1 filter, Func`2 orderBy)
         at Toems_Service.Entity.ServiceSetting.GetSetting(String settingName)
         at Toems_Service.Entity.ServiceSetting.GetSettingValue(String settingName)
         at Toems_Service.Entity.ServiceActiveImagingTask.CancelTimedOutTasks()
      

      I have recently updated to MariaDB 4.11 (I can succesfully access the database via Heidi), other than that I haven't done anything that may have caused this. Can you help please?

      posted in Support
      C
      Chavi
    • RE: Problem with Toec Client export

      Thanks for your help. This step-by-step process has done the database move successfully for me (moving to different machine/IP with same OS, same installation path, same DB provider):

      ON THE SOURCE MACHINE:

      1. Stop IIS
      2. Dump theopenem database.
      3. Save the Toems-API\Web.config DbEncryptionKey
      4. Copy the database dump to the destination machine
      5. Restart IIS or leave down if not going to use anymore

      ON THE DESTINATION MACHINE:

      1. Install and configure Theopenem server to make sure its working
      2. Open the source machine database dump in text editor and replace the source machine IP address with the destination machine IP. Save.
      3. Stop IIS
      4. Restore theopenem database dump.
      5. Replace the DbEncryptionKey in Toems-API\Web.config and Toec-API\Web.config with the one from the source machine (step 3)
      6. Restart IIS
      7. Update Toec-API\Web.config ComServerUniqueId with the one from Admin\Client Com Servers
      8. Delete the old Toems CA and Toems Intermediate certificates if existing
      9. Export and Install Certificates from the current database.

      On the previously connected computers, deinstalling the old server' exported Toec client and reinstalling the one from the new server caused successful inventory refresh on next checkin.

      posted in Support
      C
      Chavi