Reputation: 599
My website is in Azure and the Database is MySQL, ASP.NET 4.0
When I run on localhost (Connected to production DB), I can read-write to the DB in utf8.
When I run on Azure (aka, production) I can only read DB in utf8 but when trying to write it inserts '???? ???? ????'.
So, If it's the same Database and same code, the difference must be IIS, no?
Can anyone assist me how to define it to work?
(btw, the MySQL connection-string has 'charset=utf8
')
update: the web.config file has:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
Upvotes: 1
Views: 1811
Reputation: 599
A Ha! It was Azure! I needed to go to the Azure Portal and change the connection string there as it ignores my web.config connection string and uses that one instead.
By the way, adding the charset=utf8
there did the trick.
I hope someone will find it useful.
Upvotes: 1