Questions tagged as 'c#'

0
answers

How can I access elements of the main thread in other threads? [duplicate]

I'm having this error    The operation between threads is not valid: 'LblCheck' control   from a thread other than the thread where it was created. Task tarefa = Task.Run(() =>{ } .ContinueWith(t => { LblC...
asked by 08.12.2017 / 16:30
1
answer

Retrieve parameter filled in in ActionResult

I have a problem that I have tried in many ways to solve and nothing. When loading the page the page is filled into a table a list, but when it is submitted the template is null, but if you query the Request.Form.ToString () property the values...
asked by 04.12.2017 / 18:21
1
answer

How to create a POST-type method in WCF (.NET) that receives a String parameter by URL and Stream by POST?

I tried to use it in my service but I can not get anything different from this error. Error : ExceptionDetail, provavelmente criado por IncludeExceptionDetailInFaults=true, cujo valor é: System.InvalidOperationException: Foi gerada uma...
asked by 04.12.2017 / 19:01
1
answer

Download pdf does not work - AngularJS, C #

I need to return a pdf and download it on the machine. But when you return the pdf, Blob does not recognize it. $http.post($rootScope.raiz_ws + "/pdf/PdfCompraVenda", listProdutos) .then(function (response) { consol...
asked by 01.12.2017 / 21:02
1
answer

Convert CURL command in WebRequest

I need to run the command below: curl -X POST -u "{username}":"{password}" -H "Content-Type: application/json" -d '{ "name": "my_environment", "description": "My environment" }' "https://gateway.watsonplatform.net/discovery/api/v1/enviro...
asked by 02.12.2017 / 21:14
1
answer

Getting a string from an XML that I received from an http request

So, the problem at hand now is that I have to get two rows that are in an XML, I get that XML through an httpRequest, and the problem apparently starts. What I've tried so far was: ... [WebMethod] public void PassaProtocolo(int numProtoco...
asked by 01.12.2017 / 14:20
0
answers

Open VS Code projects for VS 2017

I have the layered architecture that was created in Visual Studio Code: WhenopeninginVisualStudio2017itdoesnotopenallfiles: RunningtheprojectbyselectingWeb.Apialwaysgivesthefollowingerror: What is the reason for this error?     
asked by 01.12.2017 / 13:53
0
answers

Doubt in the html.Dropdownlist powered by a ViewBag

I'm having the following problem: I need to send, instead of Id of ViewBag , Municipio , which is contained in ViewBag.Cidades . How do I change from Id to Municipio when I click Search to send the municipality...
asked by 29.11.2017 / 21:10
0
answers

How do I read the xsd file from within my C # project

I'm doing xml validation from an xsd file like this: XmlSchemaSet schemaSet = new XmlSchemaSet(); schemaSet.Add("urn:bookstore-schema", @"D:\Arquivo\VoltVarPlanning.xsd"); Validate("D:/Arquivo/Exemplo_Saida.xml", schemaSet); But I do not w...
asked by 29.11.2017 / 16:20
0
answers

Save File on Physical Path

I'm uploading an image I get via form using C # ASP.NET. My code is working like this: [HttpPost] public ActionResult UploadFile(HttpPostedFileBase file) { try { if (file.ContentLength > 0) {...
asked by 29.11.2017 / 18:22