I am new to C# and I'm trying to launch the default internet browser. I'm getting the error message "The requested section was not present in the activation context" when I run the setup application. Does anyone know what this error message means? And does anyone know of a good C# book with good examples and talks about setup and deployment? Here's the code that I've placed after the InitializeComponent function:
public override void Install(IDictionary stateSaver)
{
base.Install (stateSaver);
string target = "http://www.microsoft.com";
try
{
System.Diagnostics.Process.Start(target);
}
catch
(System.ComponentModel.Win32Exception noBrowser)
{
if(noBrowser.ErrorCode==-2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
}
public override void Install(IDictionary stateSaver)
{
base.Install (stateSaver);
string target = "http://www.microsoft.com";
try
{
System.Diagnostics.Process.Start(target);
}
catch
(System.ComponentModel.Win32Exception noBrowser)
{
if(noBrowser.ErrorCode==-2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}
}