mailto Invalid URI: The hostname could not be parsed.

By | December 19, 2019 | 0 Comment
Category: .Net

If the uri is “mailto”, the uri format must be “ Feedback&body=Hi there, I really liked your app.”. I encountered an error “System.UriFormatException: Invalid URI: The hostname could not be parsed.” and it was difficult to find the root cause. Finally I found that I used “&subject” for the first parameter instead of “?subject”. Once I used “?subject”, everything worked as expected.

About Vishal Monpara

Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1's and 0's from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.