如何使用Silverlight应用程序获取域名和Windows登录名 [英] how to get domain name and windows login name using silverlight application

查看:102
本文介绍了如何使用Silverlight应用程序获取域名和Windows登录名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试通过在aspx页面中编写以下代码来进行尝试

<参数名称= "  "   UserName =<%= Request.ServerVariables [" LOGON_USE  R" /> 



<参数名称= "  "   username =<%= User.Identity.Name%>"/> 


或者,但是它给了我"Null"值
当我在服务器端的IIS上运行它时.

在Silverlight应用程序中可以做到吗?
在此先感谢您.

解决方案

由于您必须将siverlight应用程序嵌入到aspx页面中,为什么不在查询字符串中传递该信息(我d还要对其进行加密)?抱歉,我也是Silverlight n .net的新手
"Silverlight应用程序的MainPage.xaml中的Silverlight页面的UriMapper元素是做什么的"
是什么意思?

感谢您的答复


I have tried it by writting following code in aspx page

<param name="initParams" value="UserName=<%= Request.ServerVariables["LOGON_USER"]%>"/>


and

<param name="initParams" value="username=<%= User.Identity.Name %>" />


alternatively, but its giving me "Null" value
When i run it on IIS on server side.

Is it possible to do it in silverlight application?
Thanks in advance.

解决方案

Since you have to embed the siverlight app into the aspx page, why don''t you pass that info in the querystring (I''d encrypt it as well)?


Do you have an appropriate UriMapper element for the silverlight page in the MainPage.xaml of your silverlight app?


sorry, i m new to silverlight n .net too
What does " UriMapper element for the silverlight page in the MainPage.xaml of your silverlight app"
mean?

thanks for ur reply


这篇关于如何使用Silverlight应用程序获取域名和Windows登录名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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