2

I'm trying to do some work with fakemailgenerator, the url goes well with httpwebrequest and gets printed by MessageBox.Show properly, here is the piece of code with the problem, btw there no errors or exeptions.

                //FOR EXAMPLE mail@fakemail.com
                string[] mailSplit = mail.Split(new string[] { "@" }, 
                StringSplitOptions.None); // MAKING AN ARRAY TO SPLIT USER 
                AND DOMAIN

                string url = @"http://www.fakemailgenerator.com/#/" + 
                mailSplit[1] + "/" + mailSplit[0] + "/"; //GENERATING AND SAVING THE FAKE MAIL URL.
                MessageBox.Show(url); //THIS PRINTS http://www.fakemailgenerator.com/#/fakemail.com/mail
                Process.Start("chrome", url); //THIS GOES TO http://www.fakemailgenerator.com/#/fakemail.com

EDIT

This have nothing to do with fakemailgenerator.com, because as mentioned above i tried that with httpwebrequest, plus in the loading state it's just http://www.fakemailgenerator.com/#/fakemail.com and not the full url.

EDIT

I tried rightnow putting the url manually and it went good and have been opened in chrome successfully, and i have observed one problem with the url when printed with MessageBox.Show (while using variables, not setting url manually), is showing url like http://www.fakemailgenerator.com/#/domain.com /userwith a whitespace between .com and /user, so i've tried replacing the white space with \0 (null) using url.Replace(' ','\0'), but this failed, so i think maybe there is a way to remove the white space?

nomorehere
  • 332
  • 2
  • 12

2 Answers2

0

Ran the code and it worked fine. A new Chrome window opened with the correct (full) url. It's an error page for me though, but if the site really exists when you try to reach it, perhaps there is some kind of a redirect that redirects you to a site with the shorter url.

0

I've figured around the problem, i don't really know where it's coming from, but all i know is that a whitespace was being added to the url in a way that makes process.Start("chrome",url); receives only the part before the whitespace; http://www.fakemailgenerator.com/#/domain.com/ , so i've just removed the whitespace with url = url.Replace(" ",string.Empty); and now the code works just fine.

nomorehere
  • 332
  • 2
  • 12