error CS0117: 'Marshal' does not contain a definition for 'SecureStringToGlobalAllocUnicode'
Hello, Just want to check if Marshal.SecureStringToGlobalAllocUnicode(SecureString); is supported in .NET 4.5 . I keep getting the above error that Marshall doesnt contain a definition for SecureStringToGlobalAllocUnicode . …
![](https://techprofile.blob.core.windows.net/images/JiX-lf2_BgAAAAAAAAAAAA.png?8D8532)
Migrating Microsoft.EntityFrameworkCore.SqlServer.Migrations.Internal override to .net 5
Hello, I'm migrating my code from .net core 3.1 to .net 5.0 All works well except for one thing. On my columns in my Entities I have created a custom Annotation like this [CustomAnnotiation("Some key", "Interval in ms")] …
.NET Framework 4.8 crashed during GC if the profiling API is used
OS: Windows 10 Pro x64 (Build 19042) .NET Framework: 4.8.4084 x64 We have the our customer dump file, but we can check if user allows to share it. Profiling API flags: …
How to find Class/Entity complete namespace where it is used in solution/source code with their line number
Hi folks, I hope you are doing well. I want to write a program in C# that extract Class/Entity complete namespace where it is used in solution/source code with their line number I do research from internet I have found some references but it can't…
How can I write an XmlElement to an XmlTextWriter, where the element may have children
Hi all; Is there an easy (single call) way in .NET to write an XmlElement to a XmlTextWriter where that element is written out in full to the output? Where the XmlElement may have many child elements and they have children, etc. And where it…
![](https://techprofile.blob.core.windows.net/images/FA0ALqN_QU6SmYMGhVsijw.png?8D97DB)
![](https://techprofile.blob.core.windows.net/images/FA0ALqN_QU6SmYMGhVsijw.png?8D97DB)
Apply lazy Loading in Your Project
Hello, 1. What context have you used lazy loading in your hobby project or real based project from your work experience? (https://weblogs.asp.net/morteza/Why_and_how_to_use_lazy_initialization_in_Csharp_using_LazyT_API) 2. Do you have applied…
Blocking .NET 5 installation
Hello Microsoft , Looking forward to working with .NET 5.0 but we also need to know how to block the installation on those application servers where its not supported. Is the registry key to block it, “BlockNetFrameWork50” and set the value to “1” ? …
.NET ComException (0x800706BE) on Windows Server 2012R2 startup when querying Win32_Service
Hello, when starting a service automatically on a Windows 2012R2 Server, during the startup of the server the service crashes with the following exception: Stacktrace: Exception: System.Runtime.InteropServices.COMException; at…
![](https://techprofile.blob.core.windows.net/images/_5e-jRvlCkWlkMrV8cdbJg.png?8D8365)
UserControl Event Not Firing
I am trying to create a small dot that the user can move around a map. I use a UserControl for the dot: <UserControl .... MouseDown="MeMouseDown" MouseUp="MeMouseUp" MouseMove="MeMouseMove" <Ellipse …
Has Microsoft updated Windows and Office software with .NET-type dll assemblies?
In Visual Studio, Reference Manager includes COM objects for references. Does Windows and Office still use their original dll files? I've read that .NET .dll assemblies have advantages over older kinds of dll files (COM, Win32?). How are…
.net 5.0 seems to be wrong in detecting zero-terminzted string
The following code: class Program { static void Main(string[] args) { const string s = "abc"; const string sz = "abc\0"; void Report(string str) =>…
Accessing on-premise Dynamics v8 via OData using RestSharp/System.Net.Http
Hi there! I'm trying to access data from our on-premise Dynamics (v8) via OData WebService using RestSharp / System.Net.Http but in this case i'm kind of stuck. I fiddled around a couple of days now and the problem seems to be somewhere around the…
How to set Cipherspec preferences for .NET Core applications on Linux
On Windows we can edit Windows Group Policy to set the cipherspec preferences. But how do we achieve the same on Linux for .NET Core applications
HttpWebRequest.ProtocolVersion - how do I set it to try 1.0, then 1.1 (or vice versa)?
We have a commercial library and some of our customers need HttpWebRequest.ProtocolVersion=HttpVersion.Version10 and some need HttpWebRequest.ProtocolVersion=HttpVersion.Version10 Is there a way to tell it to try both? Or do I need to add a…
![](https://techprofile.blob.core.windows.net/images/FA0ALqN_QU6SmYMGhVsijw.png?8D97DB)
Using Volatile
Hello, From you experience using syntax code volatile, what concrete example have you used volatile in your application and why? (https://video2.skills-academy.com/en-us/dotnet/csharp/language-reference/keywords/volatile) Thank you!
.Net 5 Window
How can I create a .Net 5 window without Xaml? Please, no legacy frameworks like Winforms or WPF. I would use UWP, except it has a couple of significant issues ... not easily distributable and not distributable generally. cannot disable Windows…
![](https://techprofile.blob.core.windows.net/images/GBSkt_2_AwAAAAAAAAAAAA.png?8D959C)
Why does AudioPlaybackConnection keep disconnecting from Bluetooth devices in non-UWP applications?
I've created a test method in C# to connect to Bluetooth devices through the newly introduced AudioPlaybackConnection class in the WinRT API. I see that AudioPlaybackConnection is marked with the DualApiPartition attribute, so it should work in desktop…
Non-microsoft languages commentary
I develop radar applications on Linux and I have been watching .NET for 20 years. I was excited to see the goals for .NET 5.0 and I thought it might be the time to move to .NET. But, I was disappointed to see that the goal was just…
Linq to sql class error: must add reference to assembly Syste.data.linq
I created .Net Framework web form app in VS 2019 community. I added linq tosql class (dmbl) using table from AdventureWorks CountryRegions table. The class was created successfully . However I get error in my Business class (Bal): Error says: CS0012…