I have a very confusing and frustrating issue. To cut a long story short I have a webAPI to convert a PDF into an image. I bind the source of an imageview to this with the help of a converter.
when I run the ASP.net project in debug mode and point the MAUI app to localhost it works fine. But when I try to deploy it, it's not working. I'm probably not explaining it very well. Please take a look at code below:
In XAML for MAUI app:
<Image Grid.Column="0" Source="{Binding PDFPath, Converter={StaticResource urlformatconverter}}" Grid.RowSpan="2" Aspect="Fill" MaximumWidthRequest="200" />
the converter looks like this:
correctedstring = urlpath + pdfpath + pagesettings + xdim + sizeofimg + ydim + sizeofimg;
return correctedstring;
path is now in UNC format as mapped drives were causing me even more of a headache.
The API takes a UNC path of the PDF and then returns the image. This works fine in a browser and the image is displayed to the correct size. It also works fine when the Asp app is running in debug on the localhost, but on the deployment server it won't work. I've checked permissions, and I can still view the image in the browser, but imageview is still blank.
Any ideas? I'm getting very frustrated!