Home : Support for ASP.NET Core / .NET Core
Q10467 - FAQ: Support for ASP.NET Core / .NET Core

.NET Core  (sometimes referred to as .NET Core Native)

A lot of customers have asked about "full .NET Core native" support.

DotImage is a .NET SDK .. in the past, before .NET Core, that was clear enough as the only ".NET" was shorthad for .NET Framework.

Now with Microsoft .NET Core and .NET Framework and ASP.NET Core, there can be confusion.

Our SDK is still a .NET Framework SDK, and unfortunately, at this time, the answer is no, we do not support .NET Core Native


Support for ASP.NET Core Apps for WebDocumentViewer and WebCapture

As of 11.0, we now do have support for ASP.NET Core apps targeting the .NET framework for our WebDocumentViewer

Atalasoft DotImage components can be used along with ASP.Net Core libraries, but it requires the application to be built for .Net Framework 4.5.2 for ASP.NET Core 1.x and at least Framework 4.6.2 for ASP.NET Core 2.x

You should create new projects in Visual Studio from the  ASP.NET Core Web Application template, using .NET Framework and ASP.NET Core 1.1 like this:

By default the left combobox has value .NET Core which we do not support. If you try to create new project with default settings, you won't be able to use the WDV.

NOTE: we do support targeting ASP.NET core 2.x .. version 11.0 works with it, but you  will need to target at least .NET framework 4.6.2

We have a similar screenshot in our tutorial, but Microsoft updated its template in a recent VisualStudio update.

For more information / guidance on using WebDocumentViewer in an ASP .NET Core project, please have a look at our online tutorial.

Customizing Middleware  / Event Handling (Formerly Custom Handler)

In the tutorial, you will see a brief mention about customizing the middlware:

If you want to customize this middleware, you can choose another overload of the method RunWebDocumentViewerMiddleware that accepts implementation of the interface IWebDocumentViewerCallbacks.

However, it's a bit light on details. So here's the "missing piece"

Instead of this line
app.Map("/wdv", wdvApp => { wdvApp.RunWebDocumentViewerMiddleware(); });

use this line:
app.Map("/wdv", wdvApp => { wdvApp.RunWebDocumentViewerMiddleware(new MyWDVCallbacks()); } );

and add this class

public class MyWDVCallbacks : WebDocumentViewerCallbacks
    public override void DocumentInfoRequested(DocumentInfoRequestedEventArgs args)

    public override void ImageRequested(ImageRequestedEventArgs args)
     * The above was just an example of hooking to the two main events.. you can handle any exposed event here
     * //.. most common ...
     *  AnnotationDataRequested
     *  DocumentSave
     *  DocumentStreamWritten
     *  AnnotationStreamWritten
     *  //.. less common .
     *  PageTextRequested
     *  PdfFormRequested
     *  //.. rarely if ever used .. 
     *  ReleaseDocumentStream
     *  ReleasePageStream
     *  ResolveDocumentUri
     *  ResolvePageUri

Support for ASP.NET Core 2.x

If you noticed that we explicitly mentioned ASP.NET Core 1.x or 1.1 and are wondering about ASP.NET Core 2.x support, the answer is:

As of 11.0 we have certified ASP.NET Core 1.x, but  have not certified ASP.NET Core 2.x. It is possible to target ASP.NET Core 2.x and your application should work. You will need to target .NET Framework 4.6.2 or higher... Support has successfully built and tested sample apps using ASP.NET Core 2.1 without issue. However, officially, we will certify for ASP.NET Core 2.x in a future release. While support can not speak to future roadmaps, we do anticipate ASP.NET Core 2.x certification in the next point release (11.1)

Support for ASP.NET Core in Legacy Web Controls

Our legacy web controls (WebImageViewer / WebAnnotationViewer / WebThumbnailViewer) do NOT have any support for ASP.NET Core or .NET Core native. The only support for ASP.NET Core we provide at this time is for the new WebDocumentViewer / WebDocumentThumbnailer controls mentioned above.


More Resources

Q10469 - INFO: ASP.NET Core WDV Whitepaper - Getting Started (11.1 version)
Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?


Tell us why you rated the content this way. (optional)
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2020. InstantASP Ltd. All Rights Reserved