Hello,
We upgraded our OnSite environment to 10.1.2. last night, but now get an error in our apps when retrieving the systeminfo.
10.1.2:
10.0.6:
Sample code:
SuperOffice.SoSystemInfo sosysteminfo = SuperOffice.SoSystemInfo.GetCurrent();
string serialNr = sosysteminfo.License.SerialNr;
This is using NuGet package 9.1.7543.1033.
All Replies (8)
Also tried this with the latest NuGet 10.1.2 packages now that they are out, same issue occurs.
Hi David!
I'm unable to reproduce this... I'm using the latest published nuget packages too - new project, no other dependencies (just SuperOffice.NetServer.Services).
I think I forgot to mention an important detail here, I am trying this using Remote mode, not Local.
Full code sample for 10.1.2:
internal class Program
{
public static string RemoteBaseUrl => "https://crm.company.local/superoffice/remote/services88";
public static string CrmUserName => "";
public static string CrmPassword => "";
static void Main(string[] args)
{
var services = new ServiceCollection();
services
.AddNetServerCore()
.AddSoDatabase()
.AddSingleton<Microsoft.Extensions.Logging.ILogger, SuperOffice.Logging.SoLogger>()
.AddSingleton<SuperOffice.Security.Principal.IContextInitializer, ContextInitializer>();
var provider = services.BuildServiceProvider(true);
provider.RegisterWithNetServer();
using (SuperOffice.SoSession soSession = SuperOffice.SoSession.Authenticate(CrmUserName, CrmPassword))
{
SuperOffice.SoSystemInfo systemInfo = SuperOffice.SoSystemInfo.GetCurrent();
using (SuperOffice.CRM.Services.ContactAgent contactAgent = new SuperOffice.CRM.Services.ContactAgent())
{
SuperOffice.CRM.Services.ContactEntity contactEntity = contactAgent.GetMyContact();
}
}
}
}
internal class ContextInitializer : SuperOffice.Security.Principal.IContextInitializer
{
public void InitializeContext(string contextIdentifier)
{
ConfigureSettings();
}
private static void ConfigureSettings()
{
ConfigFile.WebServices.RemoteBaseURL = Program.RemoteBaseUrl;
ConfigFile.Services.DefaultMode = SuperOffice.CRM.Services.ServiceMode.Remote;
ConfigFile.Data.Session.Mode = "Process";
ConfigFile.Diagnostics.LogToFile = true;
ConfigFile.Diagnostics.LogFolder = @"C:\Temp";
ConfigFile.Diagnostics.EnableScaffolding = true;
ConfigFile.Diagnostics.LogDebug = true;
}
}
EDIT: Strange, the code example above display's wrong, the AddSingleton method contains the following:
Error:
Hi David,
I was able to reproduce your error using Remote mode towards an online tenant.
Do you get any additional exception information if you run this after authentication?
var tmp = new SuperOffice.CRM.Services.WcfProxy.Services88.SoPrincipalAgentWcfProxy();
var temp2 = tmp.GetSystemInfo();
Before I tried that, I saw this error:
After adding the ApplicationToken setting, things worked as expected:
Another thing to check, but shouldn't be required client site, is the serviceHostingEnvironment setting.
Best regards.
Hi Tony,
I'm trying this towards OnSite 10.1.2, our apps that run towards online tenants also using 'SuperOffice.SoSystemInfo.GetCurrent()' don't experience any issue.
Trying your code:
The web . config of the onsite environment has the following:
Hi David,
Now registered as BUG 29182, actively being worked on.
Best regards.
Another issue reported in this release is an error observed when running ServerSetup.exe.
Kasper Rosenlund, a SuperOffice consultant, has reported a workaround is to run DbSetup.exe located in the ServerSetup folder.
Best regards.
Can confirm that with the hotfix that was released today (v10.1.2.1565) this issue is solved!