silverlight+wcf 获得web参数
可以由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参数的更多相关文章
- [silverlight—wcf]参数:调试资源字符串不可用,秘钥和参数通常提供足够的信息用以诊断问题。
这段时间在做一个项目,有一项需求是上传,经过思考之后,决定采取Silverlight+WCF的方式做上传操作.就在项目做完了之后,本地测试也都没问题,发布到服务器上的时候,顿时就出现故障了.在选择文件 ...
- [SL] Silverlight + WCF Demo项目
I:项目描述:利用 Silverlight+WCF 技术,模拟资源管理器(如图1)功能,通过地址栏输入本地文件夹路径,然后将解析出来的该目录下所有文件(夹)存储到数据库中,然后再加载到界面上显示出来: ...
- 【WCF】Silverlight+wcf+自定义用户名密码验证
本文摘自 http://www.cnblogs.com/virusswb/archive/2010/01/26/1656543.html 在昨天的博文Silverlight3+wcf+在不使用证书的情 ...
- WCF与Web API 区别
WCF与Web API 区别(应用场景) Web api 主要功能: 支持基于Http verb (GET, POST, PUT, DELETE)的CRUD (create, retrieve, ...
- Web API、WCF和Web Service的区别
[转载] Web Service 1.它是基于SOAP协议的,数据格式是XML 2.只支持HTTP协议 3.它不是开源的,但可以被任意一个了解XML的人使用 4.它只能部署在IIS上 WCF 1.这个 ...
- webservice和wcf和web.api简单介绍
转自:无废话的wcf等等 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API.在.net平台下,你有很多的选择来构建一个HTTP Ser ...
- http服务 WCF、Web API、Web service、WCF REST之间的区别
http服务 WCF.Web API.Web service.WCF REST之间的区别 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web ...
- WCF、Web API、WCF REST、Web Service比较
原文地址:http://www.dotnet-tricks.com/Tutorial/webapi/JI2X050413-Difference-between-WCF-and-Web-API-and- ...
- 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 ...
随机推荐
- java下properties属性文件操作
package cn.stat.p1.file; import java.io.File; import java.io.FileInputStream; import java.io.FileNot ...
- itext poi 学习之旅 (1)创建pdf
从零开始学习itext 创建pdf 1.用到流进行创建的pdf import java.io.File; import java.io.FileOutputStream; import com.ite ...
- Cookie 添加,读取,删除
Name,value – 声明时 new Cookie(key,value); Path - 默认值,即为当前保存cookie的这个serlvet所在的路径. 如果Cookie在这样的路 ...
- boost
参考博客 http://www.cnblogs.com/lidabo/p/3805487.html http://www.cppblog.com/Robertxiao/archive/2013/01/ ...
- php基础之二 函数
一.语句:分支语句,循环语句 1.分支语句: 1.1 if $a = 7;if($a == 5){ echo "相等";}else{ echo "不相等";} ...
- Animation 案例解释
Animation 案例解释: ------------摘自W3c 过度动画类型: linear:线性过渡.等同于贝塞尔曲线(0.0, 0.0, 1.0, 1.0) ease:平滑过渡.等同于贝塞尔曲 ...
- laravel跟jquery之间传输json数据
laravel代码: public function test(){ $arr = ["test1"=>"1","test2"=> ...
- 手把手教你发布代码到CocoaPods(Trunk方式)-备用
概述 关于CocoaPods的介绍不在本文的主题范围内,如果你是iOS开发者却不知道CocoaPods,那可能要面壁30秒了.直奔主题,这篇文章主要介绍如果把你的代码发布到CocoaPods代码库中, ...
- ubuntu 12.04 下搭接Qt 嵌入式开发环境
1.安装前的准备工作 (1)有ubuntu12.04 的系统镜像(也可以其他linux 如Fedorea9),都是安装好的 (2)虚拟机VMWare 或 VirtualBox ,两者都可以,都是安装好 ...
- Log4j MDC Tomcat下报异常org.apache.log4j.helpers.ThreadLocalMap
严重: The web application [/qdgswx] created a ThreadLocal with key of type [org.apache.log4j.helpers.T ...