MemberNotNullWhen() attribute won't work with properties in the base class?
I have a method that guarantees a property is not null when the method returns true. [MemberNotNullWhen(true, "CurrentLine")] public bool Read() { } This works fine. But I also have a class that derives from this class, which has a method…
i am opening my pdf which is in local folder in iframe I want to disable printing option in it like user should not able to print or save or right click the pdf but when i disable it, the scrolling inside the iframe is not working
function openBook(bookId, bookPath) { // Encode the bookId and bookPath to avoid URL issues var encodedBookId = encodeURIComponent(bookId); var encodedBookPath = encodeURIComponent(bookPath); // Set the iframe source to load the book var…
WPF PrintDialog: How to Enable and Detect Selected Page Print Feature?
Our WPF application targets .NET 4.8. The WPF application can generate run report which include 12 pages. run report allows print. So far there is no option, and it always prints all 12 pages. we like to add feature to allow select page numbers and only…
Way to retreive the mails
Hi, Is it a good way to use SmtpServer and retrieve all of the mails (of a period) to one mail account? And get all of the details of the mails?
Cannot Assign x:Name to Elements Inside ContentControl in WPF UserControl
Hello, I have created a UserControl in WPF that contains a ContentControl. This ContentControl can accept any external content (Grid, StackPanel, TextBox, etc.). However, when I use the UserControl in another page and try to assign x:Name to elements…
Error when calling a SOAP servie using "OperationContextScope" is failing while succeed on PostMan
I want to make a call to external SOAP service, now the call works well inside Postman, as follow:- But when i tried to do the call inside our .net core 8.0 application i got "Server Error", here is the code:- private async…
How to write C# based Azure Container without starting a Web
Hi all. I need to write an app that connects to a third-party vendor application via a Web Socket. I am using C# in Visual Studio 2022 to write my app. I have it running in my Visual Studio locally. My question: how do I suppress the website window from…
Ho to control "Microsoft.Azure.WebJobs.Script.WebHost.Middleware.SystemTraceMiddleware" logs being sent to my Datadaog?
We have integrated the datadog for capturing the azure function application insights logs. Its taking too much of our datadog resources. How to control that? I tried many methods like putting different values in the host.json, But nothing is…
Entity Framework v8, on SaveChangeAsyc() intserts record twice
public async Task AddAsync<T>(T entity) where T : class { await _dbContext.Set<T>().AddAsync(entity); // use only context and test await _dbContext.SaveChangesAsync(); } On SaveChangesAsync() 1 duplicate record is inserted.
Microsoft Extensibility SDK for C# for SQL Server
https://learn.microsoft.com/en-us/sql/language-extensions/tutorials/search-for-string-using-regular-expressions-in-c-sharp?view=sql-server-ver16 As mentioned in the above link carried out all the steps. However when I execute below command I am getting…
NetworkStream read abends application
I am running into an issue where a read abends my application. Is there a way to handle it in a more soft way so I get the error data, but have it not stop my application. Is it a simply case of changing the LogError functions to a LogInfo? It is…
WPF: Why BackgroundWorker.RunWorkerCompleted Event() throw an exception and main thread does not receive it?
Our WPF application targets .NET 4.8. The AbortableBackgroundWorkder class inherences from the BackgroundWorker class and used as following. there are two background workers: _protocolProcessorBackgroundWorker..DoWork() will call …
Custom fonts not working when uploading Maui Android project to Play Store
I have added custom fonts in the font directory of my Maui project's Resources directory and updated the MauiProgram.cs file accordingly. The fonts work fine when I deploy the application using Visual Studio, but when I publish the app and upload it to…
SSIS Script Task: Split a JSON array into a list
I have a JSON array of the form: "data": [ {"tag1": 1,"tag2": 2,"section1": {"tag3": "Dummy"},"tag4": 3,"array1": ["dummy","dummy"]}, {"tag1":…
Filter on Guid for AppRoleAssignedTo.PrincipalId does not seem to work as expected
See: https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/2306 Describe the bugUsing C# SDK nuget package Microsoft.Graph 5.40.0. Any time we try to create a filter like var userId = "<GUID VALUE>"; if(!Guid.TryParse(userId,…
'The instance of entity type 'Book' cannot be tracked' Error in Entity Framework and Displaying Uncommitted Changes in the UI
Hello, I encountered the following issue while working on my C# WPF project: I make updates to an entity on the UI side but do not send these changes to the database. Later, when listing the entity objects I updated on the UI side, I noticed that…
Linq Cosmos DB ArgumentNullException Exception
I am using LinQ on the client side to query Cosmos DB. All the other properties work fine except two properties. One is the "id" and the other is the "RowKey". I manually checked the database, the type of RowKeys are all string, they…
WPF C# fitting different Screen Sizes
Hi, I'm coding a nice smart tiny app :) and coding on a desktop PC - yesterday Im starting to test a release version and create a setup project - already done. For testing I put the setup file on my old notebook - and ahhhhhhh can't believe it. My…


How to set clipboard data with the image that is not local when setting?
Hi, I'm trying to implement a feature, "copy" operation in my web APP will call C# dll API to set the image files data into clipboard, the image files don't exist locally, when user do "paste" operation, the app downloads the image…
SSIS DT_TEXT column contains alternating CHAR(0) characters
I have an SSIS package that is pulling JSON data from a REST source. This was originally pulling data as (DT_STR, 8000, 1252) and writing to a [varchar] column but we have started getting a couple of values than will not fit. I have changed the source to…