Open rubenc57 opened 2 months ago
Follow-Up: Blank Screen Issue with Microsoft Reverse Proxy in .NET Core
Hi everyone,
I'm following up on my previous post regarding the blank screen issue I'm encountering with the Microsoft Reverse Proxy in a .NET Core application.
I created a new ASP.NET Web Application (.NET Framework) and implemented the Microsoft Reverse Proxy for incremental updates. Here’s what I did:
Everything worked perfectly fine in the .NET Framework web application.
Created ASP.NET Core Web App (Razor Pages):
wwwroot
and Pages
folders from my ASP.NET Web Application (.NET Framework).Encountered the Issue:
Here’s the code snippet from my program.cs
for reference:
builder.Services.AddSystemWebAdapters()
.AddJsonSessionSerializer(options =>
{
options.RegisterKey<string>("MachineName");
options.RegisterKey<DateTime>("SessionStartTime");
//options.RegisterKey<SessionDemoModel>("DemoItem");
})
.AddRemoteAppClient(options =>
{
options.RemoteAppUrl = new(builder.Configuration["ProxyTo"]);
options.ApiKey = builder.Configuration["RemoteAppApiKey"];
})
.AddSessionClient();
What could be causing the blank screen in the ASP.NET Core (Razor Pages) application? Has anyone experienced similar issues or have any insights into what might be going wrong?
Thank you for your assistance!
Follow-Up: Persistent Blank Screen Issue with Microsoft Reverse Proxy in .NET Core
Hi everyone,
I’m following up on my previous posts regarding the blank screen issue when using the Microsoft Reverse Proxy in a .NET Core application. I’ve conducted further testing and have new observations to share.
I decided to recreate everything using an ASP.NET Core Web App (Model-View-Controller) project. Unfortunately, I encountered the same blank screen issue.
program.cs
, the HomeController index page loads correctly:builder.Services.AddSystemWebAdapters()
.AddJsonSessionSerializer(options =>
{
options.RegisterKey<string>("MachineName");
options.RegisterKey<DateTime>("SessionStartTime");
//options.RegisterKey<SessionDemoModel>("DemoItem");
})
.AddRemoteAppClient(options =>
{
options.RemoteAppUrl = new(builder.Configuration["ProxyTo"]);
options.ApiKey = builder.Configuration["RemoteAppApiKey"];
})
.AddSessionClient();
Given that the issue persists across both Razor Pages and MVC projects when the SystemWebAdapters configuration is included, what could be the underlying cause? Are there specific settings or dependencies I might be missing?
Thank you for your continued help and suggestions!
Follow-Up: Persistent Blank Screen Issue with Microsoft Reverse Proxy in .NET Core
I’m following up with additional insights on the blank screen issue I'm experiencing when using the Microsoft Reverse Proxy in a .NET Core application. Here’s what I did recently:
Created a New ASP.NET Web Application (.NET Framework):
Upgraded to ASP.NET Core:
Added a Folder and Controller:
program.cs
, the HomeController index page loads correctly:builder.Services.AddSystemWebAdapters()
.AddJsonSessionSerializer(options =>
{
options.RegisterKey<string>("MachineName");
options.RegisterKey<DateTime>("SessionStartTime");
//options.RegisterKey<SessionDemoModel>("DemoItem");
})
.AddRemoteAppClient(options =>
{
options.RemoteAppUrl = new(builder.Configuration["ProxyTo"]);
options.ApiKey = builder.Configuration["RemoteAppApiKey"];
})
.AddSessionClient();
Given that the issue persists across the upgraded project when the SystemWebAdapters configuration is included, what could be causing this? Are there specific settings or dependencies I might be missing? I'm ready to include the project files if needed.
I'm sure the snippet is wrong...
Can someone help?
if i add this in program.cs, it does not work builder.Services.AddSystemWebAdapters(); if I remove it, it works
Meanwhile I'm using cookies to share data between the two apps 🤷♂️
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.