Category "c++sharp"

how to setup Teamcity (2021.2.2) deploy app with clickonce

I have a simple wpf/console app build that I want to deploy and be able to update where ever it is installed. So I picked clickonce, from ms, because that seame

Outlook ItemAdd event fires twice for new Calendar items

I'm working on an Outlook add-in that will monitor the current user's calendar and send that user an email when a specific type of appointment or meeting is rec

How to know if browser has PDF viewer or not?

I am viewing PDF into iframe. It works fine. But some of the client don't able to see it in IE. They get it as download option. How can I identify if browser

C# worker service vs windows service

What is the big difference between the worker service project template and the windows service project template and which is better to use? When can I use a wo

Update Entity from ViewModel in MVC using AutoMapper

I have a Supplier.cs Entity and its ViewModel SupplierVm.cs. I am attempting to update an existing Supplier, but I am getting the Yellow Screen of Death (YSOD)

Image not displaying at runtime C# WPF

I have been trying to learn C# but I'm coming across a lot of problems. I am trying to display an image in WPF but for some reason, the image won't show! It app

How to disable textbox from editing?

I want to use a text box to display some text. I can not disable it, because then the scroll bar will not work. How can I prevent editing within the multi-line

How to trigger (NOT avoid!) an HttpClient deadlock

There are a number of questions on SO about how to avoid deadlocks in async code (for example, HttpClient methods) being called from sync code, like this. I'm a

Error generating code from FixML 5.0 SP2

I'm using the Fix standard as the source (file fixml-main-5-0-SP2.xsd). I get the following error when trying to generate C# code using Liquid XML Data Binder:

C# UDP Server Asynchronous Multiple Clients | SocketException When Client Disconnect

I've been working on a socket server program in C# (I was inspired from this post) and my problem is that when a client disconnects an exception "An existing co

ps1 cannot be loaded because running scripts is disabled on this system

I try to run powershell script from c#. First i set the ExecutionPolicy to Unrestricted and the script is running now from PowerShell ISE. Now this is c# my c

Xamarin Google Maps Blank

I've been following: https://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key/ and https://devel

How to extract rotated images from PDF with iText

I need to extract images from PDF. I know that some images are rotated 90 degrees (I checked with online tools). I'm using this code: PdfRenderListener: public

.NET core - Configure JWT Authentication at runtime

I have an ASP.NET Core 2 Web Application and I am using the [Authorize] attribute on the controllers that require authentication. As authentication mechanism, I

dataGrid doesn't update when item property has changed

So I have almost identical thing set up with TextBoxes/ListBoxes and so on but it just doesn't seem to work with dataGrid.. So I have a view Index which contai

Data driven coded UI test with excel file as a data source

I built a coded UI test and I want to make it a data driven test , I want to get the data from an excel file ( Data.xls )located in the same directory with the

Deserialized Object Has All Values Set to Null

I'm trying to deserialize JSON into a custom object but all my properties are set to null and not sure what's going on. Does anyone see anything wrong? JSON Ex

How to get fibonacci in c#

Guys I have a question regarding on fibonacci..How do I get the fibonacci series that the number will also end on user input...example if I put 21 the output mu

Deploy/programmatically create Outlook Rule to run Script

I need to deploy an Outlook rule that runs a script. So in other words I need deploy both an Outlook rule and the script it runs. I know I can get users to impo

Can a cascade delete rule be added in a migration?

In a FluentMigrator migration, if I'm defining a relationship, say: Create.Table("RelatedTable") .WithColumn("RelatedTableId").AsGuid().PrimaryKey() .W