Questions tagged as 'c#'

2
answers

C # Convert DataSet in JSON

I need to convert a DataSet into a JSON so I can retrieve it in View. The query here is just an example, because it is a large query. I have seen in some places things like: string json = JsonConvert.SerializeObject(table, Formatting.Indented)...
asked by 08.01.2018 / 17:44
1
answer

Access Database on the client machine from Web Application

Hello, good afternoon. I'm developing a system that has only one code for multiple databases. The system has already implemented almost everything, but when I started to test the connection on the client machine, after I publish it is always...
asked by 08.01.2018 / 19:40
1
answer

Assembly.Load error Could not load file or assembly 'X' or one of its dependencies. The system can not find the specified file

I'm having an error while using Assembly.Load(X); . The path is right, I think it is giving error when trying to load a dependency from the assembly. But I find it strange that in Visual Studio 2017 I can import the assembly into my projec...
asked by 08.01.2018 / 17:00
1
answer

Pass data to the viewbag of the controller for view using Chart.JS

I'm trying to pass data from a list to a viewbag, but it's not returning correctly in the view. Mytemplateandcontrol:publicclassDataPoint{publicStringnome=null;publicdoubley=0;publicDataPoint(Stringnome,doubley){this.nome=nome;this.y=y;}}pub...
asked by 03.01.2018 / 17:17
1
answer

Error adding view in visual studio

Hello, I'm starting in ASP.NET MVC and am having this problem when adding a view, would anyone know what this error is about? Error:    There was an error running the selected code generator:       Exception has been thrown by the target o...
asked by 09.01.2018 / 04:15
1
answer

Problems consuming REST by my App

Actually I did on the service side (which is working) I'm serializing a list, but in fact it's just a single value returned. For this service I have only one information, a decimal value, but I tried to put a simple Task and a FirstOrDefault...
asked by 09.01.2018 / 12:58
1
answer

Receiving json from a web server

I'm working with firebase, and am fetching the data from the server with HttpWebRequest, I was able to retrieve this data as follows;    {"- L1OD7LjENM8ZHSpS7NE": {"Age": "18   years "," Name ":" vitor "," Telephone ":" 11   970705570 "}," -...
asked by 30.12.2017 / 20:02
1
answer

Problems with FindSystemTimeZoneById in Web.API .NET Core in Docker (Linux)

Scenario: I'm migrating a WebAPI to .NET Core, in Windows it's running normally. Problem When I'm running on Docker (Linux) (docker-compose) I'm having the following problem:    "The time zone ID 'W. Europe Standard Time' was not...
asked by 30.12.2017 / 12:17
1
answer

Connect to a local database C #

What is the correct syntax for SqlConnection to connect to a local database? I think it is qlq thing of this kind !! SqlConnection liga = new SqlConnection(@"Data Source=(LocalDB)\v11.0; AttachDbFilename=|DataDirector...
asked by 26.12.2017 / 01:52
2
answers

Increase file upload limit by C # App.Config?

I have a problem, we use a file upload system that was done in WebApplication and we will implement it in a dll as well. In WebApplication, you can configure the Web.config maximum size of the file to be sent using the maxRequestLength (IIS
asked by 26.12.2017 / 15:09