Blazor
31 TopicsProblems running application in .Net MAUI after upgrade from .Net 6 to .Net 8
Good morning, The organization I work for has been developing a Maui-Blazor hybrid application. We were able to install it and it was working through our deployment process when we were using .Net 6.0. After the upgrade to .Net 8.0, it will no longer run on some of the machines. We are using Panasonic CF-33 toughbooks with the same clones on them. They have the same hardware specs. We have tried completely uninstalling the application, we've removed any runtimes from .Net and then did complete reinstalls of the runtimes. We've installed .Net Desktop Runtime and the .Net 8 runtime. We've reinstalled the application. There are no errors in the event viewer when we launch the application. When the application is launched from the start menu (either as admin or regular) the cursor spins for a moment and nothing happens. We've added logging in the startup pipeline of the application after we initially documented this behavior and deployed that and it's not even getting to the logging to log anything. Occassionally we get a kernelbase.dll error in the event viewer when launching but it's not consistently there. Some of the machines it opens on and some it doesn't. We are unable to find any discrepancies between the devices ie, same release of windows 10, same runtimes, etc. I would appreciate if anyone could comment on this for some tips or maybe something we could try. I have noticed that through the various installs (incrementing version/release) there are several folders created in the WindowsApps folder that are for the previous versions even if we have uninstalled them. We thought maybe that could be causing a problem. Thanks for your time and hope to hear from someone soon. Have a great day!589Views0likes2CommentsMoved auth db from localdb to mssql now I get a cert error
here is the error SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) I did an export in ssms from localdb to the new sql databasse then changed the default connection303Views0likes3CommentsThe type or namespace name 'MauiAppCompatActivity' could not be found
I have just installed Visual Studio 2022 Preview today (March 1st, 2022) and tried to create a Maui Blazor project. Using the default install and template, compiling gives the above error. It also gives errors on the namespace 'Android" not being found. Guessing that it could be an NDK issue, I could not find the location to specify the Android NDK in the Options. I would appreciate if anyone can point me in the right direction. Thank you in advance.2.4KViews0likes2CommentsAdding Fluent Web App as a distributed Application in .NET Aspire
It demands to set blazor hosting model: Try this: create Aspire project, Add Fluent Web App register the app as aproject, Run it. herr is my error: Unhandled exception. System.AggregateException: One or more errors occurred. (Method not found: 'Void Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration.set_HostingModel(Microsoft.FluentUI.AspNetCore.Components.BlazorHostingModel)'.) ---> System.MissingMethodException: Method not found: 'Void Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration.set_HostingModel(Microsoft.FluentUI.AspNetCore.Components.BlazorHostingModel)'. at Aspire.Dashboard.DashboardWebApplication.<>c.<.ctor>b__7_2(LibraryConfiguration options) at Microsoft.FluentUI.AspNetCore.Components.ServiceCollectionExtensions.AddFluentUIComponents(IServiceCollection services, Action`1 configuration) in /_/src/Core/Extensions/ServiceCollectionExtensions.cs:line 42 at Aspire.Dashboard.DashboardWebApplication..ctor(ILogger`1 logger, Action`1 configureServices) in /_/src/Aspire.Dashboard/DashboardWebApplication.cs:line 93 at Aspire.Hosting.Dcp.DcpHostService..ctor(DistributedApplicationModel applicationModel, DistributedApplicationOptions options, ILoggerFactory loggerFactory, IOptions`1 dcpOptions, IOptions`1 publishingOptions, ApplicationExecutor appExecutor, Locations locations, KubernetesService kubernetesService) in /_/src/Aspire.Hosting/Dcp/DcpHostService.cs:line 60 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Aspire.Hosting.DistributedApplication.RunAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/DistributedApplication.cs:line 139 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Aspire.Hosting.DistributedApplication.Run() in /_/src/Aspire.Hosting/DistributedApplication.cs:line 147 at Program.<Main>$(String[] args) in C:\Users\heris\source\repos\AspireApp1\AspireApp1.AppHost\Program.cs:line 5 C:\Users\heris\source\repos\AspireApp1\AspireApp1.AppHost\bin\Debug\net8.0\AspireApp1.AppHost.exe (process 7436) exited with code 0. To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. Press any key to close this window . .554Views0likes0CommentsProblems with developing blazor teams tab app using teams tools kit
I'm following the tutorial here to deploy teams app using the teams toolkit https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/toolkit-v4/create-new-project-vs?pivots=visual-studio-v17-7 I'm currently having problems using the graph of the signed in user, I get the error {"Failed to get access token from OAuth identity server, please login(consent) first"} I'm unable to acquire an access token from the OAuth identity server to make Microsoft Graph API calls, despite the user being authenticated successfully. The specific error message is: "Failed to get access token from OAuth identity server, please login(consent) first", which occurs even after the user has logged in and consented to the required permissions. To Reproduce Steps to reproduce the behavior: User logs in successfully using TeamsUserCredential. Attempts to call Microsoft Graph API (e.g., graph.Me.Events.GetAsync()). Receives an error indicating that the access token is not available, suggesting a consent/login issue. This occurs despite ensuring the user has authenticated and consented to the necessary scopes. Expected behavior After successful user login and consent, the app should be able to acquire an access token and make calls to the Microsoft Graph API without encountering the mentioned error. Screenshots (Attach any relevant screenshots that might help to understand the issue better.) Additional context The GetUserInfoAsync() call works as expected, confirming that the user is authenticated. However, subsequent calls to Microsoft Graph API fail due to the access token issue. The required Microsoft Graph permissions have been configured in the app registration in Azure AD, and admin consent has been granted where necessary. This issue seems to be a blocker for accessing the Microsoft Graph API despite following the authentication and consent flow as outlined in the TeamsFx documentation. here's the code snippet try { IsLoading = true; var user = await teamsUserCredential.GetUserInfoAsync(); await teamsUserCredential.GetTokenAsync(new TokenRequestContext(_scopes), new System.Threading.CancellationToken()); var graph = GetGraphServiceClient(); var test = await graph.Me.Events.GetAsync(); Profile = await graph.Me.GetAsync(); UserPhotoUri = await GetPhotoAsync(graph); } catch(Exception ex) { throw ex; } this code is called after this await teamsUserCredential.LoginAsync(_scopes); anyone got any idea of what is going on?494Views0likes0CommentsIssue Retrieving File Content from SharePoint Using Microsoft Graph API - Seeking Resolution
Hello Microsoft Tech Community, I am facing a problem while attempting to retrieve the content of a file saved on SharePoint using the Microsoft Graph API. I have tried multiple approaches, but unfortunately, I am encountering errors. Approach 1: var fileContentStream = await graph.Shares[drive.WebUrl].DriveItem.Content .Request() .GetAsync(); Error: "Resource not found." Approach 2: var fileContentStream = await graph.Drives[drive.ParentReference.Id] .Root .Request() .GetAsync(); Error: "Malformed drive.ParentReference.Id." Approach 3: var fileContentStream = await graph.Groups[groupId] .Drives[drive.ParentReference.Id] .Items[drive.Id] .Content .Request() .GetAsync(); Error: "Malformed drive.Id." It's worth noting that the file I am attempting to access is confirmed to exist on SharePoint and is accessible through the SharePoint interface. I have verified the correctness of the drive.Id and drive.ParentReference.Id with the file saved on SharePoint, and they match. I would appreciate any insights, guidance, or solutions the community can provide to help resolve this issue. Thank you in advance for your assistance.334Views0likes0CommentsSuggestions on a music player app
Could someone please suggest how to start a app that plays music locally on a windows machine running a playlist but can be controlled on the LAN using a Blazor screen ? I'm not yet concerned with the Blazor app hearing audio, just controlling the player. Able to to see what is playing, hit play, edit the playlist etc. I'm guessing the player could be a console app with a SQLite database for the playlist, then the Blazor app would connect to the same database and make changes? Would this be Blazor Wasm ? Would a separate console player be best? Any suggestions appreciated.1KViews0likes1CommentWhat Visual Studio template would you use to build a web/mobile app?
If starting from scratch, what Visual Studio template would you use to build a web/mobile app? I'm confused with all the choices now. There was Xamarin to port to Apple and Google stores, but then Blazor WebAssembly for (sort of) native apps on any device (without having to go through app stores). And now MAUI but wait there's MAUI Hybrid (I think that's MAUI using Blazor instead of XAML?). New tools come (and many of them go). Just wondering what is the most common/recommended type of Visual Studio project for a web/mobile app these days (that would run on all devices, whether browser based or native). -thanks544Views0likes0Commentswhich stack for MAUI IOS/Android apps with offline support to backend Web App / App API?
Which set of Microsoft tecnologies would be recommended for this? * System that has a Web Interface, as well as MAUI cross platform IOS/Android app. * Central database for Web Interface (can be ASP .NET API) which IOS/Android apps can sync to * IOS/Android apps have offline capability with Sqlite (using EF Core), but can elect to "sync" to the backend API/database when available * Ideally would be nice for some views in the Website to share components with MAUI mobile apps, perhaps through the Blazor Hybrid approach Questions: Q1 - Is there an automated way of handling the "sync" from the MAUI mobile apps back to the backend database? I see there is a "Offline data sync is an SDK feature of Azure Mobile Apps" available, however I am not sure this would be appropriate/work if I'm trying to sync the database back to my system backend database (also used directly by the web application)? Q2 - Any other advice / tips. My thoughts were to use the following perhaps: * ASP .NET API with database (SQL server) * Blazor Web App * MAUI cross platform mobile apps (IOS/Android) [perhaps with Blazor Hybrid to share views?] * [mainly not sure about any good MS approaches to handle the mobile app offline/sync aspect that does fit into this mix]579Views0likes0Comments