dotnet / dotnet/systemweb-adapters

Help Needed: Blank Screen Issue with Microsoft Reverse Proxy in .NET Core

Open
#501 5 comments 0 reactions 0 assignees View on GitHub
Needs: Triage :mag:
Dominant language
C#
Stars
384
Forks
76
Avg merge
2h 24m
Merged PRs (30d)
1

Description

Hi everyone,

I'm currently working on incrementally updating my WebForms website using the Microsoft Reverse Proxy in a new .NET Core application. I've added the necessary services in program.cs, but when I run the app, I encounter a blank screen. Here is the relevant code snippet from my program.cs:

builder.Services.AddSystemWebAdapters()
.AddJsonSessionSerializer(options =>
{
options.RegisterKey("MachineName");
options.RegisterKey("SessionStartTime");
//options.RegisterKey("DemoItem");
})
.AddRemoteAppClient(options =>
{
options.RemoteAppUrl = new(builder.Configuration["ProxyTo"]);
options.ApiKey = builder.Configuration["RemoteAppApiKey"];
})
.AddSessionClient();
If I remove the builder.Services.AddSystemWebAdapters() snippet, index page is shown again

I've double-checked my configuration settings and everything seems to be in place. However, when I execute the app, all I get is a blank screen without any error messages or logs that indicate what might be going wrong.

Details:
Framework: .NET Core
Proxy: Microsoft Reverse Proxy
Configuration:
ProxyTo and RemoteAppApiKey are set in the configuration file.
Troubleshooting Steps Taken:
Verified configuration settings in appsettings.json.
Checked for any runtime errors or logs – none found.
Uncommented the RegisterKey("DemoItem") line – no change.
Has anyone experienced a similar issue or have any ideas on how to resolve this?
Any help or suggestions would be greatly appreciated!

I'm following this tutorial: https://youtu.be/_XG3EYRcgY8?si=2ARtMWNSIcIDEvCO

Thanks in advance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.