api result different from my site result

Asked

Viewed 41 times

0

I created a C# API in Azure where it returns me an array by passing the following parameters:

tccapiwebservice.azurewebsites.net/api/Algoritimos/PostAlgoritimo?_funcobjetiva=5,00;3,50&_maxmin=true&_restricoes=1,5;1.1;0.0;1&_sinalres=2;2;2&_valoruni=400;150;300&_tipo=true

This version is the same as running on my site, only when I pass the same parameters to the local API it brings me different results, it follows the same:

API Azure (unexpected result)

inserir a descrição da imagem aqui

Local API (expected result)

inserir a descrição da imagem aqui


I don’t know why they’re giving different results.

  • 1

    note that the decimal separator in Azure is . and on the spot is , if you’re not treating this correctly, you’ll certainly have problems

  • thank you very much, that was exactly it! To tidy up I put in my webconfig the tag globalization as standard!

1 answer

1

Check the configuration of culture because in Zure the decimal separator is the point (.) and local is comma (,).

As in the parameter you pass values with separators, error may be happening while treating these values.

As informed by the colleague, he decided to tag globalization in the web.config as standard EN

Browser other questions tagged

You are not signed in. Login or sign up in order to post.