2013年7月16日

摘要: [转]WebService 之 WSDL文件 讲解在.NET中有三种方式生成WSDL:1.在Web Service的URL后面加上WDSL需求,如下:http://localhost/WebService1.asmx?WSDL2.使用disco.exe。在命令行中写下如下的命令:disco http://localhost/webExamples/simpleService.asmx3.使用System.Web.Services.Description命名空间下提供的类原文地址:http://blog.csdn.net/tropica/archive/2008/11/02/3203892.as 阅读全文
posted @ 2013-07-16 13:05 hongzhez 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 通过WebService生成WebService代理类1、打开Visual Studio命令窗口2、输入wsdl http//url/xxx.asmx /language:cs /out:xxx.cs /protocol:httpGet即可生成HttpGet的代理类通过WSDL生成WebService代理类1、打开Visual Studio命令窗口2、输入wsdl /si path...+.wsdl(wsdl文件路径) /out path(输出路径)3、如果有外部Schame文件(xsd),命令格式如下:wsdl /si wsdl文件路径 xsd文件路径1 xsd文件路径2 /out:输出路径 阅读全文
posted @ 2013-07-16 12:57 hongzhez 阅读(1328) 评论(0) 推荐(0) 编辑
摘要: 方法一:1、在项目中添加资源文件Resource.en-us.resx和Resource.zh-cn.resx(右击增加资源文件)2、获得对应语言 CultureInfo ci = new System.Globalization.CultureInfo("zh-cn"); //配置显现的语言 ResourceManager rm = new ResourceManager("WebApplication1.Resource", Assembly.GetExecutingAssembly()); //资源文件路径 Response.Write(rm.Ge 阅读全文
posted @ 2013-07-16 10:45 hongzhez 阅读(251) 评论(0) 推荐(0) 编辑

2013年7月3日

摘要: 使用说明:1、项目中引用System.Runtime.Caching2、对象中设置protected ObjectCache CacheService=MemoryCache.Default;3、添加缓存数据:CacheService.Add(key, "缓存数据", DateTime.Now.AddSeconds(60));4、读取缓存数据:CacheService.GetCacheItem(cachekey).Value;注意事项:多台服务器部署注意同步问题 阅读全文
posted @ 2013-07-03 15:36 hongzhez 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1、使用缓存的应用程序单独部署2、不同的服务器都配置对方服务器地址,一旦一台机器缓存发生变更后,相互通知对方更改3、避免读取到过期数据,提供统一接口,缓存发生变动后,通知对方缓存过期4、使用Memcached 阅读全文
posted @ 2013-07-03 14:48 hongzhez 阅读(94) 评论(0) 推荐(0) 编辑

导航