Questions tagged as 'c#'

2
answers

Deserialize json string array to string array

Hello, I'm having trouble deserializing a Json, I'm not getting the right data. There is the Main Class that would receive the data list public class PermissaoDossie { [JsonProperty(PropertyName = "data")] public strin...
asked by 08.08.2017 / 17:01
4
answers

Create method that prevents code repetition in ASP.NET with SQL

I'm building a website in ASP.NET, using C #. I want to 'link' the site information (text and images) to a SQL Server database. That part of the connection I've been able to do successfully. However, I have to repeat BD connection encoding...
asked by 15.05.2017 / 16:10
1
answer

Invalid parameter when Initializing Process () that executes Git ssh in Console Application from C #

I'm trying to make a Console Application in C # with some command options to run in Git ssh. The Git ssh executable is in the following path: C: / Program Files (x86) /Git/bin/sh.exe, and I'm trying to run a simple command like this: string pa...
asked by 12.04.2017 / 14:30
2
answers

Filling in textbox of a form with information from a datagridview

I have a datagrideview on a form, and I need it when I click on the datagridview cell it fills two fields in another form. As I show in the image below. AlsofollowmycodepublicpartialclassfrmFaturaAnual:Form{SqlConnectionconexao=null;SqlCo...
asked by 11.04.2017 / 21:11
1
answer

Get a specific file in an FTP directory

I have two methods, one sends a file via FTP and the other one consumes a file via FTP. The files have the dynamic name DateTime.Now each day a new file. example: coletas-04-04-2017 16_00_19.xlsx In the Send method I get the current...
asked by 06.04.2017 / 21:52
1
answer

SMTP connection error with C # (authenticated)

Below is the Script used when trying to send an error: SSPI call failed. the Client and Server can not communicate because they do not have a common algorithm. string CorpoEmail = file; MailMessage mailMessage = new MailMessage(); // E...
asked by 06.05.2017 / 14:08
1
answer

Remove multiple authentication per protocol

Hello, I'm implementing MVC with Asp.Net Identity , however, I'm having some problems ... Scenario: I'm logging in from the HTTP protocol, everything goes in normally. When I try to access any page with HTTPS protocol, it does not s...
asked by 09.05.2017 / 01:54
2
answers

How do I put the usermanager property to be started in my Model

I would like the form Name to be filled in automatically by the username of the logged in user. How do I include this property in my Model ? public class Condominio { public int CondominioId { get; set; }...
asked by 16.05.2017 / 23:38
2
answers

Limit character entry in EditFor in MVC

I have a character limiter for just TEXT. Now I need the characters to be limited to only 2 (I want to make the user type the state, for example: PR, SP, RJ ...). How do I do it? $(document).ready(function () { $(".apenastexto").ke...
asked by 18.05.2017 / 02:23
2
answers

Make one method wait for the other to finish

Good morning everyone, I have the following doubt, when clicking on a button my program does with if you run 2 methods simultaneously, method of sending email, and method of generating the pdf, it happens that the method of sending email always...
asked by 14.03.2017 / 15:29