HttpClient // Timeout // The remote name could not be resolved
Hello, The remote name could not be resolved using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(System.BaseAddress); client.Timeout = new TimeSpan(0, 0, System.Timeout); public void Exception(Exception ex, string…
Why can't I create an account in Azure?
Why can't I register a me to Azure? My phone number is not accepted. It says that I shouldn't add my country code, which I haven't done either. I've tried with both my phone numbers but it doesn't work!
How to know whether the snap applied in windows 11 windows. Is there any API.
Is there a method or any API to tell if snap is enabled or disabled in Windows 11? Please answer if there is any other way.
EntraID Application User Custom Properties
I am developing an online business portal for Employees at 100+ locations around the country. Each location has a LocationCode and orders and customer data are related to the location code in ERP databases. I am currently using EntraID Application…
Why is CS0472 just a warning?
I found a warning CS0472 from the C# compiler. I have this in my code: List<string> list = GetList(); if (list.Count == null) // CS0472 DoA(); else DoB(); Why is it just a warning? IntelliSense tells me that this expression is always…
SqlDataReader error “Invalid attempt to read when no data is present”
My environment used is Visual Studio 2022 v17.12.4. Language is C# and connecting to SQL Server Express v16.0.1135.2. This is a Windows form using .Net Framework 4.8.1. I am getting the error message “Invalid attempt to read when no data is present”…
How to fix SystemLoadExecption
Exception has occurred: CLR/System.TypeLoadException An unhandled exception of type 'System.TypeLoadException' occurred in Winappli.dll: 'Could not load type 'Microsoft.Toolkit.Uwp.Notifications.NotificationActivator' from assembly…
The type or namespace 'SharePointOnlineCredentials' could not be found.
How do you resolve this error? I installed SharePoint.Client and SharePoint.Client.Runtime. I referenced Microsoft.SarePoint.Client in my app.
C# Array - getting "System.IndexOutOfRangeException" but dont understand why.
Hi namespace ConsoleApp3 { internal class Program { static void Main(string[] args) { string[] personNamn = new string[3]; personNamn[0] = "A"; personNamn[1] = "B"; personNamn[2] =…
How to Save a WPF DataGrid Back to Database after Editing
Hi, I am wondering if theirs a way to save a updated Line from WPF DataGrid back to Database . I don't Know the best way to do this without going back to WinForms Apps. I would like to use WPF, any help would be appreciated.
Unable to Post a Message to Teams Channel with Graph API Client + C#
Hi, We are trying to post a message to teams channel, with Channel.SendMessage delegated permissions. And here is the code snippet. var options = new OnBehalfOfCredentialOptions { AuthorityHost = AzureAuthorityHosts.AzurePublicCloud, ``` }; var…
Windows Community Toolkit AdaptiveGridView incorrect behavior
Hi, has anyone had this problem when using AdaptiveGridView (Win UI platform). The elements do not want to expand to occupy the full width available for them in the row (I attach a photo). I'll leave you the code for setting the AdaptiveGridView so that…
Issue with "Mandatory" package update status in Microsoft Store
Hi, I am experiencing an issue with the Microsoft Store incorrectly reporting "Mandatory" package update status in some of my UWP applications. Following the official documentation, I implemented an update flow in my application that provides…
I get a permissions error sending email with MS Graph
I am getting a permissions error and not able to find an answer. To be sure, I even set up a second new Azure portal and subscription, again followed the instructions, again got the same error. I must be missing something basic. One of the issues I guess…
How to fix StackOverflowException when using the C# Graph SDK
At the moment we are struggling with the API connection used by the Microsoft Graph SDK for C#. I can't find any code which should generate a System.StackOverflowException and the calls that the SDK makes work most times and sometimes it just gives the…
How to create Excel file with Visual Studio 2022 and C#
I'm working with Visual Studio 2022, Project WPF C# with .Net 6.0 and Entity Framework Core. DataBase MS SQL Express.I have also a valid and active licence Microsoft Office 365. I try to Create an Excel File but I have different error msg (see…
How to upload a file from my local computer to a Sharepoint folder
Hi, I´m using something like this: string userName = “nelson.soares@********.pt”; string password = “*********”; var securePassword = new SecureString(); foreach (char c in password) { securePassword.AppendChar(c); } using (var…
As per Official Documentation we can get Get Selected Fields ,but using solution(Provided by : https://learn.microsoft.com/en-us/graph/api/listitem-list?view=graph-rest-1.0&tabs=csharp) can not get desired output
I want to get below result [ { "@odata.etag": "\"65dba275-af1c-4ff4-b85b-4afde8046f07,10\"", "id": "11", "fields@odata.context":…
Textbox for input password then need save some place
using System; using System.Windows.Forms; public class PasswordForm : Form { private TextBox passwordTextBox; public PasswordForm() { // Initialize the TextBox passwordTextBox = new TextBox(); …
How to get the current page number or check if PDF viewer is on the Last page of a PDF in WPF Webview2 control?
I am working on a WPF application where I use Webview2 to display PDF files. I rely on Edge's built in PDF rendering mechanism and am not using any external PDF libraries. I've successfully loaded the PDF using the following…