Category "c++sharp"

Interface Method with different type of arguments

I'm constructing a set of filter-classes which will all have the same method 'Applyfilter'. How should I define the interface which contains apply filter? The o

How to force %20 instead of + in System.Net.WebUtility.UrlEncode

I need to encode a URL in a class library assembly where I don't want to reference System.Web. The URL contains several spaces https://query.yahooapis.com/v1/p

special character in folder string here @

I have been searching intensively, but the returning results are not quite what I am trying to achieve. I want to access a remote folder on a server. The pain p

How do I post SQL data using submit button in asp.net c# razor

Thanks in advance. Can anyone please help me get this button working so I can display a row from the Northwind database 'only' when the button is clicked. I h

How can I catch an exception and send it as json message?

I wrote a code but for some reason it doesn't work...can you tell me what's wrong? I want the app not to stop when I get an exception, only to send that excepti

Why is not working EF Core retry on failure

I've configured my db context to retry on failure this way: optionsBuilder.UseSqlServer(connectionString, sqlServerOptionsAction: sqlOptions => {

What is the right way to prerender Blazor WebAssembly?

It almost works after the following steps: Install the hosted version of blazorwasm template app. dotnet new blazorwasm --hosted -o HostedWasm Copy _Hosted.cs

Self Hosted WCF REST service JSON POST Method Not Allowed

I have literally seen thousands of these "WCF" questions on the internet so far, but I am beginning to think that it is impossible. Please someone tell me I am

How to store a video file in exe file in c# and play it

I am working with winForms in c#. I want to access video file from resources without using any dialog box for load or select. That means I want directly store v

HiQPdf not finding the css

The website I have written requires a convert web page to PDF functionality. After looking at the options HiQPdf looked like the best option and did all that wa

how to set an array value in local.settings.json file in azure functions

When I try to insert an array as one of the Values in local.settings.json file: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "", "Azu

Parameterizing a raw Oracle SQL query in Entity Framework

I'm trying to parameterize a raw SQL query for an Oracle synonym (non-entity) in EF 4 and I am having some problems. Currently I am doing something like the co

Unable to resolve service for type while attempting to activate

In my ASP.NET Core application, I get the following error: InvalidOperationException: Unable to resolve service for type 'Cities.Models.IRepository' while atte

"Could not locate MSBuild instance to register with OmniSharp" but msbuild is installed

Due to the third party system we work against, I have to use .Net 2.1, which has worked fine until recently. I develop on Fedora with latest updates and VSCode

Call a function when button is clicked in a different window (WPF app)

I launch a window from a page of my wpf app and I would like to call a function when a button is pressed in the child window Here is the page that calls the wi

How to SetBasePath in ConfigurationBuilder in Core 2.0

How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but

Bypass/Ignore Exchange Server "Maximum Send Size"?

As soon as possible I will start a bounty and award 150 (that's what I have) points for solution. I am developing Outlook add in. When message is sent, add in

How can I filter Salesforce SObjects for mappable objects

I have a C# application which contains objects whose data I want to transfer to Salesforce using the REST API. I would like to allow my users to create a mappin

How to log dotnet test output in junit format

dotnet test uses trx output by default. I am using trx2junit to convert it to junit, but this complicates CI setup. Is it possible to output test report in juni

.Net Core 2.0 Process.Start throws "The specified executable is not a valid application for this OS platform"

I need to let a .reg file and a .msi file execute automatically using whatever executables these two file types associated with on user's Windows. .NET Core 2.