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
10 views

eSign/Electronic Signature API recommendations

I am exploring various esign APIs (docusign, esignature.io, etc) but I cant find one that fits my needs. We want to implement esign into our software. Our software is sold as a SaaS and used by our ...
0
votes
1answer
42 views

What is Property Accessor Recursion in C#?

What is Property Accessor Recursion in C#? I see articles of how to resolve it, but want a pure technical definition of what it is. Resources on how to resolve it: c# property setter body without ...
0
votes
1answer
21 views

System.ArgumentNullException: 'String reference not set to an instance of a String. Parameter name: s'

When i submit the registration form i get this error: System.ArgumentNullException: 'String reference not set to an instance of a String. Parameter name: s' it's coming form the hashing password ...
0
votes
0answers
27 views

How do you return an array from a C DLL to .NET via a parameter?

I want to return 2 arrays from a C DLL to a C# program. Returning one array as a return value seems to be no problem. But if I want to return a second array via an out parameter, it always seems to ...
0
votes
1answer
22 views

Does it make sense to use a ReaderWriterLock to detect disposal when a class is otherwise thread safe and lock-free?

Suppose I have a class that's thread safe, meaning any public instance methods are thread safe. The class is "lock-free" in the sense that I'm not explicitly using any locks within the code. There is ...
0
votes
0answers
17 views

Publish on .NET Core 2.2 SignalR Hub as EXE not working on Self-Host but works in Visual Studio

I have a Hub that works inside Visual Studio Community 2017 for ASP.Net Core & SignalR. Everything works beautifully as long as it runs under VS. I read what is available & am not getting any ...
1
vote
1answer
46 views

How do I launch an exe that's in the same subfolder as the main one? (C++)

I'm working on a program download manager with options to open the app you've downloaded. You can download an app and it would be here: .../programfiles/pub/appmanager/apps/APPHERE.exe And the main ...
1
vote
1answer
15 views

how to make ActionLink with 2 statements razor

i want to make a ActionLink in my index page when 2 Statements are not in my "GraduationStatus" column. When the "GraduationStatus" is "Graduated" and "Pass" i want to have a link that redirect to the ...
0
votes
0answers
40 views

Net Core: Overloading Methods or Inheritance, looking for efficient method

I have simple calculator class. This question actually hides more complex scenario at work. https://www.c-sharpcorner.com/article/a-simple-calculator-class-in-C-Sharp-6/ public class Calculator { ...
0
votes
0answers
16 views

ASP.NET Core 3.0 not showing on Visual Studio 2019 Enterprise

I cannot create an ASP.NET Core 3 project. I do not have the option in the drop-down. I have reviewed the topic @ ASP.NET Core 3.0 not showing on Visual Studio 2019 but these "solutions" are not ...
0
votes
1answer
43 views

Optimize finding Min/Max value using Entity Framework LINQ only

The way I normally find the Min/Max in the database is using var employeeWithMinSalary = employees.OrderBy(x=>x.Salary).First() var employeeWithMaxSalary = employees.OrderByDescending(x=>x....
0
votes
0answers
13 views

How can I use middleware with interceptor?

The middleware is sufficient for detecting exception request/response but not sufficient for all exception from start point of a process to endpoint. Forexample: public class ...
0
votes
0answers
18 views

Adding ASP.NET Core functionality to a .Net Core console application [duplicate]

I have been working with the .Net framework for a long time but have recently begun dabbling with .Net Core. The ability to integrate ASP functionality into standalone applications is really ...
1
vote
1answer
20 views

I need to map a complex type relationship with many tables

Ok, i have this Class 'Opciones', I'm sorry it's in spanish. The main thing to understand is that i have this class 'Opciones' which has multiple instances of itself in 'Registro' and i can't find a ...
-4
votes
0answers
16 views

How can i migrate a angular app to mobile app with nativescript? [on hold]

Good evening, I created an Angular App with Asp.net core.Now I want to use the same code to create a mobile App using Nativescript but I do not know where to start? if it is feasible or not?
0
votes
1answer
42 views

Pass DataGridViewCell by Reference

I am trying to pass a DataGridViewCell to a method which changes the cell type depending on certain conditions, e.g. var valueCell = currentRow.Cells["ValueColumn2"]; PopulateValueCell(attribute, ...
0
votes
1answer
31 views

Decrypt an encrypted SQLite DB in .Net

I'm trying to decrypt an encrypted SQLite DB (in .Net). According to Zetetic's documentation (https://www.zetetic.net/sqlcipher/sqlcipher-api/) one can use sqlcipher_export for this purpose, like so: ...
3
votes
1answer
86 views

How to serialize a List<object> while simultaneously escaping special characters?

We have a very large List<object> that we are turning into a json string and then sending to a stored procedure. To keep things simple for this post, let's say the object looks like this: ...
0
votes
0answers
12 views

Using Webgrid to display query results

I am trying to display the query results from an existing database in a webgrid. I have tried using a template that I found online but I am unsure of whether or not the syntax is correct. @{ var ...
0
votes
0answers
13 views

Apache PdfBox library in .Net

I want to use Apache's PDFBox Library in C#, i checked on NuGet but sadly, there's no PDFBox 2.0 in there. I searched the internet for ways to use the Java Library on .Net, found some old articles (...
-4
votes
2answers
63 views

C# .NET Core property of type ILogger [on hold]

I am working on some legacy code and found a property that is of type ILogger. I am assuming that "ILogger" is an interface, so it should probably be used in an inheritance context. What does it mean ...
0
votes
0answers
19 views

EntityState Of Inherited Properties Remains Unchanged

I have an entity that inherits from a base class, when I update a the inherited property, the EntityState is unchanged public abstract class BaseEntity { public DateTime? DeletedDateTime {...
0
votes
0answers
15 views

How to hide all year in datepicker except a year before today in ext.net

I have a problem with datepicker (datefield component) using ext.net, so in the datepicker that i use is only show month and year, however i can't eliminate (hide mode, not disable) another year which ...
0
votes
0answers
31 views

Why does a dotnet Core App with a reference to a classic .Net project works and compiles

I was under the impression from other questions and experience that you could not reference a classic .Net project from a dotnet Core project. Referencing old (full .NET Framework) Class Library when ...
0
votes
0answers
9 views

getting exception error “Error: The transaction is missing a valid account” while creating journal entry in sage50 with c# sdk

Getting exception while requesting to create a journal entry in sage50 error: "The transaction is missing a valid account" I am using c# sdk for this and I have print the my raw request made to ...
4
votes
1answer
42 views

Add OR condition on existent query nhibernate

I have a method called GetPaged that accepts an object which represents all definitions in a grid (kendo grid) compomenent and it envolves paging, filters and sorts. Our application uses NHibernate as ...
0
votes
1answer
12 views

how to deploy web app to azure with azure sdk

I can use Azure SDK for .Net to create a azure web app, but I do not know how to deploy my project with the sdk. var app = await azure.WebApps .Define(app1Name) .WithRegion(Region.USWest) ....
2
votes
1answer
84 views

Task doesn't get garbage-collected

This is not a duplicate of Task not garbage collected. The symptoms are similar though. The code below is a console app that creates an STA thread for use with WinForms. Tasks are posted to that ...
1
vote
1answer
12 views

Odata $expand not working in Dynamic EdmModel Creation

I have done the dynamic edm Model creation by taking reference from https://github.com/OData/ODataSamples/tree/master/WebApiCore/DynamicEdmModelCreation . I have added the odata query options to the ...
0
votes
0answers
9 views

How to execute python script in asp.net on load

I have a python code that scrape a webpage for currency convert. i did this one before for my php project and got to reuse it again. but dont know how to do with asp.net.. please help if there is any ...
0
votes
1answer
40 views

Best practice for waiting for event being fired in ASP.NET MVC

For example, we have some action and method, on which the event is being subscribed: // some response property static _response {get; set;} // client sends the post request [HttpPost]...
2
votes
1answer
23 views

Is there any other way to test connection of FTP server without using WebRequestMethods.Ftp.ListDirectory method?

I am using third party FTP server to upload files there. But before uploading, I want to implement test connection functionality, so user can test that he has entered correct credentials or not. The ...
-2
votes
1answer
39 views

Find the relationships and number of relations with given name [on hold]

In the diagram N, we have a set of users U who are having relationship R between each other. So, N = { U, R } where U = { Ramesh, Suresh, .. etc } & R = { Mahesh_Seema, Mahesh_Suresh, ...
0
votes
0answers
11 views

Sending X-XSRF-TOKEN in header result forbidden,status:403 using HttpClient in c#

The request through postman work fine. while in C# it give me the exception as the cookies and header values i get from browser call details in chrome. forbidden","status":403 The code so far, I ...
1
vote
1answer
16 views

Can I host a core webapi inside a console application?

Is it possible to build a console app that also hosts a .net core web api? So in other words instead of setting up the web application in IIS i can just run the console application, have the console ...
0
votes
2answers
43 views

.NET RegEx: Find function and validate

In the project I'm currently working on signals from various sources are captured in triggered events. To analize the signals we want to use some querying and came up with a naming convention for our ...
0
votes
1answer
16 views

Net Core: Does X.Paged List allow Multi Column Sorting?

Does X.PagedList allowing Multi Column Sorting, say Sorting by ProductName, and then Product Price? What is the directions and syntax for this? Trying to read the directions here, https://github.com/...
1
vote
0answers
17 views

NET.addAssembly returning strange Could to load assembly or one of its dependencies

I have a strange issue while loading some assembly of mine in Matlab: function [] = foo() %[ fold = 'c:\FolderWithAllAssembliesAndDependencies'; try NET.addAssembly(fullfile(fold, '...
0
votes
0answers
27 views

.Net Core 2.2: Common usage of static array in two different console applications

I've got a problem with a .Net Core 2.2 console application. I want to start an console app with an static array. This one connects to an TCP/IP partner. On start up, I start an second console ...
0
votes
1answer
15 views

SSL error when connecting react to asp.net web api from localhost

I'm trying to connect a react project to an asp.net web api project,but im getting this error Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
1
vote
1answer
56 views

Mapping with a condition

I want to map 2 objects based on a condition, if true mapp else ignore, the condition is not a part of source neither destination var mapperconfig = new MapperConfiguration(cfg => { ...
0
votes
1answer
32 views

Post request not working when too large data .net core web api

net core web api project I got one post request method which must be work with a lot of entities if i use send 20.000 or 30.000 entities its not a problem method works but if i send too large data ...
3
votes
2answers
74 views

Async method returning a completed task unexpectedly slow

I have some c# code that runs fine on a webserver. The code uses async/await because it performs some network calls in production environment. I also need to run some simulations on the code; it gets ...
0
votes
0answers
13 views

What's the difference of X509Certificate2.PublicKey.Key between .net core and .net framework

When migrating one of my projects from .NET Framework 4.6 to .NET Core 3.0, I find one line of code doesn't work in the new framework: X509Certificate2 clientCert; var csp = (RSACryptoServiceProvider)...
0
votes
0answers
23 views

Getting Error to publish.Net Core Api on Azure server

I am getting an error while publishing .net core API on Azure Server. Severity Code Description Project File Line Suppression State Error Web deployment task failed. (Connected to ...
0
votes
1answer
15 views

how to fix System.Web.Hosting not include in system.web

I am trying to to fetch image from server and display in my mobile using .net core API. and I use System.Web.Hosting.HostingEnvironment.MapPath(path) to map the path from server but it throw me an ...
0
votes
0answers
42 views

How to fixed a number and after that increase automatically?

here i want to set a fix number in my application like---- text box = 10001 after that i want to increase it automatically like '10001','10002','10003; etc. here short_no is 1 so the text box have ...
2
votes
1answer
36 views

Why ConcurrentDictionary has AddOrUpdate and GetOrAdd, but Dictionary has not?

In the .NET Framework, there is Dictionary and ConcurrentDictionary. These provide method like Add, Remove, and so on... I know when we design a multi-thread program, we use ConcurrentDictionary to ...
1
vote
0answers
22 views

Exact same OpenCover script completes successfully when run locally, but fails when run via Azure DevOps

Until a few days ago, I have been using OpenCover to run my unit tests and output code coverage without fail. I have a powershell script that I can run locally and also use in an Azure DevOps build ...
0
votes
1answer
19 views

Why does Chirp's Windows .net library would lose the second, the forth, the sixth and so on packets?

I tried to build and run the example ChirpConnectConsoleDemo in ChirpSDK-.Net-3.4.0 and found it was only able to receive the first, the third , the fifth and so on messages when I run a Chirp's ...