返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [.net]

Do NOT use for questions about .NET Core - use [.net-core] instead. The .NET framework is a software framework designed mainly for the Microsoft Windows operating system. It includes an implementation of the Base Class Library, Common Language Runtime (commonly referred to as CLR), Common Type System (commonly referred to as CTS) and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++/CLI.

Filter by
Sorted by
Tagged with
0
votes
0answers
2 views

How to retrieve a Stream from a “ms-resource” Uri to a Content file?

I have a file whose Build action is Resource. I want to use it in a custom control: <MyControl Source="dashes.svg" /> Inside my control, the Source property is defined as Uri Whenever the Uri ...
0
votes
0answers
3 views

How to package Filebeat with my application

I have a c# application and using Nlog to log. I also have an ELK stack where I want to push my logs too. At this point, I have found that using Filebeat is a more failsafe approach than directly ...
0
votes
0answers
5 views

Error while adding “WebView 6.0.0” to project WPF

I use WebView 5.1.1 (EdgeHTML) in my WPF project on .NET Framework 4.6.2. When I update to version 6.0.0, I get a error Must use packagereference. It happens to the Microsoft.Windows.Sdk.Contracts ...
0
votes
0answers
18 views

Moving .Net Web from Windows 2008 to Windows 2019 and .Net error

We moved the .NET WEB application from Windows 2008 to Windows 2019 and we observed the error .NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance. Profiler CLSID: '{...
0
votes
0answers
11 views

Can we use a List to mimic a temp table in ef core for executing a MERGE statement?

I am doing the below in a .net console app. I am performing a MERGE statement between two tables , as follows:(as a raw sql in .net Core) var SqlMergeStatement = @"MERGE TAR AS TARGET ...
0
votes
1answer
29 views

Creating DTOs using select conditionally

I have a Linq query in the following way, where if some value becomes null within from, then avoid the select, if its not null or has value then only make the select, in the below query select should ...
0
votes
0answers
64 views

C# returning &quot; rather than "

My code is returning &quot; rather than " In .cs public string openingVal { get { string opening = ""; opening += "\"openingHoursSpecification\": ["; opening += "{...
-4
votes
0answers
34 views

Ef taking null, but entity exists

I'm trying to take some user info in code, but ef receiving null. foreach (var user in allAutoUsers) { Wallet wallet = db.CabinetUsers.Find(user.IdCabinetUser)?.Wallets.FirstOrDefault(x => x....
0
votes
0answers
19 views

Connecting 32 bit VB.Net to a 64 bit Access .ACCDB

I have a VB.net application that I am trying to upgrade to use the corporate-mandated 64 bit Access .accdb data source. I have tried installing 32 bit AccessDatabaseEngine.exe, but it won't install ...
0
votes
0answers
8 views

WCF NetTcpBinding with TransferMode.Streamed not working on Windows Server 2019 with TLS 1.2 and SslProtocols.None on the WCF binding

We have a WCF client and server which communicate over a WCF NetTcpBinding with Streamed Transfermode where the client sets up the WCF NetTcpBInding with these relevant settings: TransferMode = ...
0
votes
0answers
18 views

.NET LiveCharts, Performance Issues with real-time data

I am using LiveCharts for my WPF app and am currently facing an issue with performance when plotting multiple LineSeries/GLineSeries with real-time data. Here's a GIF showing what's happening: ...
0
votes
1answer
14 views

Use .resx with AngularJs translation

What's the best approach to transforming .resx files into the necessary JS format for angular-translate (AngularJS)? We use grunt as a build tool, but couldn't find any taks that would do this out of ...
0
votes
1answer
17 views

Add Date in Oracle Table for TimeStamp Column using c#

I have written Code to add the Date to oracle table with column of type 'TimeStamp' but i am getting the error of 'ORA-01843: not a valid month', my code is below, column in oracle DB of type '...
0
votes
1answer
22 views

React SPA won't find page upon refresh - loads fine when selected from navbar

I have an application that I've written using React/Redux on the front end with .NET Core 2.2 on the backend. It's your typical SPA app, I believe I started with CreateReactApp a long while ago. I've ...
3
votes
3answers
110 views

Is there a difference between “double val = 1;” and “double val = 1D;”?

Is there a difference between the following two pieces of code? class Test { public readonly double Val; public Test(bool src) { this.Val = src ? 1 : 0; } } class Test { ...
0
votes
1answer
42 views

How can I handle the exit of the calling application in a class library?

I'm writing a class library (for .Net Framework 4.7.2) that has methods that involve flushing a file. This flushing should be done in response to direct method calls, but also if the calling ...
0
votes
0answers
12 views

Implement @RenderSection(“scripts”, required: false) on partial view, or alternative to it

_footer.cshtml partial view wich contains <footer> ////some necessary containers and content @RenderSection("scripts", required: false) </footer> now i call footer on _Layout....
0
votes
1answer
10 views

FTP not listing files on live server with identical setup

I have a WebApi application that runs on IIS. In development it works perfectly reading and writing files. When it is deployed to the live system it will login but not list the contents of the ...
-6
votes
0answers
64 views

How can I improve linq query performance by C#?

I have really tough question for you. My colleague before me wrote some linq code I separated them by using Stopwatch and send elasticsearch to see performance issue As a result, I realize that there ...
0
votes
1answer
37 views

Why do we need stack in .NET?

If heap and stack in the end are anyway stored in RAM of the PC, why do we need stack at all? Stack is less flexible, while everything we need can be build upon heap. So for what reason do we use ...
0
votes
0answers
13 views

Could I change the root of my sitemap.xml path?

This is my resulting xml file. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://localhost:5000/</loc> </url> </urlset> I ...
0
votes
0answers
3 views

How to get sync return from ExecuteScript in WebView2

Just trying out the Winforms WebView2 from here: http://github.com/michael-russin/webview2-control Trying to work out how to get use ExecuteScript synchronouly. Blocking the thread in any way, ...
-1
votes
0answers
8 views

UIAutomationClient vs Interop.UIAutomationClient

Can you please explain what is the diff between UIAutomationClient and Interop.UIAutomationClient. More or less I Know about UIComWrapper which is using it internally. Difference between ...
0
votes
0answers
15 views

Failed to create COM object in PHP

I have a DLL file which I want to call from PHP using the following code : $device = new COM("OnlineEnroll.Bio"); That DLL file is working fine on a different developer machine with the same code (...
0
votes
1answer
24 views

Azure Pipelines yml help - understanding my yml file and why it isn't deploying

I am really new to Azure DevOps and am trying to configure Azure pipelines for my project. Currently my .yml file looks like this: trigger: - my-test-branch pool: vmImage: 'ubuntu-latest' ...
0
votes
0answers
13 views

How to ensure typeof and cast operators operate on a different load context not the default load context

I'm using .NET core and trying to compare types loaded via reflection into an assembly load context (not the default load context) with a known compile-time type. However, if I use the typeof operator ...
0
votes
1answer
67 views

Ternary operator not working in if or statement

I have if or statement in which I put some of my conditions and a ternary operator. I've noticed that if I put ?: operator my if statement always go false. I'm wondering what causes it, because true ...
0
votes
0answers
33 views

.NET Application crashes only when a debugger is attached. How do I locate the faulting code?

I have an .NET application which crashes when I attach a debugger. Without an attached debugger it runs as expected. When the application crashes it just vanishes and no error message is displayed ...
-1
votes
1answer
55 views

Error converting datatype varchar to numeric in update method [duplicate]

I'm trying to create an update method. The code is fine but it gives me an error when I run the project: Erreur de conversion du type de données varchar en numeric. (Error converting data type ...
-1
votes
0answers
11 views

Compression adn decompression of responses .NET CORE

Actually i want to compress my responses in the back using .net core but the problem is that if i want to decompress those responses in the front with angular 8 i don't know how to do it does anyone ...
0
votes
1answer
49 views

How do I debug “cannot convert to system.collections.generic.list” error

var httpClient = new HttpClient(); var response = await httpClient.GetStringAsync("http://192.168.1.57/smsapi/api/kullanici/" + viewModel.Item.ID); var GrupKullanicilarList = ...
0
votes
1answer
29 views

Is mandatory to select the option of PromptDialog?

If we choose the PromptDialog then the option of PromptDialog must be selected. Is it mandatory to select the option? Without selecting the option and the user asks for a new query as well as Bot ...
0
votes
1answer
47 views

File could not be found using long file Paths

I'm trying to remove the lfs tracking tag from git before I process some files only some of the files when used in our companies jenkins server contain file paths that are 260+ characters. Due to this ...
-1
votes
1answer
18 views

Filter Datagridview after importing using Combobox C#

I have a datagridview1 with data imported from a excel file and there are 12 columns: date, Name, Activity, Project,time, comment,ect. and 1000 rows. What I want to do is to filter only all with the ...
0
votes
0answers
7 views

VS2017:c# .net Build takes wrong path in referencing a self made dll

I have a selfmade dll that I use in several projects. Compiling the project with a 3rd-party compiler (cAlgo) works great. but suddenly in all the projects where I reference the dll, building with ...
0
votes
0answers
4 views

I am unable to install cors package in .net 4.0

enter image description here I am using the .Net 4.0 and I want to allow the cors policy. But when I am trying to add the CORS package to the project. It's showing the above error.
-1
votes
0answers
27 views

Google.Apis.Requests.RequestError You need to have writer access to this calendar. [403]

I faced this issue on executing this code: service.Events.Insert(ev, calanderId).Execute()` I want to create an event in Google calendar without using the interaction of the user Authentication. I ...
0
votes
1answer
14 views

Exception with Rest Sharp Assembly

I'm encountering the following error message: Error Message : threw exception: System.IO.FileLoadException: Could not load file or assembly 'RestSharp, Version=106.6.10.0, Culture=neutral, ...
-2
votes
1answer
32 views

500 (Internal Server Error) when making http.post call

I have the following Angular 8 application that calls a webapi C# controller. login(formData) { return this.http.post(this.BaseURI + '/ApplicationUser/Login', formData); } When running this I get ...
1
vote
1answer
31 views

does Angular have only one type of service lifetime?

I'm from .NET background, just a question on Dependency Injection in Angular. In .NET/.NET Core, there are three different service lifetimes which are: Transient, Scoped and Singleton. But for ...
-5
votes
1answer
32 views

Fetch and bind json data with blank spaces in it [duplicate]

I am dealing with a specific situation right now. I am new to .net core APIs and till now I didn't have any bigger problems. Right now, I am facing a situation where I need to fetch some data from ...
0
votes
4answers
53 views

How to get default compile-time value of Auto-Implemented property C# 6.0 after it changed?

Question is still open for the best short answer in one line. wish to find one. Shortly, The new C# 6.0 Auto-Implemented Property allows us to make this public static bool IsSoundEffects { get;...
0
votes
0answers
14 views

Can i improve my projects structure if so which sources can i use?

I know this is a completly general question, but i'm interested in improving my projects struture, if this is not the right forum i will move to the right one. Now about what i'm trying to improve, ...
0
votes
1answer
12 views

NAudio splitting wav file produces 0 second wav files

I am using NAudio to split an full Album into several audio files. The program runs smooth and theres no exceptions, but in the end, the output audio files are not listenable and they get shown as 0 ...
0
votes
0answers
21 views

NativeScript: I can't connect to my local .NET Core API

I Keep getting following error when trying to connect to my .net core api. I don't know why it happens, all tutorials I watched or other posts I read didn't help me at all. JS: ERROR { JS: "headers"...
0
votes
3answers
32 views

Entity Framework many-to-many run on error

I create a webshop with .Net Core and I'm using Entity Framework code-first migration. I try to implement a product-order, many-to-many connection and I got the following error: Unable to ...
0
votes
0answers
13 views

Configure TraceSource for .NET Core application via configuration file

I see that TraceSource is available for .Net Core 3, but is there a way to configure the listeners, switches and filters through a configuration file w.o the need to manually map the configuration ...
-1
votes
0answers
18 views

Open connection from specific remote server to another server in C#

I have a desktop application that connects to a database server from my Windows server. However clients do not have firewall permission to connect to that database server. So I need to serve my app ...
0
votes
0answers
7 views

“This version of nuget.exe does not support updating packages to package source” error when trying to push package to a private Nuget repository

I am getting the following error when I try to push a package to my private Nuger repository: This version of nuget.exe does not support updating packages to package source http://... I have been ...
1
vote
1answer
22 views

How to create attribute with class restrictions

In C# there is a attribute called AttributeUsage, if you want to set this attribute to a class it automatically detects if the class is derived from the Attribute class and if not it will throw an ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞