随笔分类 - .Net
Visual Studio 2005/2008,WCF
摘要:和标准的ASMX Webservice 不一样,WCF没有提供测试界面, 一般都是要求写Client App 来调用, 不过Visual Studio 2008里自带了一个 WCF测试客户端 (WcfTestClient.exe) C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ 也可以用它来做WCF Debugg...
阅读全文
摘要:终于要开始用WCF了, 终于进入.Net 3.0 时代了 理解WCF DOM 模型
阅读全文
摘要:由于我们BizTalk项目中经常会需要用到BAS,BAM等,(如:RosettaNet等),所以需要安装配置WSS,一般默认情况会提升Default Web Site(80)站点, 但是如果有Asp.Net WebSite 需要Host 在默认站点80 里的时候就会带来一些身份验证上的困惑,经常会导致身份验证不正常,如 ...
阅读全文
摘要:也不知道怎么解决,偶尔会出现这个问题Asp.Net session has expired, 在Web.Config里加这段 ... 同时注意启动ASP.NET State Service 服务 Note:Provides support for out-of-process session states for ASP.NET. If this service is stopped, o...
阅读全文
摘要:初次学习WEB PART,当在编译时弹出此对话框 “/WebParts1”应用程序中的服务器错误。 在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: SQL 网络接口, error: 26 - 定位指定的服务器/实例时出错) 解决办法: 1。 已配置的个性化设置提供程序和...
阅读全文
摘要:floor() Returns a number rounded down to the next integer ceiling() Returns a number rounded up to the next integer round() Returns a number rounded to the nearest integer
阅读全文
摘要:1.String Format (1).小数保留2位小数 decimal.Parse(weight).ToString("F2") (2).String.Format string.Format("{0:000.000}", 12.2) 012.200 string.Format("{0:D3}", 2) 002 字符 说明 示例 输出 C 货币 string.Fo...
阅读全文
摘要:The adapter failed to transmit message going to send port "UWSHandling_WS_Intel" with URL "wse://http://10.33.49.14/KWEIntelIntegration/ServiceToIntel.asmx". It will be retransmitted after the retry i...
阅读全文
摘要:Instantiate one WebService , then I got the following Exception: 'date' is an invalid value for the SoapElementAttribute.DataType property. The property may only be specified for primitive types. C...
阅读全文
摘要:Stream.Seek sets the position within the current stream. 今天在做一个XML转换的时候怎么也取不到返回值,真是火大,Review了好几遍也没有发现问题,后来发现是对Stream重复操作,没有复位操作 XmlTextWriter writer = new XmlTextWriter(Console.Out); xslt.Transform(r...
阅读全文
摘要:The following table describes the default mapping between the XML data types and the common language runtime (CLR) types Note:The xs and the xdt prefixes are mapped to the http://www.w3.org/2001/XM...
阅读全文
摘要:一, Dot Net 1.1 1.FileObject 实体类,用来存储文件名和文件创建时间 public class FileObjClass{ public string fileName;public DateTime fileTime;} 2.自定义排序规则,按照文件创建时间排序 public class SortClass:IComparer{public SortClass(...
阅读全文
摘要:最近一直很忙,一直没有空写blog最近XML用的比较多,本来我以为XML不能实现类似数据库唯一主键的用途,查了下资料,找到Key和Unique这两个关键字可以实现这样的功能;指定unique的selector xpath(具体选择的xpath)和field(比对的字段) 可以看出关键就是在他的父亲里面通过xpath定位到需要un...
阅读全文
摘要:An exception occurred during the Install phase.System.ComponentModel.Win32Exception: The account name is invalid or does not exist, or the password is invalid for the account name specifiedSet Service...
阅读全文
摘要:出差结束,回到上海...最近在忙一些杂事,顺便看看CodeSmithCodeSmith官方介绍:CodeSmith is a template-based code generator that can produce code for any text-based language. Whether your target language is C#, Visual Basic .NET, T...
阅读全文
摘要:.net 2.0中引入了异步的数据库执行,比如说原来的ExecuteNonQuery有了对应的BeginExecuteNonQuery,EndExecuteNonQuery,如下: public void ExecuteAsyncNonQuery(SqlConnection conn, CommandType commandType, string commandText, params SqlP...
阅读全文
摘要:1. /// /// 转全角的函数(SBC case)/// /// 任意字符串/// 全角字符串//////全角空格为12288,半角空格为32///其他字符半角(33-126)与全角(65281-65374)的对应关系是:均相差65248/// public string ToSBC(string input){ //半角转全角: char[] c = input.T...
阅读全文
摘要:郁闷,msn上不去,没法干活。记上最近项目中用到的一些code snippet1.查询今天的记录select datediff(dd,ConvDateTime,getdate()),* from dbo.rbConversationMaster where datediff(dd,ConvDateTime,getdate())=0 DataDiff Returns the number of da...
阅读全文
摘要:SqlCommand.Prepare()方法。在IDbCommand接口上就定义了Prepare()方法,这个方法可以把CommandType为Text的SQL语句提前在数据库中编译为一个临时的StoredProcedure然后再执行,这样对于需要多次执行的DbCommand来说,可以提高一定的执行效率:)注意:请在指定了Command的Connection之后再调用Prepare()方法。 Cr...
阅读全文
摘要:就是一句话 :有什麽key,value的数据结构,能够实现key查到value,又可以value查到key主要是用来建立对应关系;我原来是用Dictionary m_humanInService 来存储一次会话中两个人的关系,左边不经常变,比如说m_humanInService.Add("humanA","clientA"),就是将humanA和clientA串联表示正在会话;用他来寻址确定具体发...
阅读全文
浙公网安备 33010602011771号