Unable to open browser from c# winforms

1.4k Views Asked by At

I am using following code to open an IE browser from toolstipmenu_click() but getting this message as:

Error :No application is associated with the specified file for this operation

My code:

private void TutorialsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Process.Start("http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.speech.desktop&lang=en&cr=US");
            Webbrowser();            

        }

        private void Webbrowser()
        {
            System.Threading.Thread web = new System.Threading.Thread(new
            System.Threading.ThreadStart(launchbrowser));
            web.Start();
        }

        private void launchbrowser()
        {
            System.Diagnostics.Process.Start("http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.speech.desktop&lang=en&cr=US");
        }

Please assist me asap.

2

There are 2 best solutions below

0
On

That technique has some known drawbacks as mentioned in this KB Article.

It could also be a problem with the querystring attached to the URL. Try launching it without the querystring and if that works you can proceed from there.

0
On

I would suggest you check the comment by Eric Law (of Microsoft) on the bottom of this answer to a very similar question.

Alternatively, there are a bunch of slightly different answers in that thread that will all do the job for you.