Recent Discussions
Just built my first microservice API, and it's hacky. Any examples to follow?
I just finished building my first microservices-based API, and it's ugly. Are there any online source examples that include two (or more) API microservices communicating with each other over a message bus, that also include authentication using both a local authentication database and/or OpenID Connect?11Views0likes0CommentsAdd AWS Cognito authentication to a Blazor WebAssembly standalone app
I cannot find a step by step guide for using AWS Cognito in a Blazor WebAssembly standalone app for net 8 Microsoft did produce a guide but not for Cognito. I did find a very good guide for adding Cognito but to a Blazor web app which does require a server.514Views0likes1CommentHow to decouple views from view models using CommunityToolKit.mvvm
I am writing my first MVVM app using CommunityTookit.mvvm. I am using as reference the Micrsoft Learning link https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/ioc. This link shows the setting of the viewmodel to the view DataContext using the following statement in the view's .cs file: this.DataContext = App.Current.Services.GetService<ContactsViewModel>(); The problem with this as I see it is that this statement couples the view to the view model, in this case ContactsViewModel. This means that in another app the view cannot be used with another viewmodel without modifying the view, i.e. changing ContactsViewModel above to another viewmodel type. This means that the view cannot be stored in a common library that is shared among different apps. There is a C# Corner example with the older MVVM TookKit that solved this problem using a ViewModelLocator class. This project is found https://www.c-sharpcorner.com/article/getting-started-with-mvvm-light-with-wpf/. The solution is to put the following code in the view's XAML file: DataContext="{Binding Main, Source={StaticResource Locator}}" The source object for the binding is found by looking for a ResourceDictionary that is in the scope of the view and which has an entry whose key is "Locator". In app.xaml which by definition is always in scope we have: <Application.Resources> <ResourceDictionary> <vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" /> </ResourceDictionary> </Application.Resources> The Dictionary element with key "Locator" is an object of type ViewModelLocator. In the ViewModelLocator class there is a Main property that always returns an instance of MainViewModel: public MainViewModel Main { get { return ServiceLocator.Current.GetInstance<MainViewModel>(); } } In our example, the view's DataContext binds to the Main property of the ViewModelLocator object. The value of the Main property is a MainViewModel object and this becomes the DataContext of the view. We can now in a different app re-use the view without changing it. All we have to do in the next app is to create a different ViewModelLocator object that specifies a different viewmodel in its Main property. The view is now completely decoupled from the view model. My question is, how would we de-couple the view from the view model using the CommunityToolkit.Mvvm? Do we also use a ViewModelLocator class? Is there a more elegant way with dependency injection? Another question I have is, suppose we want to use in one app the same view twice with different view models. An example of where we might want to do this is if we had a view that displayed a chart. It is conceivable that we might want to have more than one view model display its data using the same chart view. I cannot see how to do this in either of the above Microsoft or C# Corner examples.46Views0likes1CommentBlazor has turned out to be a massive disappointment, will it ever get Windows Authentication?
Blazor is a technology I've been hearing about for a couple of years. It sounds like it would be great, especially for not having to write any JavaScript code, unless it is absolutely necessary. I maintain a very old classic ASP.NET WebForms application which has a lot of issues that greatly add technical debt. I have finally convinced my management to let me rewrite this application, and it was my intention to use Blazor in .NET 8. I started a few weeks back. The number one thing is this app MUST use Windows Authentication as it is an Intranet app, working within our corporate firewall. No exceptions!!! I thought at one point that I had found a solution, but then I discovered that when creating the project and selecting Windows Authentication, Visual Studio was changing it from .NET 8 to .NET 6. That took me more than a week to discover that had happened. I have tried, multiple ways of getting Windows Authentication with IIS to work with a Blazor Server App and .NET 8. However, today I realized that is a broken dream. That I am wasting my time and need to give it up. Perhaps someday Microsoft will get around to bringing that back to a current version of .NET, but I need a solution today, not in November when .NET 9 comes out and hope that it brings Windows Authentication with Blazor Server, or some year in the future. This is very disappointing. So, I think the only choice I have at this point, is to go back to ASP.NET Core with .NET 8. I have heard that it is possible to embed Blazor components into ASP.NET Core/Razor pages, so that is an option, I hope. That way I can have ASP.NET Core MVC do the Windows Authentication and use Blazor components here and there. But I don't know how to do that and trying to find some training on how to do that is difficult. I am asking for recommendations/guidance to training either on Microsoft Learn, Pluralsight, or YouTube so I can learn how to do this and move forward. Thank you very much in advance, for your help.671Views0likes1Comment[Suggestion 1][Allow Language Selection During .NET Installation]
Hi, 1. Context: Currently, when installing the .NET SDK or runtime, multiple language resource folders are automatically included in the installation directory. 2. Problem: Many developers only require a single language, typically English and the additional localization files take up unnecessary disk space and clutter the installation directory. Currently, the installer does not provide an option to select which languages should be installed. Removing these manually is time-consuming and could potentially break application dependencies if done incorrectly. 3. Proposed Solution: Introduce an option in the .NET installer that allows users to select or deselect language packs during installation. This feature could be similar to the "Individual components" selection available in the Visual Studio Installer, where users can choose exactly what they need, ensuring a more streamlined installation. This would help: Reduce disk space usage. Improve installation customization. Provide a cleaner development environment. 4. What do you think about this suggestion ? Thank you for considering this request and I’m happy to provide additional details or insights if needed.81Views1like1CommentSimple Guide On Effective Use Of Parallel Programming For C# In A Managed Code Environment:
Parallel programming in C# uses a variation of Managed Threading, that relies on PLINQ, Expression Trees, The Barrier Class, Thread Class, BackgroundWorker Class, SpinWait Struct, SpinLock Struct, and Thread-Tracking Mode for SpinLock. The reason is that it's faster to use the environment to determine how many cores / threads are available, as to not starve the device of resources, which at that point, you have to use the BackgroundWorker Class to manage each task you've created. Often in this scenario, you can end up with a deadlock condition, because you have more than one task trying to access a shared resource. It's much easier and faster to split up each task, ONLY using byte arrays, assigning each task individual byte arrays to sort / parse, encrypted or not, with the Stream class, or a sub variation of that Class, and then when each task finishes, they all finish at different times, but the shared resource is divided up into portions, so that they will only be able to fill one area of that array. The reason why Barrier is used in this situation, is it forces each one to wait until all the tasks are finished, or until they all ARRIVE at the same place, which solves one timing issue, yet it might create another where there's a bit of a timing mismatch if your estimates are wrong, you overshoot or undershoot I mean. At the very end, you can use a separate process to just COPY from each individual array, without a deadlock scenario occurring. The only issue, is you have to estimate how many threads are available ahead of time, and you can't use every single thread, yet you're going to have to divide a single resource between all those threads. Beforehand, you have to verify if it's a waste of time to use more than one thread. The reason why I say this, is that a lot of people use reference types, not knowing they are immutable, and they take a huge / massive performance hit because of this. Often you have to convert strings into byte arrays, or use a pre-initialized character array at the start of the program, which contains the Unicode values that you want to recast individually as strings, and then use a byte array as an INDEX or a placeholder, of a Unicode character array. If you’re not encrypting the byte arrays, or using them for text parsing, which byte arrays tend to be best in high throughput scenarios, than integer arrays will suffice. The index can be scrambled based on how you want to represent that one string, though it's smarter to only cast a new reference type when you want to display text on the screen. If you spend too much time manually parsing using built-in libraries, it's REALLY SLOW. A byte array is better to use than an integer array in this sort of situation. You might have to create separate indexes with a byte array representing a set of binary flags, to determine whether each one is a letter, number, symbol, etc, or how you want to classify each one based on the code chart that you're using. You would be better off in that situation to just use right shift / left shift / XOR, etc, to set the flags. Then you have something which is also very fast, and almost equivalent to a Barrel Shifter, given C# does not allow you to use pointers, as it's managed code / a managed environment. All the Boolean Logical Operators with Compound Assignment rely on pre-initialized Cast Expressions of Integer Literals, Bitwise and Shift Operators, combined with Lambda Expressions, and Operator Overloading. The purpose of the Shift Operators is to mask / pad the bits of one byte value with zeroes, so that your Cast Expression Of An Integer Literal, which serves at the mask, always gives you a fixed / deterministic result, when used in conjunction with Boolean Logical Operators, especially if the value is smaller than 8-bits / a single byte, or you're dealing with a larger array has to represent a flag "register" with a size of ( 2 ^ 8 ) 256 bits, which is basically a Double-Word: "Microsoft Learn - Boolean logical operators - AND, OR, NOT, XOR - Compound assignment" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/boolean-logical-operators#compound-assignment" "Microsoft Learn - Bitwise and shift operators (C# reference)" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/bitwise-and-shift-operators" "Microsoft Learn - Operator overloading - predefined unary, arithmetic, equality and comparison operators" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/operator-overloading" "Microsoft Learn - Lambda expressions and anonymous functions" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions" "Microsoft Learn - Integral numeric types (C# reference) - Integer literals" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types#integer-literals" "Microsoft Learn - Type-testing operators and cast expressions - is, as, typeof and casts - Cast expression" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/type-testing-and-cast#cast-expression" "Microsoft Learn - Deserialization risks in use of BinaryFormatter and related types" -> "https://learn.microsoft.com/en-us/dotnet/standard/serialization/binaryformatter-security-guide" "Microsoft Learn - BinaryReader Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.io.binaryreader?view=netframework-4.0" "Microsoft Learn - Stream Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=netframework-4.0" "Microsoft Learn - StreamWriter Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.io.streamwriter?view=netframework-4.0" "Microsoft Learn - StreamReader Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.io.streamreader?view=netframework-4.0" "Microsoft Learn - File and Stream I/O" -> "https://learn.microsoft.com/en-us/dotnet/standard/io/" "Microsoft Learn - Pipe Functions" -> "https://learn.microsoft.com/en-us/windows/win32/ipc/pipe-functions" "Microsoft Learn - System.IO.Pipes Namespace" -> "https://learn.microsoft.com/en-us/dotnet/api/system.io.pipes?view=netframework-4.0" "Microsoft Learn - Custom Partitioners for PLINQ and TPL" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/custom-partitioners-for-plinq-and-tpl" "Microsoft Learn - Expression Trees" -> "https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/expression-trees/" "Microsoft Learn - Build expression trees" -> "https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/expression-trees/expression-trees-building" "Microsoft Learn - Translate expression trees" -> "https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/expression-trees/expression-trees-translating" "Microsoft Learn - Execute expression trees" -> "https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/expression-trees/expression-trees-execution" "Microsoft Learn - System.Windows.Threading Namespace" -> "https://learn.microsoft.com/en-us/dotnet/api/system.windows.threading?view=netframework-4.0" "Microsoft Learn - System.Threading Namespace" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading?view=netframework-4.0" "Microsoft Learn - System.Threading.Channels Namespace" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.channels?view=netcore-3.0" "Microsoft Learn - System.Threading.Tasks Namespace" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks?view=netframework-4.0" "Microsoft Learn - Timer Class (System.Timers)" -> "https://learn.microsoft.com/en-us/dotnet/api/system.timers?view=netframework-4.0" "Microsoft Learn - Timer Class (System.Threading)" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.timer?view=netframework-4.0" "Microsoft Learn - DispatcherTimer Class (System.Windows.Threading)" -> "https://learn.microsoft.com/en-us/dotnet/api/system.windows.threading.dispatchertimer?view=netframework-4.0" "Microsoft Learn - Dispatcher Class (System.Windows.Threading)" -> "https://learn.microsoft.com/en-us/dotnet/api/system.windows.threading.dispatcher?view=netframework-4.0" "Microsoft Learn - Threads and threading" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/threads-and-threading" "Microsoft Learn - Using threads and threading" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/using-threads-and-threading" "Microsoft Learn - Introduction to PLINQ" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/introduction-to-plinq" "Microsoft Learn - Task Parallel Library (TPL)" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/task-parallel-library-tpl" "Microsoft Learn - Lambda Expressions in PLINQ and TPL" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/lambda-expressions-in-plinq-and-tpl" "Microsoft Learn - Multithreading in Windows Forms Controls" -> "https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/multithreading-in-windows-forms-controls" "Microsoft Learn - Managed threading best practices" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/managed-threading-best-practices" "Microsoft Learn - Parallel programming in .NET: A guide to the documentation" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/" "Microsoft Learn - Thread Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.thread" "Microsoft Learn - BackgroundWorker Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.backgroundworker" "Microsoft Learn - Synchronizing data for multithreading" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/synchronizing-data-for-multithreading" "Microsoft Learn - Overview of synchronization primitives" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/overview-of-synchronization-primitives" "Microsoft Learn - Environment.ProcessorCount Property" -> "https://learn.microsoft.com/en-us/dotnet/api/system.environment.processorcount" "Microsoft Learn - Managed threading best practices - Number of Processors" -> "https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-1.1/1c9txz50(v=vs.71)#number-of-processors" "Microsoft Learn - lock statement - ensure exclusive access to a shared resource" -> "https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/lock" "Microsoft Learn - Reliability Best Practices" -> "https://learn.microsoft.com/en-us/dotnet/framework/performance/reliability-best-practices" "Microsoft Learn - BackgroundWorker Component Overview" -> "https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/backgroundworker-component-overview" "Microsoft Learn - How to: Run an Operation in the Background" -> "https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-run-an-operation-in-the-background" "Microsoft Learn - Thread-safe collections" -> "https://learn.microsoft.com/en-us/dotnet/standard/collections/thread-safe/" "Microsoft Learn - Threading objects and features" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/threading-objects-and-features" "Microsoft Learn - Barrier" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/barrier" "Microsoft Learn - Barrier Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.barrier?view=netframework-4.0" "Microsoft Learn - SpinWait" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/spinwait" "Microsoft Learn - SpinWait Struct" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.spinwait?view=netframework-4.0" "Microsoft Learn - SpinLock" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/spinlock" "Microsoft Learn - SpinLock Struct" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.spinlock?view=netframework-4.0" "Microsoft Learn - How to: use SpinLock for low-level synchronization" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/how-to-use-spinlock-for-low-level-synchronization" "Microsoft Learn - How to: Enable Thread-Tracking Mode in SpinLock" -> "https://learn.microsoft.com/en-us/dotnet/standard/threading/how-to-enable-thread-tracking-mode-in-spinlock" "Microsoft Learn - Chaining tasks using continuation tasks" -> "https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/chaining-tasks-by-using-continuation-tasks" "Microsoft Learn - Interlocked Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked?view=netframework-4.0" "Microsoft Learn - TaskFactory Class" -> "https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskfactory?view=netframework-4.0"319Views0likes2CommentsDeeply Disappointed with Copilot+
At the company where I work, we purchased a Copilot+ laptop with the hope of being able to use the new Windows AI libraries, such as Windows.AI.TextRecognition. The library works well, but we are unable to process more than 2 documents concurrently, which severely limits our document processing capacity. We also feel misled, as we did not see any mention anywhere of such a limitation regarding the library. I would appreciate it if a Microsoft representative could confirm whether this limitation exists and, if not, let us know if there is any way to increase this limit. Thank you in advance.36Views0likes1CommentDo I need to upgrade Microsoft.AspNetCore.* NuGet packages after upgrading the .NET Runtime?
Hi, I'm encountering an issue with our SCA (Software Composition Analysis) scan, which reports several known vulnerabilities in .NET Core components. Specifically, the scan detects that the following packages are still on version 8.0.0, which are flagged as vulnerable: Microsoft.AspNetCore.Authorization Microsoft.AspNetCore.Components Microsoft.AspNetCore.Http.Connections.Client Microsoft.AspNetCore.SignalR.Client The scanner recommends upgrading these packages to version 8.0.15 to resolve the issues. To address this, I upgraded the .NET Runtime on our environment to version 8.0.15. However, the SCA scan still reports the same vulnerabilities, indicating that the vulnerable component versions have not changed. My question is: Do I also need to manually upgrade the corresponding NuGet package versions in the project to 8.0.15, or is upgrading the .NET Runtime alone sufficient to ensure these components are updated as well? Any clarification would be appreciated. Thank you!36Views0likes0CommentsProblem with the startswith function in NET 9
Hi everyone, I have this request with Odata: http://localhost:5194/NationalStates?$filter=startswith(state, 'NE') This works correctly up to version 8.0.14 for the following packages: MySql.EntityFrameworkCore Microsoft.Extensions.DependencyInjection.Abstractions Microsoft.EntityFrameworkCore among others... When I update these packages to version 9.0.0 or later, they stop working and give an internal mapping error. Any clues about this?53Views0likes0CommentsWebView download in .NET MAUI
Hi everyone, I'm Manuel. I need to create an application which downloads a file from web site. I used a WebViewer and allowed into AndroidManifest.xml external memory read and write. Everything works fine until I press the download button from the website: nothing happens. I simply defined a webview into my MainApp.xaml.cs file (because it must be dynamic) and added into my GridLayout. I tried to print external memory read/write permissions, but it says it's not allowed. Can anyone help me? I'm locked here from weeks and don't know how to solve. Thank you so much505Views0likes1CommentApplications are not correctly detecting .NET Desktop Runtime 6.0.1 (x64)
Even though I have .NET Desktop Runtime 6.0.1 (x64) installed, I'm still getting an error when launching a .NET application Windows 10 21H2 OS Build 19044.1466 Event log shows event 1023 - Description: A .NET application failed. Application: HandBrake.exe Path: C:\Program Files\HandBrake\HandBrake.exe Message: Failure processing application bundle. Bundle header version compatibility check failed. A fatal error occured while processing application bundle8.8KViews0likes7CommentsHelp with my ASP.NET API Application
I have been developing API for a full stack application with React FrontEnd in ASP.NET for my Internship project which is an Asset Management System. I have successfully implemented API Endpoints for CRUD with Authentication with JWT. What topic should I learn next ? Should I start providing API Documentation or is there something else I need to learn ? I have also uploaded the Schema the project is using. I am using ADO.NET instead of Entity Framework for quering with the database. The link to my Repository Source Code: https://github.com/bibashmanjusubedi/Internship85Views1like1CommentSupercharging Solution Architecture with GitHub Copilot Prompts Every Architect Should Know
As a Solution Architect, you’re often juggling high-level system design, reviewing code, drafting technical documentation, and ensuring that your solutions meet both business and technical requirements. GitHub Copilot, powered by advanced AI, isn’t just for developers—it can be a powerful assistant for Solution Architects too. In this blog, we’ll explore how you can craft GitHub Copilot prompts to accelerate your architectural workflow, design decisions, and documentation. https://dellenny.com/supercharging-solution-architecture-with-github-copilot-prompts-every-architect-should-know/ Copilot Chatmicrosoft 365 copilotTag Like47Views0likes0CommentsError when trying to test Maui iOS app using a simulator from a Mac
I am using VS2022 on a PC and have a Maui app that i want to test the iOS version on a simulator (Mac is running Sequoia). However every time i try to run it it gives me the following error: MessagingRemoteException: An error occurred on client Build1808319 while executing a reply for topic xvs/build/18.0.8319/execute-task/App.iOS/cebe602002fUnpackLibraryResources NotImplementedException: The method or operation is not implemented. Both PC and Mac are running .NET 8.0.411 and are running Maui 18.0.8319/8.0.100 from the SDK 8.0.400 Is anyone having similar issues, is it a bug in the maui-iOS component or, does anyone know the answer to this?46Views0likes0CommentsConnection between .NET and AUTOCAD ELECTRICAL
I want to connect .NET with Autocad Electrical . i am using , AutoCAD Electrical 2025.0.2 , Product Version : 22.0.81.0 , Built on: V.154.0.0 AutoCAD 2025.1.1 Visual Studio Community 2022 - 17.12.3 my system is x64 bit I am creating a console application in .NET 8.0 Runtime with C# language , Added dll accoremgd , acdbmgd, acmgd, Autodesk.AutoCAD.Interop . Also in .NET in Solution Explorer , in project references , i have made "Copy Local" property as False. using System; using Autodesk.AutoCAD.Interop; using Autodesk.AutoCAD.Runtime; using System.Runtime.InteropServices; using Autodesk.AutoCAD.ApplicationServices; namespace AutoCADElecDemo { class Program { static void Main(string[] args) { AcadApplication acadApp = null; const string progId = "AutoCAD.Application.25"; // Adjust for your AutoCAD version try { // Get a running instance of AutoCAD acadApp = GetActiveAutoCAD(progId); } catch (System.Exception ex) { Console.WriteLine($"Error initializing AutoCAD: {ex.Message}"); return; } try { // Ensure AutoCAD is visible acadApp.Visible = true; Console.WriteLine("AutoCAD is now running."); // Register for the BeginQuit event Application.BeginQuit += OnBeginQuit; // Keep the application running to monitor AutoCAD's state Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); } catch (System.Exception ex) { Console.WriteLine($"An error occurred: {ex.Message}"); } finally { // Unregister the event handler before exiting Application.BeginQuit -= OnBeginQuit; } } static AcadApplication GetActiveAutoCAD(string progId) { try { var comObject = Marshal.GetActiveObject(progId); Console.WriteLine($"Connected to AutoCAD: {progId}"); return (AcadApplication)comObject; } catch (System.Exception ex) { Console.WriteLine($"Error accessing AutoCAD: {ex.Message}"); throw; } } static void OnBeginQuit(object sender, EventArgs e) { Console.WriteLine("AutoCAD is being closed."); } } } For above code, my application comes in break mode "Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing)." and i am getting below error : System.IO.FileNotFoundException: 'Could not load file or assembly 'accoremgd, Version=25.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.' dll path is also correct. i also tried same code with .NET Framework 4.7.2 and 4.8 targeting pack , but getting same error. How to load accoremgd.dll properly so that this application can use autocad accoremgd functions properly.144Views0likes2CommentsCan't able to Upload Images on Azure Server if it is more than 128KB
Hi Everyone , I am trying to upload image and store but when i do it in my local server its working fine but when i push the same code in server i am getting entity too large I reached out microsoft support they are telling that "The content type format is supposed to be image as example given to upload the image file otherwise the application gateway will not understand the image and tries to accept only 128KB which is why the request is not accepted with Application Gateway. " when i am debugging i am getting same content type = image/jpeg . Code snippet for storing private void SaveImage(int vendItemID) { try { string folderPath = @"C:\UploadedImages\"; Directory.CreateDirectory(folderPath); string fileExtension = Path.GetExtension(fileUpload.FileName).ToLower(); string fileName = Path.GetFileNameWithoutExtension(fileUpload.FileName); string newImageName = string.Empty; dbCon.Server = "***"; dbCon.OpenConnection(); // Optimize and compress the image byte[] optimizedImageBytes = CompressImageToTargetSize(fileUpload.PostedFile.InputStream, fileExtension); // Convert to Base64 string base64String = Convert.ToBase64String(optimizedImageBytes); using (SqlCommand cmd = new SqlCommand("***", dbCon.Cnn)) { cmd.CommandType = CommandType.StoredProcedure; AddImageParameters(cmd, vendItemID, fileName, fileExtension); cmd.Parameters.AddWithValue("@ImageBase64", base64String); var outputCodeParam = new SqlParameter("@ImageNewName", SqlDbType.NVarChar, 200) { Direction = ParameterDirection.Output }; cmd.Parameters.Add(outputCodeParam); cmd.ExecuteNonQuery(); newImageName = outputCodeParam.Value.ToString(); } string newFilePath = Path.Combine(folderPath, newImageName); File.WriteAllBytes(newFilePath, optimizedImageBytes); UpdateImagePath(newImageName, newFilePath); } catch (Exception ex) { ShowMessage("Error while saving image: " + ex.Message, Color.Red); LogError("Image save failed", ex); throw; } finally { dbCon.CloseConnection(); } } I also try to compress and change it to base 64 but its not working. Kindly assist on what steps i need to take. Thanks, Shahid Note :WebForm i m working on .21Views0likes0CommentsWinUI3 and Win11 Kiosk mode
Hi, I have build a program in C#/WinUi3 to use in Kiosk mode on a Windows 11 machine. The program run fine in either admin or the user to be use for Kiosk mode, but once I have set AssignedAccess to the program for the Kiosk user, when I log using that user I get something that seems like the program starting (waiting cursor and all) but a blank screen with a cursor that I can see, if I click I get a ding sound from Windows and I can Ctrl-Alt-Del to get back to the admin user. Been trying a whole lot of things, but I can't figure out how to debug this one. Anyone with similar experience?27Views0likes0CommentsError on Publishing ios app (pc->imac)
Hi there, i have my PC connected to my imac. The imac builds and runs and supplies the simulator correctly so it's great from that point of view. When i try and have the imac build the IPA file from the PC - i get the above error. has anyone any thoughts on the solution might be?70Views0likes2CommentsBest Way to Fill ACORD 23 Vehicle Insurance Certificates on Windows – Any Recommended Tools?
I frequently deal with insurance documentation and recently had to work with the ACORD 23 Vehicle Insurance Certificate. I’ve been using Windows 11 and was looking for the most efficient way to fill, edit, and save these forms digitally without printing them out. While browsing, I found AcordForm – it lets you view and understand various ACORD forms like the 23, 25, and more. It’s been helpful for referencing and understanding the format. However, I’d love some advice from the community: What’s the best Microsoft-supported tool for filling out ACORD PDF forms? Is Microsoft Edge’s PDF editor reliable enough, or should I be using Microsoft Word with PDF add-ins? Any integration tips with OneDrive or SharePoint for document storage?. Thanks in advance40Views0likes0Comments