Questions tagged as 'c#'

0
answers

Error accessing AutomationElement without admin

I'm trying to retrieve the TabsControl tab from a Windows screen, but it returns NULL when I'm not with visual studio admin. Is there a way to do this without being admin? or has another framework that lets you do this without admin....
asked by 14.08.2018 / 21:25
2
answers

Code-First Fluent API with complex classes in ASP.NET Core 2.1

Error while performing Add-Migration when using ComplexType classes. public class Cliente : EntityBase { public Cliente() { #region Create HashSet Properties Lists Dependences Titulares = new HashSet<ClienteC...
asked by 15.08.2018 / 19:02
1
answer

Is it possible to connect to a VPN via C # code?

My work machine accesses the company's VPN, and when I run the Console application on my machine, I need to be connected to it because the IP of the bank (10.0.0.7) is only accessible via VPN. The problem is, the internet ALWAYS FALLS, and...
asked by 10.08.2018 / 20:59
1
answer

How to return a pdf in Web Api C # without doing dowload and open in Browser?

Good afternoon, I'm using httpResponseMessage , every request it downloads. Did you want it to appear in your browser when prompted? HttpResponseMessage responseMsg = new HttpResponseMessage(HttpStatusCode.OK); responseMsg.Content = n...
asked by 09.08.2018 / 21:12
3
answers

How to break line after 29 C # digits?

How do I do that every 29 digits, the line breaks? var hs = hs_codes.Text; var texto = new StringBuilder(hs.Length); var digito = true; foreach(var chr in hs) { if (char.IsDigit(chr)) {...
asked by 08.08.2018 / 23:50
0
answers

Performance and dynamism with the NET CORE 2.1 contexts

I'm creating an api with asp net core 2.1 and I can not use identity , I know that it already has a whole library built for user manipulation and everything else, however, , in my project I can not use it. Contextualized, I would like to know i...
asked by 08.08.2018 / 23:04
0
answers

I am consuming an API with basic authentication oauth and returns: Incorrect request (400)

Talk, guys! Next, I developed a spring boot api and I already tested it with the postman and it is working normally, its security is very basic auth authentication. Now I am testing in a C # application that I have here to return the token to...
asked by 12.08.2018 / 17:49
1
answer

How to write information (cpf) of an edit with a mask and a numeric field

In the database I have the CPF field of type bigint. In the model it is a long. This is what was requested in the requirement. Well, in the model I will masquerade for a DataType.Text to accept the mask, but when I leave the field (OnBlur) the f...
asked by 12.08.2018 / 18:28
0
answers

SHA256 standard eSocial Vs. Framework .NET 4.6

Good morning, I have an application developed in C #, installed on several clients. I've developed the code snippet below for signing on SHA256 and it works great with the latest .NET FRAMEWORKS: class Assinatura { public string Assi...
asked by 15.08.2018 / 16:12
0
answers

How to define the order of a list dynamically using Linq and C #

Hello, I'm creating a method so that I can return a list of people where, I pass the column that should be sorted and whether it is increasing or decreasing. So: public async Task<List<Pessoa>> getAsync() => await getAsync("id"...
asked by 07.08.2018 / 23:22