可以由wcf直接得到参数 ,具体代码如下:

using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;
using BS.EAP.DBAccess;
using System.Data;
using System.Xml;
using System.Collections;
using BS.EAP.Authentication;//引用到的类型CurrentUserInfo
using BS.EAP.Account.Model; //引用到的类型SYS_APPLICATIONInfo

public class DBService : System.Web.UI.Page //继承类 Session
    {

[OperationContract]
        public void DoWork()
        {
            // 在此处添加操作实现
            return;
        }

//定义全局变量接收参数
        public static string strUserid;
        public static string strAppid;
        public static string strChartName;

//

/// <summary>
        /// 当前用户信息 CurrentUserInfo 是类: CurrentUserInfo.cs
        /// </summary>
        public CurrentUserInfo CurrentUserInfo
        {
            get
            {
                if (Session["CurrentUserInfo"] != null)
                {
                    return (CurrentUserInfo)Session["CurrentUserInfo"];
                }
                return null;
            }
        }

/// <summary>
        /// 当前业务类别 SYS_APPLICATIONInfo 是类:SYS_APPLICATIONInfo.cs
        /// </summary>
        public SYS_APPLICATIONInfo CurrentApplication
        {
            get
            {
                if (Session["CurrentApplication"] != null)
                {
                    return (SYS_APPLICATIONInfo)Session["CurrentApplication"];
                }
                return null;
            }
            set
            {
                Session["CurrentApplication"] = value;
            }
        }

strUserid= CurrentUserInfo.CurrUserInfo.USERID.ToString();
 strAppid= this.CurrentApplication.APPID.ToString();

//其他的操作

}

silverlight+wcf 获得web参数的更多相关文章

  1. [silverlight—wcf]参数:调试资源字符串不可用,秘钥和参数通常提供足够的信息用以诊断问题。

    这段时间在做一个项目,有一项需求是上传,经过思考之后,决定采取Silverlight+WCF的方式做上传操作.就在项目做完了之后,本地测试也都没问题,发布到服务器上的时候,顿时就出现故障了.在选择文件 ...

  2. [SL] Silverlight + WCF Demo项目

    I:项目描述:利用 Silverlight+WCF 技术,模拟资源管理器(如图1)功能,通过地址栏输入本地文件夹路径,然后将解析出来的该目录下所有文件(夹)存储到数据库中,然后再加载到界面上显示出来: ...

  3. 【WCF】Silverlight+wcf+自定义用户名密码验证

    本文摘自 http://www.cnblogs.com/virusswb/archive/2010/01/26/1656543.html 在昨天的博文Silverlight3+wcf+在不使用证书的情 ...

  4. WCF与Web API 区别

    WCF与Web API 区别(应用场景)   Web api  主要功能: 支持基于Http verb (GET, POST, PUT, DELETE)的CRUD (create, retrieve, ...

  5. Web API、WCF和Web Service的区别

    [转载] Web Service 1.它是基于SOAP协议的,数据格式是XML 2.只支持HTTP协议 3.它不是开源的,但可以被任意一个了解XML的人使用 4.它只能部署在IIS上 WCF 1.这个 ...

  6. webservice和wcf和web.api简单介绍

    转自:无废话的wcf等等 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API.在.net平台下,你有很多的选择来构建一个HTTP Ser ...

  7. http服务 WCF、Web API、Web service、WCF REST之间的区别

      http服务 WCF.Web API.Web service.WCF REST之间的区别 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web ...

  8. WCF、Web API、WCF REST、Web Service比较

    原文地址:http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and- ...

  9. Difference between WCF and Web API and WCF REST and Web Service

    The .Net framework has a number of technologies that allow you to create HTTP services such as Web S ...

随机推荐

  1. Mac os 上可执行jar包转app方法

    此操作可分如下几步: 1:生成jarbao: jar cf myName.jar *.class 2:生成打包所需配置文件:build.xml: <project name="MyPr ...

  2. Swift 字符串连接

    // 使用+直接相加 var i = var str = "Hello" str = str + " jinpangpang" // 可以使用这种方式连接整值 ...

  3. foreach遍历扩展(二)

    一.前言 假设存在一个数组,其遍历模式是根据索引进行遍历的:又假设存在一个HashTable,其遍历模式是根据键值进行遍历的:无论哪种集合,如果它们的遍历没有一个共同的接口,那么在客户端进行调用的时候 ...

  4. [Jquery] 操作html 不常用元素方法大全

    除http://www.w3school.com.cn/jquery/jquery_selectors.asp上的以外该大全应都有. 第一章 input控件篇 1.操作select 下拉框 1.1 获 ...

  5. C++中的析构函数

    代码: #include <cstdio> #include <iostream> using namespace std; class A{ public: ~A(){ co ...

  6. (原)anaconda 的安装与在pycharm中的版本切换

    参考网页: http://continuum.io/blog/anaconda-python-3 http://conda.pydata.org/docs/intro.html#creating-py ...

  7. 关于python27 中文编码

    本博文已移致独立博客:www.pubwin2009.net 传送门:http://www.pubwin2009.net/index.php/pubwin/42.html 看了网上好多的资料,以前一直不 ...

  8. 1. Server.Transfer跳转页面抛出异常:正在终止线程

    今天在向数据库插入数据,之后使用Server.Transfer跳回本页面时,抛出异常:正在终止线程 ry { == String.Compare(Password.Text.Trim(), Confi ...

  9. vuex构建笔记本应用学习

    vuex:针对vue应用派生的专门管理应用state的工具,state可以理解为我们组件需要操作的data数据,都知道,vue构建spa应用的时候,随着组件规模的提升,各个子组件之间的通信如果采用子组 ...

  10. 这样就算会了PHP么?-2

    学些关于函数FUNCTION方面的东东.. 感觉和PYTHON的APLLY功能差不多.. <?php function come(){ echo "来啦<p>"; ...