POST
|
I'm playing around with IdentityServer4 as an OpenID Connect source, and I am getting the same "user profile" error, although it works fine for a MVC client that uses the same parameters as ArcGIS Online. Next I created a custom IProfileService implementation to see if it's actually being called, and again it works fine for the MVC client, but with AGOL only IsActiveAsync is being called (and returning true); GetProfileDataAsync is never called.
... View more
11-17-2021
07:02 AM
|
0
|
4
|
4514
|
POST
|
Good point; I went ahead and moved those lines to the end of the block. I still am seeing both issues, however.
... View more
10-26-2021
12:50 PM
|
0
|
1
|
1682
|
POST
|
To clarify, I set up what I thought was a simple test, but if I made a glaring error another set of eyes always helps. I created a deployment which looks like this: And here's the code for App.xaml.cs: using Esri.ArcGISRuntime;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
using System.Threading.Tasks;
using System.Windows;
namespace DeploymentTest
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private static IntPtr runtimeLibPtr = IntPtr.Zero;
private static IntPtr runtimeLibWpfPtr = IntPtr.Zero;
private const string DeploymentHome = @"C:\apps";
private const string RuntimeVersion = "100.12";
private static string NativeInstallPath;
private static string DLLversion;
private void Application_Startup(object sender, StartupEventArgs e)
{
try
{
string sRuntimeDeployment = "ArcGISRuntimeCore" + RuntimeVersion;
string sInstallPath = Path.Combine(DeploymentHome, sRuntimeDeployment);
if (Directory.Exists(sInstallPath))
{
NativeInstallPath = Path.Combine(sInstallPath, "runtimes");
DLLversion = RuntimeVersion.Replace('.', '_');
NativeLibrary.SetDllImportResolver(typeof(ArcGISRuntimeEnvironment).Assembly, new DllImportResolver(DllImportResolver));
NativeLibrary.SetDllImportResolver(typeof(Esri.ArcGISRuntime.UI.Controls.MapView).Assembly, new DllImportResolver(DllImportResolver));
string sAssemblyPath = Path.Combine(sInstallPath, "Esri.ArcGISRuntime.dll");
AssemblyLoadContext.Default.LoadFromAssemblyPath(sAssemblyPath);
sAssemblyPath = Path.Combine(sInstallPath, "Esri.ArcGISRuntime.WPF.dll");
AssemblyLoadContext.Default.LoadFromAssemblyPath(sAssemblyPath);
}
// Initialize the ArcGIS Runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "ArcGIS Runtime initialization failed.");
// Exit application
this.Shutdown();
}
}
private static IntPtr DllImportResolver(string libraryName, System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportSearchPath? searchPath)
{
string path = $"{NativeInstallPath}\\win-x{(Environment.Is64BitProcess ? "64" : "86")}\\native\\{libraryName}";
if (libraryName == "RuntimeCoreNet" + DLLversion + ".dll") // && assembly.FullName == typeof(Esri.ArcGISRuntime.ArcGISRuntimeEnvironment).Assembly.FullName)
{
if (runtimeLibPtr == IntPtr.Zero)
{
if (NativeLibrary.TryLoad(@$"{path}", out runtimeLibPtr))
return runtimeLibPtr;
}
return runtimeLibPtr;
}
else if (libraryName == "RuntimeCoreNet" + DLLversion + ".WPF.dll") // && assembly.FullName == typeof(Esri.ArcGISRuntime.UI.Controls.MapView).Assembly.FullName)
{
if (runtimeLibWpfPtr == IntPtr.Zero)
{
if (NativeLibrary.TryLoad(@$"{path}", out runtimeLibPtr))
return runtimeLibWpfPtr;
}
return runtimeLibWpfPtr;
}
return IntPtr.Zero;
}
}
}
... View more
10-25-2021
06:39 PM
|
0
|
5
|
2453
|
POST
|
I've run into two issues: Shared resources are still expected to reside in the application folder I'm getting the following error: Unable to find an entry point named 'CoreRT_GeoView_setScreenScale' in DLL 'RuntimeCoreNet100_12.dll'.
... View more
10-22-2021
04:07 PM
|
0
|
6
|
2476
|
POST
|
Replacing Assembly.LoadFrom with AssemblyLoadContext.Default.LoadFromAssemblyPath cleared up the resource DLL problem. Now I'll look into the possibility of using the native dll search options to point to a shared Runtime deployment.
... View more
10-22-2021
10:20 AM
|
0
|
1
|
2485
|
POST
|
I am definitely interested this topic, and one other, related to .NET 5 migration, if anyone can point me in the right direction. Microsoft doc searches keep pointing me back to the old Framework. Is there a simple way, not hacking into JSON configs, to point Runtime to a particular shared deployment path? Is there a way to tell assembly probing NOT to look for .resource dlls when using Assembly.LoadFrom and Assembly.CreateInstance? My gratitude always, --Mark Update: I think I finally found what I'm looking for: https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/default-probing
... View more
10-21-2021
05:45 AM
|
0
|
2
|
2491
|
BLOG
|
Well, this is interesting! I have confirmed the previous two comments, that tweaking the logic of the benchmark produces markedly different results depending on the flavor of Runtime. I've attached another set of code that represents three different options: Opt 1: Access the MultipointBuilder point collection inside the random point generation loop. Opt 2: Access the MultipointBuilder point collection outside the random point generation loop. Opt 3: Create and recycle a PointCollection outside the polygon creation function. The last option is a bit tricky because Runtime for Qt doesn't have a Multipoint constructor that takes a PointCollection argument. Instead, I used the following code for Qt: MultipointBuilder* mb = new MultipointBuilder(_sr, NULL);
mb->setPoints(points);
const Geometry mp = mb->toGeometry();
delete mb;
points->removeAll(); And the following for .NET/Java: MultipointBuilder mb = new MultipointBuilder(points, _sr);
Multipoint mp = mb.ToGeometry();
points.Clear(); As expected, Opts 1 and 2 made no significant difference in .NET and Java, and should have made no difference for Qt, but for a bug already pointed out. Opt 3 made no significant difference for Qt, but actually had opposite results for .NET and Java! Check out these results: Results (seconds) Opt 1 Opt 2 Opt 3 .NET 16 16 5 Qt 35 5 5 Java 22 22 52 Is that bizarre, or what?
... View more
10-14-2021
11:17 PM
|
0
|
0
|
1260
|
BLOG
|
My bad, I'm aware that the different flavors of Runtime call the same native libraries. What I neglected to point out is that, by making a large number of fine-grained calls, my goal was to measure the relative performance of the various frameworks in wrapping and interacting with those libraries.
... View more
10-02-2021
09:15 AM
|
0
|
0
|
1409
|
POST
|
Thanks for the link. I had no idea there was an actual search page, or how to get to it.
... View more
09-28-2021
07:07 AM
|
2
|
0
|
1195
|
POST
|
Just do it! Today, I finally went through my migrated blog posts and updated them. With perhaps one exception, all showed errors, and I just went though the process of verifying them. I've been putting it off for some time, but I finally got my nose to the grindstone for just a few hours. The lack of appropriate search filters didn't help. The day before I spent a surprising amount of time just trying to find all my blog posts in the first place.
... View more
09-25-2021
08:10 PM
|
0
|
1
|
1205
|
BLOG
|
Some time ago I posted an article comparing the performance of older Esri SDKs (ArcObjects: .NET, C++) with newer ones (Pro, Enterprise, Runtime: .NET). The Pro and Exterprise SDKs barely performed better than their ArcObjects .NET counterparts: instead of being re-engineered from scratch, they obviously leveraged the older ArcObjects technology, and were bogged down by the same COM interop performance issues. Runtime, on the other hand, proved to be a true innovation and far outperformed any of the other SDKs. As a fun exercise, I decided to compare the three flavors of Runtime 100.12 available for Windows desktop (.NET, Java, Qt). Again, I used the same purely computational benchmark: creating convex hulls for 100,000 random polygons. I built all three examples as standalone console applications (release builds), and executed them outside of their respective IDEs. I ran each benchmark five times, and picked the best time for each. Here's the benchmark comparison: Runtime SDK Execution time (seconds) .NET 16 Java 19 Qt (C++) 33 And here's the normalized performance index: I expected .NET and Java to be pretty much neck-and-neck, since no COM interop is involved in the benchmark (COM interop perfomance is much worse in Java than .NET). Qt was a bit of a surprise; although, I've dabbled with Runtime for Qt in the past, and noticed that fine-grained code seems not to be as fast as it could be. While C++ is my favorite programming language, and I admire Qt's "write once, deploy many" approach, it's obvious that the framework carries some baggage. [See attachment for the code.] Update: This has certainly been a fascinating topic, and there's been some good participation and feedback. While the original purpose of the exercise was to compare the relative interop performance of the various flavors of Runtime in making a large number of fine-grained calls to the common libraries, it has since been demonstrated that tweaks to the logic can make a significant difference in performance. And in one case so far, the exercise has led to Esri's discovering and fixing a bug. Kudos to everyone who participated.
... View more
09-23-2021
10:42 AM
|
1
|
9
|
2359
|
POST
|
Looks like the issue has reappeared at 100.12.0 -- now the error message is "Invalid argument: geometry1 and geometry2 must have equivalent spatial references." Fortunately, I've kept my workaround code. UPDATE: I can't duplicate the error using the sample project above, so something else must be going on.
... View more
08-27-2021
12:24 PM
|
0
|
0
|
973
|
POST
|
According to the system requirements, Visual Studio 2017 15.9 or higher is supported at Runtime .NET 100.11, but when I try to install the VSIX I get the error "This extension is not installable on any currently installed products." Does it only install on VS 2019? BTW, I can add the NuGet package just fine.
... View more
04-26-2021
04:35 PM
|
0
|
1
|
1068
|
Title | Kudos | Posted |
---|---|---|
1 | 01-04-2012 06:42 AM | |
1 | 09-23-2021 10:42 AM | |
2 | 09-28-2021 07:07 AM | |
1 | 04-07-2021 10:31 PM | |
3 | 03-21-2021 01:14 PM |
Online Status |
Offline
|
Date Last Visited |
01-07-2022
08:31 AM
|