Microft TechCommunity » .NET
59 FOLLOWERS
Your community for how-to discussions and sharing best practices for building any app with .NET. If you're looking for answers to technical questions, visit Microsoft Q&A. Here you can ask questions about .NET runtime, language, app development, web development, data, tools and more.
Microft TechCommunity » .NET
2d ago
Hi Team
i Team
How do i prevent other values when selected from the combo-box(comp1, comp2, comp2, truck-full, truck-return etc and these are queried from database as Dataset for them to filtered) if they are selected they must not gett into this if statement. Only required compartment(truck-empty) purpose('Leaving-Finished Product') must be the only onces get executed. The current code seem to be doing slight but not 100% percent being correct. Let me share this method below;
private void btnSaveTicket_Click(object sender, RoutedEventArgs e) { try { if (txtFullWeight.Text ..read more
Microft TechCommunity » .NET
3d ago
I'm building a Blazor server application for an internal company use and using Windows authentication. The app is supposed to field updates from another app via an exposed controller. I am trying to test the controller and getting a 401 unauthorized however I try to hit it (Postman, browser, test Console app, from within the Blazor server app itself, etc.). I'm running .NET 6 and scaffolded the app using Visual Studio and selecting Windows Authentication from the Create Project wizard for Blazor server app. I'm running the app from Visual Studio using IIS Express option. Here is the simple tes ..read more
Microft TechCommunity » .NET
3d ago
There is pcshll.dll in hllapi in .net. This DLL file is present in the code but still system throws exception "System.DllNotFoundException: 'Unable to load DLL 'C:\Windows\SysWOW64\pcshll32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E ..read more
Microft TechCommunity » .NET
5d ago
Some time ago, the ability to create a function which has multiple return values was created. Yes, I know this can be avoided by using out... but I was curious. In traditional method calls, the return value can be ignored by not assigning the return value to a variable. I recently decided to use multiple return values in a new method because I wanted to avoid having to worry about the method call when the return value isn't always used. Turns out that may have been an oversight on my part, since I as far as I know, I still have to define a return value. For exampl ..read more
Microft TechCommunity » .NET
5d ago
I'm targeting .NET Framework 4.8, mainly because I sometimes have to interact with Access databases and I assume I have a better chance of that working for framework than .NET Core.
When deployed, I want this API to pick up any credentials it needs from environment variables but I would like to be able to test it locally, so I'm trying to find the best place to store the credentials without checking them in.
I have read this and similar articles - user secrets seems like a reasonable solution, maybe there are better ones.
https://learn.microsoft.com/en-us/aspnet/core/security/app-secr ..read more
Microft TechCommunity » .NET
6d ago
Hello,
We are currently trying to integrate the UET (Universal Event Tracking) SDK ([Microsoft.BingAds.UETSdk](https://www.nuget.org/packages/Microsoft.BingAds.UETSdk)) into our UWP product. We have been following the documentation closely, but we encounter an issue as soon as we implement the step "Import all of the .NET Native / CoreCLR props" from [this guide](https://learn.microsoft.com/en-us/advertising/guides/windows-app-uet-sdk?view=bingads-13#cpluspluswinrt). After adding this step, when we attempt to submit our UWP package to the Windows Store, we receive the error: "You cannot submit ..read more
Microft TechCommunity » .NET
6d ago
Hi there
Is there a viable workflow for continued development of an existing ASP dot NET Web Forms application just using the command line, a text editor and a web browser, without running Visual Studio (at least not all the time)?
Since Web Forms do not run on dot Net Core, a Windows machine (physical or virtual) is required. The work is being done on a non-Windows machine, and connecting in to the Windows machine via Remote Desktop to run Visual Studio is not a preferred option (though it may be the only viable one, and is what I am doing currently).
In principle working ..read more
Microft TechCommunity » .NET
6d ago
Given the following markup:
<Wizard Title="Add workplace" OnSave="PersistWizardData">
<WizardStep Title="Checklist">
<AddWorkplaceWizardStepChecklist />
</WizardStep>
<WizardStep Title="Locate workplace">
<AddWorkplaceWizardStepLocateWorkplace />
</WizardStep>
<WizardStep Title="Workplace details">
<AddWorkplaceWizardStepChecklist />
</WizardStep>
<WizardStep Title="Amenities">
<AddWorkplaceWizardStepLocateWorkplace />
</WizardStep>
<WizardStep Title="Photos">
<AddWorkplace ..read more
Microft TechCommunity » .NET
1w ago
Executing following code on .NET MAUI causes the application to crash.
public async Task<bool> ShowAsync(string fileName, byte[] bytes, SaveFilePickerOptions options) { ArgumentNullException.ThrowIfNull(options); FileSavePicker fileSavePicker = new() { SuggestedStartLocation = PickerLocationId.DocumentsLibrary, SuggestedFileName = fileName, }; foreach(var item in options.WindowsFileTypes) { fileSavePicker.FileTypeChoices.Add(item.Key, item.Value); } if(MauiWinUIApplication.Current.Application.Windows[0].Handler.PlatformView is MauiWinUIWindow window) { InitializeWithWindow.In ..read more
Microft TechCommunity » .NET
2w ago
I'm developing a Maui app with shell navigation and modals, and I'm encountering an issue with overlapping window titles. When navigating from the main page to another page using shell navigation, a back button appears, causing the window title to shift slightly to the right. However, when I push a modal on that page, the window title on the modal page remains in its original position. This results in both window titles overlapping and creating a visually awkward effect.
I've attached images for reference
Any insights, code snippets, or suggestions would be immensely helpful. Thank you ..read more