Display something stored in memory.

Hi, My first question here in the WPF forum.

I just want to know which way to approach the situation.In ASP.NET you have

System.Web.HttpContext.Current.Session["stest"] ="test"

etc to set something in session.So if I make xamlbrowserapplication can I do something similar ?

[302 byte] By [abm_v] at [2008-1-4]
# 1

Well the XBAP runs on the client machine, so the if you wanted to access something something that's stored on the server (such as ASP.NET session state) the best way is to make a call to a web service that runs there.

However, since you're just running on the client machine, you can maintain your state there. At that point you can just start storing things in fields on your classes. Also, if you wanted something similar to session state when writing a navigation based XBAP, you can use the Application.Properties dictionary to store state that is accessible across pages.

HTH,
Drew

DrewMarsh at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2
Thank you for your reply.I got your point.

I was looking for a suggestion for a scenario in which I am hosting a xbap application (that say displays some customer data etc.) in a sub-directory or url like (\locahost\myApp\xbabp\cuslist.xbap) and I have a web app at (\localhost\myApp\).Say I use authentication to login to the web app (\localhost\myApp\login.aspx) and say I have a link to the xbap page in the navigation menu I need a way to use the same credentials so that the cuslist.xbap will display the data.

Question is

How do I share the authentication?

Do I have to make a login for the xbap page also , this would mean that the user who logged in already in the myApp (web app) would have to re-log in at the cuslist.xbap so that the data would be displayed.This would be a hassle ,each time.

Even if I use some webservice to pass the login info and get a token or something what or how would the xbap page know?

Any ideas and insight appreciated

Thanks in advance.

abm_v at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3

Unfortunately, v1 does not provide support for HTML->XBAP single sign-on. The next release will make this easier, with integrated access to the browser cookies.

Here's what you can try to do now: Generate some authentication token in your "web application". When you start the XBAP, pass the token as a query string: for example, http://myserver/myapp/xbapp/custlist.xbap?auth=token. When the XBAP starts, it can get the URI from BrowserInteropHelper.Source, read the auth. token, and pass it to the server with subsequent requests.

ChangoV.-MSFT at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 4

Is there a list somewhere which tells the new features in the next version,btw when you say next version do you mean VS2008

Thanks

leed at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified