I want to call aspx page from my silverlight application. I kept that aspx page in .Web part of my silverlight application so that i can use crystal reports in my silverlight application.
My code for calling that asp.net page in silverlight page is
private void bttnGenerateReport_Click(object sender, RoutedEventArgs e)
{
if (cboBranch.SelectedIndex != -1)
{
Uri myUri = null;
myUri = new Uri(HtmlPage.Document.DocumentUri, String.Format("Reports/ConcurrentReport.aspx?PlanCode={0}&BranchCode={1}", PlanCode, BranchCode));
HtmlPage.Window.Navigate(myUri, "_blank");
}
}
but i am getting the error at HtmlPage.Window.Navigate(myUri, “_blank”) as “Access is denied” .. invalidoperationexception was unhandled
i am using Windows 7 and IE8
the problem got resolved , actually my web project was not the startup project infact the silverlight project was the startup project thus the url had file system path and that was causing “access denied”.