Currently we have a solution that grabs the filename from the URL using this
currentFile = Path.GetFileNameWithoutExtension(url);
We found that if there are query strings attached that include characters such as quotes it returns with an error of Illegal characters in path.
For example if the url is
http:\\myurl.com\mypage.aspx?utm_content=This+Is+"Broken"
Then it won't get the filename. Is there a better, cleaner way to get "mypage"?