auth0 / auth0-dotnet-templates

Auth0 Templates for .NET
Apache License 2.0
46 stars 7 forks source link

Cannot find runtime config #39

Open RafZen opened 2 weeks ago

RafZen commented 2 weeks ago

When starting the project: https://github.com/auth0/auth0-dotnet-templates/blob/main/docs/auth0blazorwasm.md Without any modifications, The following error shows:

WasmAppHost --use-staticwebassets --runtime-config C:\Users\rafal.szabelski\Source\Repos\auth0-dotnet-templates\templates\Auth0.BlazorWebAssembly\Client\bin\Debug\net7.0\Auth0BlazorWasm.Client.runtimeconfig.json Error: Cannot find runtime config at C:\Users\rafal.szabelski\Source\Repos\auth0-dotnet-templates\templates\Auth0.BlazorWebAssembly\Client\bin\Debug\net7.0\Auth0BlazorWasm.Client.runtimeconfig.json

andychiare commented 2 weeks ago

Sorry, not sure I understand the process to reproduce this error.

Have you created a new project using dotnet new auth0blazorwasm and get this error when you run the newly created application or are your running the template project? 🤔 Can you also provide some info about your development environment configuration?

RafZen commented 2 weeks ago

Hi Andrea,

I am assuming you are answering to my previous email. I am running the template project from the git repo provided by Steve in the last email. I updated missing nuget references using the latest .net 7 versions, that is all I have change in order to get it to compile.

Please see details of my development environment below:

Operating System:

OS Name Microsoft Windows 11 Pro Version 10.0.22621 Build 22621 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Manufacturer Dell Inc. System Model XPS 15 9520 System Type x64-based PC System SKU 0B19 Processor 12th Gen Intel(R) Core(TM) i7-12700H, 2300 Mhz, 14 Core(s), 20 Logical Processor(s) BIOS Version/Date Dell Inc. 1.27.1, 11/09/2024 SMBIOS Version 3.4 Embedded Controller Version 255.255 BIOS Mode UEFI BaseBoard Manufacturer Dell Inc. BaseBoard Product 0MWGD4 BaseBoard Version A00 Platform Role Mobile Secure Boot State On PCR7 Configuration Elevation Required to View Windows Directory C:\Windows System Directory C:\Windows\system32 Boot Device \Device\HarddiskVolume1 Locale United States Hardware Abstraction Layer Version = "10.0.22621.2506" Time Zone GMT Standard Time Installed Physical Memory (RAM) 32.0 GB Total Physical Memory 31.7 GB Available Physical Memory 17.6 GB Total Virtual Memory 33.7 GB Available Virtual Memory 16.8 GB Page File Space 2.00 GB Page File C:\pagefile.sys Kernel DMA Protection On Virtualization-based security Running Virtualization-based security Required Security Properties Virtualization-based security Available Security Properties Base Virtualization Support, Secure Boot, DMA Protection, UEFI Code Readonly, SMM Security Mitigations 1.0, Mode Based Execution Control, APIC Virtualization Virtualization-based security Services Configured Virtualization-based security Services Running Windows Defender Application Control policy Enforced Windows Defender Application Control user mode policy Off Device Encryption Support Elevation Required to View A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Visual Studio Configuration:

VisualStudio.17.Release/17.11.5+35327.3 Microsoft .NET Framework Version 4.8.09032

ASP.NET and Web Tools 17.11.231.19466 ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.11.231.19466 Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 17.11.231.19466 Azure Functions and Web Jobs Tools

C# Tools 4.11.0-3.24460.3+5649376e0e5f5db3743a94a62b073f2cce4be5d9 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub Copilot 0.2.1657.32929 GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

Microsoft Azure Tools for Visual Studio 2.9 Support for Azure Cloud Services projects

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.11.1 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.11.3.2442001+68650a7d94261bc56a1f4bc522c2ee35314b1abb Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.11.47.0 Microsoft SQL Server Data Tools

TypeScript Tools 17.0.30715.2002 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.11.0-3.24460.3+5649376e0e5f5db3743a94a62b073f2cce4be5d9 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.11.0-beta.24421.7+af2f522de602281d4ef5a7b71507c428e814c5c1 Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.

Thanks,

Rafal

From: Andrea Chiarelli @.> Sent: 08 November 2024 10:34 To: auth0/auth0-dotnet-templates @.> Cc: Rafal Szabelski @.>; Author @.> Subject: Re: [auth0/auth0-dotnet-templates] Cannot find runtime config (Issue #39)

Sorry, not sure I understand the process to reproduce this error.

Have you created a new project using dotnet new auth0blazorwasm and get this error when you run the newly created application or are your running the template projecthttps://github.com/auth0/auth0-dotnet-templates/blob/main/Auth0Templates.csproj? 🤔 Can you also provide some info about your development environment configuration?

— Reply to this email directly, view it on GitHubhttps://github.com/auth0/auth0-dotnet-templates/issues/39#issuecomment-2464360929, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5B5P2GTNP6FVYMYNMDPF2TZ7SHRJAVCNFSM6AAAAABRKYA3GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGM3DAOJSHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

andychiare commented 2 weeks ago

Sorry again, but still I'm not sure I understand 😞 This repo contains the sources for a NuGet package of .NET project templates. You should run it only to generate the package (unfortunately, it currently has a .NET 7 dependency)

To test the issue that Steve told me, you do not need to run this project. You should download and install the Auth0 Templates for .NET package and follow these instructions to create a new Blazor WASM app.

Sorry for any misunderstanding 🙏

RafZen commented 1 week ago

Hi Andrea, Thank you for the clarification. Can I ask if I understand the beginning of the instructions correctly, please see below a screenshot: @.*** Does this mean, there are manual instructions how to set up an app (the first line above) and a way to automatically set it up using the CLI, and the templates nuget?

Another words, do both versions of setting up eventually conclude in an application configured the same way? If the answer is yes, then I have already gone through the “manual” route, although there were some differences:

The application we use

  1. runs under .net 8 not 7.
  2. It is a “Stand alone WASM app”, not a ASP.NET CORE hosted app. Now, if I am to test what you are suggesting I will have to do it on a different Visual Studio template than we use and on a different .Net framework then we use. Even if it works, we will not be regressing our app so I am asking if there is a point in taking time to test it.

I have already sent you a test app, which uses a stand alone (not hosted) WASM Blazor and .net 8. The question is whether we can use your services with this app, not with a previous .net and a hosted version of WASM Blazor Visual Studio template.

Mind you, the app eventually is going to be hosted on ASP.NET server, even when run in Visual Studio it is hosted on a Kestrel or IIS Server which is ASP.NET core, however the visual studio template does not use ASP.NET core hosting model which means the solution lacks the “Server” part.

It would be good at this point to have a conversation with Steve, which I regretfully never had so we can quickly exchange information and clear misunderstandings.

Thanks,

Rafal

From: Andrea Chiarelli @.> Sent: 08 November 2024 15:52 To: auth0/auth0-dotnet-templates @.> Cc: Rafal Szabelski @.>; Author @.> Subject: Re: [auth0/auth0-dotnet-templates] Cannot find runtime config (Issue #39)

Sorry again, but still I'm not sure I understand 😞 This repo contains the sources for a NuGet package of .NET project templates. You should run it only to generate the package (unfortunately, it currently has a .NET 7 dependency)

To test the issue that Steve told me, you do not need to run this project. You should download and install the Auth0 Templates for .NET packagehttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.nuget.org%2fpackages%2fAuth0.Templates%2f&c=E,1,Hy59JKUawpFyZHguAHF6UkIFdKsxzHuTo0tdjDPC7HfGCabKbqtQDxn2jyjKwfT9Eho6a7zFwiDLwDeTAntX_s6htn-inP5oMZk00cs4i5h149GYWPi5SBlVrmns&typo=1 and follow these instructionshttps://github.com/auth0/auth0-dotnet-templates/blob/main/docs/auth0blazorwasm.md to create a new Blazor WASM app.

Sorry for any misunderstanding 🙏

— Reply to this email directly, view it on GitHubhttps://github.com/auth0/auth0-dotnet-templates/issues/39#issuecomment-2465095589, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5B5P2GHSJBJF2BYO6LSWUTZ7TM3NAVCNFSM6AAAAABRKYA3GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRVGA4TKNJYHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

RafZen commented 1 week ago

Hi Andrea,

Thank you for your explanations again. I went ahead with the tests. I installed the visual studio templates and created an application using the template below: @.*** For .net framework I selected 8.0 I entered all required data: Authority, ClientId, Audience. I connected successfully to the tenant which I was using before, and I was able to log in / log out. I run the same tests as before. Unfortunately, I could replicate the issue just the same way.

Then I created another application from the same Auth0 template as before but this time I selected .Net7 I went through the same steps as above and again could replicate the issue.

Then I checked if changing the startup project from Server to Client would make any difference, but it didn’t.

The templates just created the same application as the one I sent you, with identical code. In conclusion: neither ASP.NET hosting model nor .Net framework 7 or 8 made any difference or improvements. The debugging issue is present in each version of the tests I have run so far.

Thanks,

Rafal

From: Rafal Szabelski Sent: 11 November 2024 10:50 To: 'auth0/auth0-dotnet-templates' @.>; auth0/auth0-dotnet-templates @.> Cc: Author @.>; Vasilis Papageorgiou @.>; Henry Jones @.***> Subject: RE: [auth0/auth0-dotnet-templates] Cannot find runtime config (Issue #39)

Hi Andrea, Thank you for the clarification. Can I ask if I understand the beginning of the instructions correctly, please see below a screenshot: @.*** Does this mean, there are manual instructions how to set up an app (the first line above) and a way to automatically set it up using the CLI, and the templates nuget?

Another words, do both versions of setting up eventually conclude in an application configured the same way? If the answer is yes, then I have already gone through the “manual” route, although there were some differences:

The application we use

  1. runs under .net 8 not 7.
  2. It is a “Stand alone WASM app”, not a ASP.NET CORE hosted app. Now, if I am to test what you are suggesting I will have to do it on a different Visual Studio template than we use and on a different .Net framework then we use. Even if it works, we will not be regressing our app so I am asking if there is a point in taking time to test it.

I have already sent you a test app, which uses a stand alone (not hosted) WASM Blazor and .net 8. The question is whether we can use your services with this app, not with a previous .net and a hosted version of WASM Blazor Visual Studio template.

Mind you, the app eventually is going to be hosted on ASP.NET server, even when run in Visual Studio it is hosted on a Kestrel or IIS Server which is ASP.NET core, however the visual studio template does not use ASP.NET core hosting model which means the solution lacks the “Server” part.

It would be good at this point to have a conversation with Steve, which I regretfully never had so we can quickly exchange information and clear misunderstandings.

Thanks,

Rafal

From: Andrea Chiarelli @.**@.>> Sent: 08 November 2024 15:52 To: auth0/auth0-dotnet-templates @.**@.>> Cc: Rafal Szabelski @.**@.>>; Author @.**@.>> Subject: Re: [auth0/auth0-dotnet-templates] Cannot find runtime config (Issue #39)

Sorry again, but still I'm not sure I understand 😞 This repo contains the sources for a NuGet package of .NET project templates. You should run it only to generate the package (unfortunately, it currently has a .NET 7 dependency)

To test the issue that Steve told me, you do not need to run this project. You should download and install the Auth0 Templates for .NET packagehttps://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.nuget.org%2fpackages%2fAuth0.Templates%2f&c=E,1,Hy59JKUawpFyZHguAHF6UkIFdKsxzHuTo0tdjDPC7HfGCabKbqtQDxn2jyjKwfT9Eho6a7zFwiDLwDeTAntX_s6htn-inP5oMZk00cs4i5h149GYWPi5SBlVrmns&typo=1 and follow these instructionshttps://github.com/auth0/auth0-dotnet-templates/blob/main/docs/auth0blazorwasm.md to create a new Blazor WASM app.

Sorry for any misunderstanding 🙏

— Reply to this email directly, view it on GitHubhttps://github.com/auth0/auth0-dotnet-templates/issues/39#issuecomment-2465095589, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5B5P2GHSJBJF2BYO6LSWUTZ7TM3NAVCNFSM6AAAAABRKYA3GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRVGA4TKNJYHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

andychiare commented 1 week ago

Hi @RafZen, My initial suggestion to use the ASP.NET Core hosted Blazor WASM template was to see if something changed in this context, but it looks like it was unsuccessful.

As far as I understand, the issue you reported is a Blazor and/or Visual Studio issue, it's not related to Auth0 or the Auth0 templates. Unfortunately, I can't help with this since I don't have the needed knowledge of Blazor and VS internals.

As I suggested to Steve, you should open an issue on the ASP.NET Core repo or ask support from the Visual Studio community