I am upgrading a DNN Ajax datagrid page to a Silverlight2 datagrid application within DNN 4.8.4. The DNN site is running on my local XP SP2 PC under /localhost.
I am storing documents ( .txt, pdf, xls, doc ) files in a SqlServer 2005 db in an image field. I read the Sql documents table and display the document description and documentID (primary key) in a Silverlight datagrid. The user selects a grid row ( docID ) and pushes a button.
1) Silverlight app opens a new browser - DNN displayDoc.aspx page
Uri uri = new Uri("http://localhost/myDNN/DesktopModules/Docs/displayDoc.aspx");
HtmlWindow window = HtmlPage.Window;
window.Navigate(uri, "_blank");
2) The displayDoc code behind page "retrieves" the "docID" key, reads the document from the database into a byte array and displays in the newly opened browser via Response.BinaryWrite.
My orignal DNN .aspx module used Session variable to hold the docID.
I have not been able to get docID data field from Silverlight to a newly open browser ASPX page. I tried 2 methods:
1) The SilverLight app called a DNN Webservice. The Webservice then stored the value: Session(DocKey) = docID. This does not work because the Webservice call is asynchronous i.e the new ASPX browser page may get a stale Session(DocKey) value ( the async webservice has not completed the Session write). I put a 2 second SLEEP after the call to the Webservice and before opening the new browser window but this did not work.
2) Isolated storage.
Dim isoFile As IsolatedStorageFile = IsolatedStorageFile.GetMachineStoreForApplication()
This was the only property that was common between the page.xaml.vb and App_Code\webserviceSessionFunction.vb. But I get this error:
" GetUserStoreForApplication Unable to determine application identity of the caller."
Googling indicates this only works for ClickOnce apps. I don't know how this relates to my DNN site.
Thanks for any help.