如何知道来自Silverlight OOB应用程序的请求? [英] How to know the request coming from Silverlight OOB application ?

查看:86
本文介绍了如何知道来自Silverlight OOB应用程序的请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我的应用程序出现问题..我创建了可以由客户端在自己的本地计算机上安装的Out of browser应用程序.在该应用程序中,有一个文本框和提交"按钮.当用户输入自己的用户名并单击提交"按钮时,它将重定向到我的asp.net网站.但是我怎么知道它是否来自我的应用程序.

Hello friend,

I am getting problem in my application..I have created Out of browser application that can install by client on own local machine. In that application there is one textbox and submit button. when user entered own username and click on the submit button it redirect to my asp.net website. but How I know that it coming from my application or not.

推荐答案

您可以在请求中保留一些特定的HTTP标头.桌面应用程序必须将这些标头发送到您的应用程序,否则您的网站应返回未经授权的访问"类消息.这些标头可能类似于UserName和Password.
You can keep some specific HTTP headers in the request. The desktop application must send those headers to your application or else your website should return "unauthorized access" kind of message. These headers could be like UserName and Password.


一种实现此目的的方法是传递在客户端或服务器之间共享的安全令牌或密钥.
生成密钥的算法在两者之间共享,以便服务器理解客户端发送的密钥.

这可以帮助您入门-客户端/服务器加密以及其他功能 [
One way to do this is to pass a secure token or key which is shared across the client or server.
The algorithm that generates the key is shared across both so that the server understands the key sent by the client.

This could help you get started - Client/Server Encryption plus extras[^].

Another way to do this could be to use an SSL certification that would be installed on the client - however, that is probably not the best approach for a Silverlight application running in a sandbox.


如果您正在使用常规的URL浏览器查询,为什么不将?ref = [app]添加到查询字符串...
If you''re using a regular URL browser query, why not add ?ref=[app] to the querystring...


这篇关于如何知道来自Silverlight OOB应用程序的请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆