可以由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. ios内存详解

    IOS以及Mac os都是基于Unix/linux改造出来的,而在内存管理方面也沿用了Unix/Linux的内存管理机制. 下面主要说的是IOS系统,有很多比较喜欢捣鼓的吧友肯定自己清理过机器的内存, ...

  2. CF 277E Binary Tree on Plane (拆点 + 费用流) (KM也可做)

    题目大意: 平面上有n个点,两两不同.现在给出二叉树的定义,要求树边一定是从上指向下,即从y坐标大的点指向小的点,并且每个结点至多有两个儿子.现在让你求给出的这些点是否能构成一棵二叉树,如果能,使二叉 ...

  3. POJ3662 Telephone Lines( dijkstral + 二分 )

    POJ3662 Telephone Lines 题目大意:要在顶点1到顶点n之间建一条路径,假设这条路径有m条边,其中有k条边是免费的,剩余m-k条边是要收费的, 求这m-k条边中花费最大的一条边的最 ...

  4. [每日一题] OCP1z0-047 :2013-07-25 权限――角色与对象权限

    有疑问可以去itpub讨论:http://www.itpub.net/thread-1804842-1-1.html 按题意,操作如下: 1.创建一个角色r1 sys@OCM> create r ...

  5. Mysql学习(慕课学习笔记9)查询、分组

    查找记录 Select select username,id from users; Group by 进行分组 select sex from users group by sex; 分组条件 se ...

  6. net.sf.json.JSONException: There is a cycle in the hierarchy!

    因为项目中使用了AJAX技术,jar包为:json-lib.jar,在开发过程中遇到了一个JSON-LIB和Hibernate有关的问题: 如hibernate延迟加载错误,这都是些老问题了,一看就知 ...

  7. struts2中<s:select/>标签的运用详解

    <s:select list="smsTypes" listKey="SmsTypeId" listValue="SmsTypeName&quo ...

  8. phpmyadmin自增字段

    自增字段必须为primary key 2种方法: 1- ALTER TABLE `qr_role` CHANGE `ROLE_ID` `ROLE_ID` INT(11) NOT NULL AUTO_I ...

  9. uc/os 笔记(转)

    1.uC/OS-II中使用互斥信号对象应该注意 互斥信号对象(Mutual Exclusion Semaphore)简称Mutex,是uC/OS-II的内核对象之一,用于管理那些需要独占访问的资源,并 ...

  10. zlog使用手册,小靠谱啊

    http://hardysimpson.github.io/zlog/UsersGuide-CN.html Chapter 1 zlog是什么? zlog是一个高可靠性.高性能.线程安全.灵活.概念清 ...