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.

0
votes
0answers
13 views

Remove .g.cs files from solution explorer view

Using core 2.2 Suddenly ever page in my application now has the .g.cs file listed in solution explorer. I have cleaned and built the solution successfully. How can these be idden removed? Why have ...
2
votes
1answer
39 views

Can I manually run a C# class containing a Main() method from a project that is not a console application project?

I am pretty new in .NET\C# (I came from Java) and I have the following doubt. In my solution I have a project that should be a SharePoint job, something like this in my solution explorer: I know ...
0
votes
0answers
10 views

How to enable HTTPS for Electron .Net Core application

How to enable HTTPS for Electron .Net Core application . Currently i have developed a .Net Core MVC application which includes the feature for screen sharing using the Janus WebRtc. The Janus WebRtc ...
0
votes
1answer
2 views

MSB3073: The command dotnet bundle clean exited with code 1 in a Visual Studio 2019 Asp.NetCore project

I got the error MSB3073: The command dotnet bundle clean exited with code 1 in a Visual Studio 2019 Asp.NetCore project. This issue only occured after I updated my Visual Studio yesterday. > ...
0
votes
1answer
42 views

How do I format a one line JSON string

I'm creating a GUI in Visual Studio which is going to fetch JSON data from an API to display in a text box, and I want it to be displayed formatted so it's readable. I have tried to use the ...
0
votes
0answers
8 views

quartz net get mysql connection open error in scheduled jobs

I can run successful on the server. But randomly I got the error is that "A call to SSPI failed, see inner exception: the message or signature supplied for verification has been altered". It's on ...
0
votes
1answer
11 views

Find a user using Telephone number property using Directory searcher (or) User principal?

I am trying to find user details in active directory by using telephone number registered. I have formed the search filter but doesn't return the user instead returns null always. Where Am i wrong? Is ...
0
votes
0answers
14 views

How is this assembly loading supposed to work?

I have this NuGet package Microsoft.CodeAnalysis.Scripting.Common version 2.6.1 that I use. The assembly in this package is targeting the .NET Standard 1.3. I have a .NET Framework desktop console ...
0
votes
0answers
9 views

Enable TLS 1.2 programmatically in C# for Webbrowser control

Our application using “WebBrowser” control to display some web pages. We need to enable TLS 1.2 to display these web pages. Now we are facing some issues in Win 8 when disabling (by default disabled) ...
-2
votes
1answer
27 views

How do I initialize a string variable with a control in Partial class WPF C#?

I have a code with eight separate functions. Each having a common string variable string pathFolder = TextBoxPath.Text. I am writing this line every time I am creating a new function. I tried ...
0
votes
0answers
20 views

How can i change ip without proxy?

I'm sending data to an API server. I have to send hundreds of requests per minute. The load balancer server is blocking my IP address and proxy addresses. The request I send is not an attack or the ...
0
votes
0answers
12 views

Socket Exception during load test

I am testing our azure app developed in .net core simulating huge load. I am seeing many APi's getting socket error. The destination APi is hosted in our network. Is there any limitation in azure ...
-1
votes
1answer
28 views

vb.net Array.copy doesn't leave destination buffer at expected size

I allocate the source buffer and the destin buffer... dim packet_receive_buffer( 4104 ) as Byte dim payload_buffer( 4104 ) as Byte I Fill packet_receive_buffer with 4100 bytes… ...
1
vote
2answers
32 views

how to join a list on new guids?

How do I join a list of strings with guids into a dictionary? I've got a list like so: new List<String> { "alex", "liza", "harry" } I'd like to create a dictionary like: new Dictionary<...
0
votes
0answers
13 views

EventHubs processing with ServiceFabricProcessor bottlenecked by ingestion

I have a 32-partition eventhub that receives roughly 1M messages per minute. I am using ServiceFabricProcessor to process the data on a 32-node, 32 partition service fabric cluster. Currently I am ...
0
votes
2answers
25 views

.Net MVC DropDownList isn't rendered correctly when it's initially hidden

I'm fairly new to this style of .Net MVC, so hopefully this something simple to fix. I have an HTML table row that needs to be hidden when a page is loaded, then if an option from a drop down list (...
0
votes
0answers
13 views

Microsoft Graph API client library - create a folder

I'm trying to create a folder under an existing folder on SharePoint using Microsoft Graph API client library or SDK (C#). I understand creating the folder on SharePoint or OneDrive should be the same ...
-1
votes
0answers
12 views

Visual Studio extension to change variable format [on hold]

Is there any extension to change variables formats ? Specifically to change to camelCase. I have to change many classes and variables with this kind of "problem". Thanks a lot.
0
votes
2answers
30 views

Grouping string using Regular Expression

I have the below string validates="required positiveInteger" label="Enter the Total Value." name="totalvalue" visibleif="hasvalue:Yes" So the string has 4 attributes validates,label,name and ...
0
votes
1answer
42 views

Programmatically get list of installed application executables (Windows10, C#)

I want to get a list of applications that are installed and executable on Windows 10 -- i.e. executables of applications a user can launch (UWP and non-UWP). For UWP apps, I want to get its ...
0
votes
0answers
6 views

Cannot add Smart Card Certificate to Yubikey

I am trying to create a smartcard certificate and add it back to the Yubikey (I am using Yubico's Mini driver so the yubikey behaves like a smartcard and cannot use their PIVManager or YKMan). I am ...
1
vote
0answers
24 views

How is Ecma public key mapped to a real public key?

Basically, all Microsoft assemblies that are considered standard library like mscorlib.dll include a fake 16-byte public key 00000000000000000400000000000000 It is defined by ECMA-335 (CLI specs) ...
0
votes
1answer
24 views

How to “Show” button in DataGrid from model created dynamically?

I'm creating CRUD app, and basically what I want to do, is to create datagrid where each row have its own button to decrease the value of one cell (which is taking data from SQL by Entity Framework). ...
0
votes
0answers
12 views

.NET - How to self-sign a SSL certificate for socket communication?

I need to create a self-signed SSL certificate to be used for socket communications in C#. Ideally the code would be pure .NET code without any reliance on external libraries. The SSL certificate is ...
-3
votes
0answers
32 views

xmldocument returning only 1 node for entire document [duplicate]

How do we iterate through all the nodes? I'm attempting to iterate through the nodes in my document like so: XmlDocument Doc = new XmlDocument(); Doc.Load(readerXml); ...
0
votes
0answers
14 views

Using OpenXML library to write to Excel file fails due to an invalid character that XmlConvert.IsXmlChar does not detect

I'm trying to use the OpenXML Library to write an Excel file. I tried the following: try { excel.AddRow(toWrite.JobTitle.StripOutInvalidXmlCharacters(), toWrite.LegalEntity....
0
votes
0answers
25 views

Group policy is overriding my attempts to prevent sleep in Win10 programatically. Looking for hacky ways to keep it awake?

I've been tasked with writing a Windows script that does a number of things, including preventing Windows from sleeping. I've already tried Window's SetThreadExecutionState(...
0
votes
0answers
3 views

How to export public key from TPM with TSS.net?

I've gotten the Signing sample from here to run against the TPM Simulator. It looks like I have some sort of reference to the public key after calling: TpmPublic keyPublic; //This seems to have what ...
-2
votes
0answers
17 views

How to make 'URL Routering for Ecommerce' [on hold]

I wanna make an structure of my site (testecommerce.com) with this example www.testecommerce.com (the index page, no problem with this) www.testecommerce.com/category1 (must go to the list of ...
-1
votes
1answer
25 views

Importing data from excel to database mysql - how to insert cmd DateTime parameter in format yyyy-MM-dd HH:mm:ss

This time i've created like "Sheet5" in excel Workbook: When I load data from this excel to datagridview i get this view (in datagridview of course): +--------+---------+---------+-------------+-...
0
votes
0answers
5 views

Strange remote service call link

We use windows service handle database connection. Our web application uses remote service call connecting to windows service. When I look at log I found following strange URL 0, 2-7. Does anyone know ...
-2
votes
1answer
19 views

“Invalid column” when called from another stored procedure from .Net

I've added a call to a SQL Server stored procedure (let's call it "child") at the end of an existing stored procedure ("parent"). Both child and parent (which, again, includes child) run successfully ...
-2
votes
1answer
51 views

What is the best way to approach reverse recursion to generate XML breadcrumb, using attributes, at each node?

I'm currently storing some data in XML files and I need to now generate a file for another application. This application requires that each line includes the path to it. I'm currently developing in C#....
0
votes
0answers
39 views

.NET Core - FromForm doesn't pick up an IEnumerable<int>

I am trying to pass an ajax call to a REST endpoint. I have set up a DTO, and all parameters work correctly except for the two that are IEnumerbles. DTO looks like public string title{ get; set; } ...
1
vote
1answer
58 views

Is there a difference between implementing an interface vs adding a new method?

As shown in the code below, there are two interfaces IFoo defined in two different assemblies: /// assembly A interface IFoo { void DoSomething() } /// assembly B interface IFoo { void ...
0
votes
1answer
45 views

How to Serialize using JSON.NET and Ignore a Nullable Struct Value

I am trying to serialize a nullable struct using JSON.NET with a custom JsonConverter. I would like a null value to be ignored/omitted in the JSON output e.g. I want my JSON output below to be {} ...
1
vote
0answers
21 views

Bot Framework Providing a link to open conversation with a separate person/bot

I would like my chatbot to be able to directly open a chat with another person/bot. This could be for if something isn't covered by the bot and they need to directly talk to a person, or if another ...
0
votes
1answer
44 views

Removing items in a list of list

Let's say I have a class named Inventory. Inventory has many Products. Each Products has many characteristics like Size or a list of Colors. I want to remove all the Colors of my Hats in the ...
0
votes
0answers
78 views

How to convert from huge JSON file to xml file in C#

I'm trying to convert from a huge JSON file(2GB) to xml file. I have some troubles reading the huge JSON file. I've been researching about how i can read huge JSON files. I found this: Out of ...
0
votes
0answers
16 views

How to force CmsSigner to use RSASSA-PSS (RsaPss) when signing with an X509Certificate with RSA assymetric parameters

I am creating signed & encrypted pkcs 7 data. The certificates that I use to generate signatures are issued by an external party (goverment agency). The 'other-side' only supports signatures ...
0
votes
1answer
25 views

Getting Response of Type cors on web api .net core

I'm just trying to return a url to a client i already did all configuration of cors policy but the only return i recieve is of type cors, without any signal of the url that i want to return, the ...
0
votes
0answers
24 views

C# .NET Core - IStringLocalizerFactory in a class for localization

So currently I have a dependency injection for localization. This is configured in the startup.cs services.Configure<RequestLocalizationOptions>(options => { string defaultCulture = ...
0
votes
0answers
15 views

how to show ICollection in word doc?

i want to show an i collection in word doc using Microsoft.Office.Interop.Word . until now I managed to write the date and statut but when I write the ICollection DemandeModuleList, I always find the ...
0
votes
0answers
12 views

The type 'Claim' is defined in an assembly that is not referenced for DnsEndpointIdentity class

I have the following code that builds successfully on Visual Studio 2010. The same code on Visual Studio 2017 produces the following build error: Severity Code Description Project File Line ...
0
votes
3answers
38 views

is it possible to alter the node value with xmlreader?

I'm reading in an XML stream that's approximately 100mb, and I'd like to replace values that are over 1mb. example input <root> <visit>yes</visit> <filedata>...
1
vote
2answers
42 views

Encoding word using C# && dotnet core [on hold]

I try to decode the word Mickaël here using System; using System.Net; using System.Web; public class Program { public static void Main() { string s1 = WebUtility.HtmlDecode("Micka&...
0
votes
0answers
8 views

Change the Urls of OData V4 when running behind reverse proxy

With .Net Core WebAPI I would like to change the OData URLs in the output. API is running behind a reverse proxy and I want all the URLs in the OData output to be relative to the gateway. Current ...
-1
votes
0answers
20 views

Move an image with the GPS coordinates of a csv file

I'm trying to move an object through GPS coordinates of a csv file in C # on Visual Studio. What I want to achieve: retrieved the GPS coordinates of a csv file transformed these coordinates into X ...
0
votes
0answers
22 views

How to prevent Socket Exhaustion on HttpClientHandler

Unlike other clients in the Microsoft.Azure.Management namespace (ie SubscriptionClient), OperationalInsightsManagementClient does not take HttpClient as an argument in the constructor. This means I ...
-1
votes
1answer
45 views

LINQ FindAll returning same item twice

I have a table in my database with three columns and two rows: The columns are: Id, PersonId and ListName The values in the first row are: 1, 1, 'ListOne' The values in the second row are: 2, 1, '...

http://mssss.yulina-kosm.ru