Last post Jan 01, 2019 07:46 AM by Zhi Lv - MSFT
Dec 10, 2018 09:17 PM|arfaie|LINK
I have some api in mvc that work with an android app
in localhost there is no problem!
but when I publish this project on host,I can just read data and can not > insert,update or delete by my api via android app
i connect to host database via sql management and there i can do every action exampe add record or update
i test this way by localhost but this time set connection string to host database!
also woks correctly!
but when the project is uploaded on host,appear this problems!
thanks for Any Help :)
Dec 11, 2018 02:43 AM|wmec|LINK
Try to put this
<add name="conn2" connectionString="Data Source=192.168.?.?\your_db_instance;Initial Catalog=your_db_schema;Integrated Security=False;User ID=your_db_login;Password=??????" providerName="System.Data.SqlClient"/>
within Web.config/app.config file in your project, to ensure the project will work fine with the database.
Dec 11, 2018 12:27 PM|arfaie|LINK
Many Thanks For your Answer
But the problem is still alive!
is there any other issue about this problem?
Dec 11, 2018 12:39 PM|PatriceSc|LINK
Check the Windows event log. Error messages should be written there by default. It is often much quciker to start from an actual error message rather than trying to guess which frequent issues you may have run into (and it's almost impossible to run if some
reason you ran into something unusual).
Jan 01, 2019 07:46 AM|Zhi Lv - MSFT|LINK
Have you ever solved this problem?
If not, you could also try to use F12 developer tools to check whether you could call the API success. If there is some error?