How do I enable DEP and ASLR flag for my wpf .net core application? - aslr

I have a WPF .net core 3.1 windows application, where DEP/ASLR flags are showing TRUE in some machines and FALSE some machines.
So can I force enable DEP/ASLR flag for my application alone
regardless of machine?

Related

gRPC : Running Multiple processes on the same port in .NET Core 3.1

I am migrating an application from .NET Framework 4.7.2 (WCF) to .NET Core 3.1 (gRPC), and my current architecture has two processes running on the same port. I wanted to ask if there was a way to run two gRPC processes on the same port in .NET Core 3.1.
It is important to me that these be two individual processes, rather than two services in the same process. Thanks in advance.

How to Force WCF Service Application Running in 32 bit Mode?

If run a WCF service application straight out of the box in 64 bit mode with service selected , it works fine an gives me the default data contracts.
If I change app to x86 and build with x86 ( not any CPU ) - and configure IIS 8 application pool for this application to allow 32 bit - it fails. How do I make the WCF Application work in 32 bit ( it must be 32 bit because it needs to be a wrapper for some legacy dlls ) . Note: I haven't referenced the DLLs or anything - it is just straight out of the box default WCF application ( Not a WCF library ) . help :-)
Although I am not sure why it is not working in your case, there are two issues to consider when running in 32-bit mode on 64-bit server:
Setting the platform target in Visual Studio: Setting this to x86 will force the target assembly to be built as a 32-bit application. If the assembly that loads the target assembly is running in a 64-bit process, it will fail to load your assembly
However, you do not have to specify x86 to allow your assembly to be loaded in a 32-bit process. If you specify Any CPU as Platform Target, it can be loaded in either a 32-bit or a 64-bit process.
32-bit IIS process: If your application is running as a web app, (running in an IIS app pool worker process), you’ll want that worker process (w3wp.exe) to be a 32-bit process. That can be specified in the advanced settings of the app pool:
Although is says 'Enable', it actually means “force”, meaning that the app pool worker process will always be launched as a 32-bit process when this setting has a value of True. Setting it to False will launch a 64-bit app pool worker process.

Need advice: SignalR support for Windows XP (.NET 4.0)

I am developing some kind of communication and data-interchange system to use in various applications that my company is producing. There will be SignalR hub for messaging and WCF service for file streaming.
I was thinking of developing a Hub library in .NET 4.5. Also I plan to enable Hub hosting in some windows process and IIS.
Thing that bothers me is that I have to support Windows XP clients, so I cannot use .NET 4.5 for developing a client library.
My question is: Are there bad effects of providing a .NET 4.0 client library for all clients, even though there are more clients with Windows 7 or Windows 8? My concern is about performance and features - am I going to lose any of that if I go with .NET 4.0 client?

How to detect .Net 4 Full Profile

How can you detect whether a PC has the .Net 4 Full Profile installed, as opposed to the .Net 4 Client Profile?
Here are the registry keys. Also if your application is targeting the full .NET 4.0 profile and this profile is not installed you will probably not go as far as checking the registry keys because your application won't run at all. So this check is better to be done when deploying the application on the client machine as part of the setup and deployment project. You could use a launch condition:

Which version of .NET 4.0 is needed for web site hosting? Client or Full?

Simple question -> for dedicated website hosting, do i need to download and install the full ASP.NET 4.0 package, or just the client.
I understand the client is required for end users who need the .NET framework for their windows form applications.
But i'm not sure for a web hosting sceanrio.
Also, don't worry about talking about x86 or x64 - i understand the differences with the packages, etc.
The ASP.Net runtime is only included with the Full installation.
(This is one of the biggest savings of the client profile; ASP.Net is large)
Yes you would need the full. The client profile specifically excludes ASP.NET.