WebAPI ASP.NET Error 404 when using GET / api / controller?

0

I have problems trying to fill a table using AJAX / JSON. To obtain the data I use as url /api/controlador .

I've already added the .json extension and from what I understand, the problem is that the url that you are trying to access is C:\inetpub\wwwroot\api\controlador\

    
asked by VicSulva 15.02.2017 в 18:01
source

1 answer

1

If the url is C:\inetpub\wwwroot\api\controlador\ is incorrect, because that is not a url, it is a physical path to a folder.

I do not know which client you're invoking webapi, but it should be something like: http://<sitio>/api/controller

in this case if you invoke it as GET you would be entering the action you define for that event http

Here

Calling to Web API From a .NET Client (C #)

Explains how to use the class HttpClient to invoke from a client application to webapi, it is important to note how it defines a BaseAddress as root of the website where you host

Note: you do not have to add any .json extension

    
answered by 15.02.2017 в 22:30
___ ___ erkimt help printing binary values of a Huffman algorithm ______ qstntxt ___

I'm making a Huffman tree and I want to show the result of the message on the screen. Something like:

%pre%

But I have problems saving the numbers to print them in order of the message.

%pre%

The problem is that when I save the numbers I can only do it with vector < int & Number and that generates the outputs:

%pre%

When I want to save it in a string or char, so that:

%pre%

    
______ azszpr39118 ___

The problem, as you say, is that you are working with sequences instead of numbers. The digits to the left are significant and that a whole type does not support it. Hence, you can not group each sequence into a single index of the vector %code% .

One solution is to replace %code% so that it happens to store elementso of type %code% :

%pre%

Now, for each letter, we convert the Boolean sequence into a string:

%pre%     
___ problem with the ruby on rails server