GemBox WPF dependency does not work on App Service Azure deployment - wpf

I developed a test .NET Core Web App to which I added the .doc to .pdf conversion tool GemBox.
Their documentation for Azure deployment combined with .NET Core is limited to non-existing and their support guys could not help me with a clear solution either.
The error I get:
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies Common
solutions to this issue: The specified version of
Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
I tracked down the problem to the following issue:
GemBox.Document for .NET Core 3.0 uses WPF.
Is it possible that App Service added a limited support for WPF?
Thanks,
Lorena

The latest released version of GemBox.Document have cross-platform support for saving to PDF which doesn't have a WPF dependency, see the release post or the ASP.NET Core example.
So, you can now use GemBox.Document on Azure services, such as App Service, Azure Functions, etc. without any issue.

Related

Which Nuget package for Active Directory should I use?

I built an Azure WebAPI. I did not create the project with Authentication at the time it was first created. I added Active directory Authentication based on a code sample from Microsoft. It utilizes Microsoft.IdentityModel.Clients.ActiveDirectory which I got from NuGet. It works just fine.
I then created a WebAPI from VS 2017 and selected Authentication (using AD) at the time of project creation. It included Microsoft.AspNetCore.Authentication.AzureAD.UI.
I am not sure of the difference between these two NuGet modules nor which is better suited for my Azure WebAPI.
Then comes the modules to use in a .NET WPF client. There is no AuthorizationContext class (and others) in Microsoft.AspNetCore.Authentication.AzureAD.UI. Should I stick with Microsoft.IdentityModel.Clients.ActiveDirectory in the .NET WPF client or are there equivalents in Microsoft.AspNetCore.Authentication.AzureAD.UI?
For your web api project, answer is it depends on what you're trying to do from within the web api. For most simple scenarios where you just need to read/validate tokens, you should be good with the added Microsoft.AspNetCore.Aurthentication.JwtBearer nuget pacakges. More detailed question/answer available in this SO post
In case of your WPF client application although, you won't have much choice. You will need to work with ADAL or MSAL based on which AD version/endpoints you want to use. Also, in case of WPF client more probably than not you will need to acquire a token from Azure AD so internal operations (which library will take care of under the hood e.g. authenticationContext.AcquireTokenAsync) will be a little more involved than just reading the provided token from a header and hence the package.

Authenticate against Active Directory in .NET Core 1.0 application?

With the recent release of .NET Core 1.0, we're in the process of migrating our RC1 applications to the final release. The only piece we can't seem to figure out is how to integrate Active Directory authentication.
Previously in the RC1 applications, we had used the System.DirectoryServices.AccountManagement library to handle the LDAP authorization queries. However, we can no longer mix this library with .NET Core v1.
Generally, what is the best way to integrate Active Directory authentication into our applications using the libraries available for use in the .NET Core framework? IdentityServer, some other third party service like Auth0 or something else?
The Novell.LDAP library has been ported to .NET Core you can find it in NuGet. There are numerous samples available, including a verify password sample.
Best is subjective, really there's only one way right now, given the missing DirectoryServices namespace (which is planning for 1.1) - federation.
You'd have to install ADFS, and expose it to the internet. Then you configure it to act as an OAuth2 endpoint, and use the generic OAuth middleware to redirect logins to your ADFS server. You could also install the latest ADFS beta, which needs the latest Windows Server beta, and use OpenID Connect, but that's a lot of beta risks you may not find acceptable.
Or, if you just want the latest MVC pieces, run it on .NET Desktop, where you have full access to the directory services namespace.
The System.DirectoryServices namespace is currently being implemented in .NET Core, work is ongoing.
https://github.com/dotnet/corefx/issues/2089
Just want to say that they just issued a pre-release of the Microsoft.Windows.Compatibility which contains the System.DirectoryServices components needed to integrating with Active Directory
https://www.nuget.org/packages/Microsoft.Windows.Compatibility/2.0.0-preview1-25914-04

"Calls to the web service will fail..." Once Again

Last year someone reported encountering this problem ("The Silverlight project you are about to debug uses web services. Calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project that contains the web services.") and accepted the answer to "set the web project which hosts the Silverlight application to be your startup project."
I'm seeing the same message, but think the solution might have to be different. I am building in VS 2010 a Silverlight application to access the Google Weather API, with VB as the code-behind. The API will return a XML file with data for the specified city (ex., "http://www.google.com/ig/api?weather=london,england"). The Solution Explorer only shows my VB/Silverlight project ("GetWeather"), and the Project Properties dialog box shows the Startup Object as "GetWeather.App" -- the only choice. I'm trying to use a WebClient object to make the call and an XDocument object to parse the return. But I repeatedly get the above error message, with no other result. What am I doing wrong?
Thank you in advance!
I would add a simple Web project and configure it to host the Silverlight app. You'll need to host the app somewhere anyways, so why not create a stub ASP.NET application in your solution? The easiest way is to create a new Silverlight app solution selecting an ASP.NET web project as the host, and then copying your existing code to that solution. Then you should set the web project as the startup one. This should make debugging a lot easier.
Besides, do remember to configure the client access policy to enable cross-domain calls. Check out this article

Lightswitch: Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound

I'm currently creating a small silverlight application for testing, to see if it can works with other projects.
In debug, everything is working, but once I deploy it to my local IIS Server, I got this error:
Load operation failed for query 'GetAuthenticationInfo'. The remote
server returned an error: NotFound.
I've done a lot of research on the net, but nothing seems to resolve my problem.
I've the anonymous mode correctly enabled(and all other not) I've
done a clean publish on my IIS(7.5) from visual studio
My IIS has the two IIS lightswitch extensions, installed through the WPI
I'm not using the beta version
The application is just displaying some list, I've the windows auth set.
I've tried to publish as a Desktop application, as a Web application for the Client configuration, and Application serverconfiguration set to local or IIS Server, it's always the same problem(the goal is to have a two tier application(database - application), but hosted in an htm file).
I can't find what is going wrong, My IIS is just fresh installed with all components
Try restoring .NET Framework 4 at first, before diving into the problem deeper.
This solved the problem in my case
check that if you ".net framework 4.5 advanced service->WCF service -> HTTP activation" is checked or not , I solved it by this way.
When I get that darn "Not Found" ( which could be any number of things ) I crank up Fiddler and examine what is actually being returned by the web service. If you do that, you'll see the real error and a lot more about what's happening in the communications.
I had the same problem when I only had .NET Framework 4.5 installed on the server.
My solution was:
Uninstall .NET Framework 4.5 (you have to do that in order to install .NET Framework 4.0)
Install .NET Framework 4.0
Reinstall .NET Framework 4.5
Make sure that you site runs under the applicationpool ASP.NET v4.0.

Deployment of RIA Services app not working with Web Deployment Project

I'm attempting to deploy a RIA services 1.0SP1 project that has been precompiled with a Visual Studio 2010 Web Deployment Project. When I deploy the application to IIS using Visual Studio, the application runs fine. However, when I use a web deployment project to precompile the application, the first call to a RIA services service on the same system fails. An error similar to this is produced:
Load operation failed for query 'Login'. The remote server returned an error: NotFound.
It appears that the "NotFound" error happens frequently in RIA Services applications, as per this question. Using Fiddler, I discovered the error is a true Not Found error on the server, where as the service cannot be found. I also attempted to reference the URL of the service directly, which failed.
Searching the web, the comments on this post point to there being known problems with web deployment projects and RIA Services and this post points to the issue being a problem with Virtual Path Provider that RIA services uses to map the incoming requests to the proper domain service.
My question is, is it possible to get a RIA Services Web application working with a Web Deployment Project? Are there configuration changes required to make this work? One of the referenced sites mentions manually creating .svc files, is this the correct approach for solving the problem?
Here's what I could find. RIA does not support deployment in a Web Site project. This is an intentional decision that is evident in the tooling (you cannot add RIA to a new SL application that you're linking to a Web Site). My best guess is the precompiled deployment option can interfere with the execution of RIA's Virtual Path Provider.
I can't find anything that confirms the VPP will not run, but here are the sources that lead me to the conclusion.
1) From http://msdn.microsoft.com/en-us/magazine/cc163675.aspx
"Note that the .aspx files in the deployment directory are just marker files with no content. They have been left there to ensure that a file with the endpoint name is present in case the "Check that file exists" option for the .aspx extension in an IIS app is set."
2) From http://forums.silverlight.net/forums/t/218547.aspx#531318
"When you build and deploy your RIA services website using web deployment project then you have to copy a dummy page with .svc extension file under "ClientBin" or create a folder "Services" and paste the file there."
3) From http://forums.silverlight.net/forums/p/186739/428256.aspx#428488
"If the [published] WebSite project does not work, go to the folder, delete the PrecompliedApp.config"

Resources