I have http get action that sends some user information from database, including small image(around 100kb) even thought I understand its not the best solution, I store it in byte[] and convert to base64string before sending it to view. This string is part of viewModel, I dont send it directly with url. When the length of the string is under 30k characters It does work, but as it goes near 100k i get exception: "Invalid URI: The Uri string is too long". How is my viewModel property bidden with uri length? And what can be possible workaround?
var viewModel = new UserViewModel(){ Image = Convert.ToBase64String(user.Image)};
return View(viewModel);
Any information would be much appreciated.