简体   繁体   中英

Close silverlight applications and redirect to parent applications

My company is developing a Silverlight application which we then give to our clients who integrate it with their product. You can log into the application by going through a form or using a URI where you pass some needed data. If you provide false data (ie you can not be authenticated) you get a message and the applications closes. Then the user just has a blank (white) screen in front of him. We don't want that to be the case any more. Instead we would like to redirect to the calling page (where the user clicked the link to start the app).

So if for example user A has his application open on http://hisdomain.com/work and clicks on a link that redirects him to our Silverlight app where the authentication fails we would like to show him a message (this is happening at the momment) and then redirect him back to http://hisdomain.com/work .

Any ideas how to do this?

I am still in R&D about this so I have not much of an idea about it. The only thing that came to my mind was to pass in the calling URL along with the rest of the data.

Thanks.

如果您可以使用启动参数将起始URL传递到Silverlight应用程序,则可以使用以下方法重定向:

System.Windows.HtmlPage.Window.Navigate(new Uri("YourStartupUrl.aspx", UriKind.Relative));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM