Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with update KB5050009 affecting IIS web application (XPS Document images) #10322

Open
stewartsims opened this issue Jan 22, 2025 · 6 comments
Labels
Investigate Requires further investigation by the WPF team.

Comments

@stewartsims
Copy link

stewartsims commented Jan 22, 2025

Description

Since installing update KB5050009 on more than one machine we are now have a problem with a web application that runs in IIS. The application produces XPS documents from a XAML template that are then converted in PDFs.

Any of the images that use network references as the source such as below are now not showing when the application produces the document:
<Image Source="\\localhost\SharedFolder\my-image.png" />

Rolling back the update fixes the problem, but Windows continues to 'want' to install the update.

This is remarkably similar to an issue from a few years ago created by another security update:
#7357

That is why I have reported this issue in this repository. If this isn't the best place to report this, please let me know where to submit the issue.

Here are the packages used in the .cs file in the web application if it helps direct me to the right place to report the issue:
using System.Windows.Documents;
using System.Windows.Markup;
using System.Windows.Xps;
using System.Windows.Xps.Packaging;

For the PDF conversion we are using PdfSharp.Xps.XpsConverter but this is not the problem, it is definitely somehow the Windows update affecting the XPS Document functionality.

Apologies for the brief details, I can supply more information on how to recreate the issue.

Reproduction Steps

Process an XPS document in code on a Windows 11 machine after installing KB5050009. Note that any image with the following type of network path as an image source fails to display in the document:
<Image Source="\\localhost\SharedFolder\my-image.png" />

Expected behavior

The image should load from the network and display in the document.

Actual behavior

The image does not appear

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

This is an issue for 2 web applications - one targeting .NET Framework 4.8 and one targeting .NET Framework 4.5.2

Other information

No response

@h3xds1nz
Copy link
Member

@stewartsims It would be helpful to know which version of .NET is the application using.

I'd assume that's .NET Framework (version something) just by nature of the issue but well, more information is always better.

@stewartsims
Copy link
Author

@stewartsims It would be helpful to know which version of .NET is the application using.

I'd assume that's .NET Framework (version something) just by nature of the issue but well, more information is always better.

The application is targeting .NET Framework 4.8 in Visual Studio, though in the Web.config we have the following:

    <compilation debug="true" targetFramework="4.7" />
    <httpRuntime targetFramework="4.7" />

This is also affecting another application targeting .NET Framework 4.5.2. Will update the issue accordingly.

@singhashish-wpf
Copy link
Member

@stewartsims
Copy link
Author

Have you tried the workaround mentioned in the KB Article? https://support.microsoft.com/en-us/topic/kb5022083-change-in-how-wpf-based-applications-render-xps-documents-a4ae4fa4-bc58-4c37-acdd-5eebc4e34556

Yes, neither of the two workarounds in the KB Article for the old issue seem to fix the output.

@singhashish-wpf
Copy link
Member

Does it work with a local image?

@stewartsims
Copy link
Author

Does it work with a local image?

Yes using a local path e.g. C:\my-path\my-image.png works.

@singhashish-wpf singhashish-wpf added the Investigate Requires further investigation by the WPF team. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigate Requires further investigation by the WPF team.
Projects
None yet
Development

No branches or pull requests

3 participants