Questions tagged as 'c#'

1
answer

Substring (string.IndexOf) is returning unwanted parts

I'm capturing a music site . I would like to return only 2 information artist and music. It is in this code snippet: <div class="nowOnAir"> <a href="http://www.radioitalia.it/artista/edoardo_bennato/1.php" onclick="javasc...
asked by 03.08.2015 / 03:51
1
answer

Error consuming Web API

Hello, in an ASP.NET MVC web project I'm trying to consume an API that is a Web API project, the two applications are running on the same server. When I access the MVC application error occurs when this application attempts to consume the Web...
asked by 31.07.2015 / 15:04
1
answer

Error 242 when consuming NfeDownloadNF

I'm trying to consume the NFE download service on the farm: https://www.sefazvirtual.fazenda.gov.br/NfeDownloadNF/NfeDownloadNF.asmx But I have gotten the following error:    ERROR: 242   Reason: Rejection: nfeCabecMsg element mi...
asked by 03.11.2015 / 17:40
1
answer

Can not evaluate expression because the current thread is in stack overflow state

You're giving this error:    Can not evaluate expression because the current thread is in stack overflow state in the qtde variable by adding it in the desci list. class descricaoo : IInstrucao { private string...
asked by 29.10.2015 / 17:43
3
answers

Validation in Dropdownlist in ASP.Net MVC

I'm having trouble validating my dropdown in a view. In my model I use an annotation Required as shown in the code below: Model [Required(ErrorMessage="Informe uma cidade")] [Display(Name="Cidade")] public int CidadeID { get; set; } View...
asked by 22.04.2015 / 21:25
1
answer

Receiving all values in Lambda

My code has the following structure: var a = ViewData["a"]; var b = ViewData["b"]; var c = ViewData["c"]; var d = ViewData["d"]: foreach(var x in ObjetoE).where(x=> x.A == a && x.B == b && x.C == c && x.D == d){ // F...
asked by 14.04.2015 / 19:05
1
answer

problem with update Entity Framework 6

This is my upgrade method: public dynamic Atualizar(TEntity obj) { dynamic data = null; using (ClassContexto ctx = new ClassContexto(ClassMaster.conexao())) { try { ctx.Entry(obj).State = EntityState.Mod...
asked by 14.04.2015 / 21:05
1
answer

I am not able to extract a zip file into a folder

The code is giving this error:    A first chance exception of type 'Ionic.Zip.ZipException' occurred in Ionic.Zip.dll   Additional information: Can not read that as a ZipFile       If there is a handler for this exception, the program may b...
asked by 26.04.2015 / 17:21
1
answer

Security attributes in web service

Can you use AuthorizeAttribute in webservice asmx, soap or rest? And custom attributes, like the one below (example only)? [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct) ] p...
asked by 21.10.2015 / 20:57
1
answer

Web server that receives and sends parameters to C #, is it possible?

I developed a C # (.NET) software that sends / receives text files to an FTP server, but for security I try to work only with parameters of types String / Bytes for security reasons, my question is: "Can I create a web server (I ca...
asked by 18.11.2014 / 19:49