07 2015 档案
摘要:直接使用Exception进行捕获,然后在监视器中查看具体是哪一个异常 System.Exception {System.ServiceModel.Security.MessageSecurityException}查看StackTraceServer stack trace: 在 Syste...
阅读全文
摘要:http://blog.pluralsight.com/selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net 下载链接 https://s3.amazonaws.com/plura
阅读全文
摘要:http://www.codeproject.com/Articles/96028/WCF-Service-with-custom-username-password-authenti需要制作证书http://www.cnblogs.com/chucklu/p/4685783.html首先生成证书
阅读全文
摘要:第一种解决方法:最暴力的配置去掉第二种解决方法:其实已经有了serviceBehavior,但是忘记绑定到Service上了 给Service的BehaviorConfiguration指定之前创建的ServiceBehavior
阅读全文
“net.tcp://localhost:9000/ObtainData”处带有协定“"IObtainData"”的 ChannelDispatcher 无法打开其 IchannelListener。
摘要:http://stackoverflow.com/questions/1252791/how-to-solve-the-channeldispatcher-is-unable-to-open-its-ichannellistener-erroWith this type of exception i...
阅读全文
摘要:http://blogs.msdn.com/b/ericlippert/archive/2009/02/02/properties-vs-attributes.aspxHere is yet another question I got from a C# user recently:I have ...
阅读全文
摘要:of of element of
阅读全文
摘要:Windows Communication Foundation Configuration Schema
阅读全文
摘要:在wcf中使用自定义的用户名和密码验证方式 https://msdn.microsoft.com/en-us/library/aa702565.aspx http://www.codeproject.com/Articles/96028/WCF-Service-with-custom-usernam
阅读全文
摘要:AttributeThe Attribute class associates predefined system information or user-defined custom information with a target element. A target element can b...
阅读全文
摘要:http://stackoverflow.com/questions/29722838/system-timers-timer-steadily-increasing-the-interval需要在计时器每次运行后,修正计时器的间隔通过DateTime的Tick来处理 不过这个修正貌似有点不准p...
阅读全文
摘要:AttributesAttributes provide a powerful method of associating metadata, or declarative information, with code (assemblies, types, methods, properties,...
阅读全文
摘要:private void Init() { tChart = new TChart(); panel1.Controls.Add(tChart); tChart.Aspect.View3D = false; ...
阅读全文
摘要:最新的方法https://github.com/getlantern/lantern C:\Windows\System32\drivers\etc 在这个路径下找到Hosts文件 如何修改Host Host文件的具体内容 How to refresh hosts file without rebo
阅读全文
摘要:When to use DataContract and DataMember attributes?I am very confused about theDataContractattribute in WCF. As per my knowledge it is used for serial...
阅读全文
摘要:A data contract describes how CLR types map to XSD schema definitions. Data contracts are the preferred way to enable serialization of complex types i
阅读全文
摘要:git推送本地分支到远端 当前处于master分支,尝试用了git push origin warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. T
阅读全文
摘要:Reseting remote to a certain commitAssuming that your branch is calledmasterboth here and remotely, and that your remote is calledoriginyou could do: ...
阅读全文
摘要:A service contract describes the operations supported by a service,the message exchange pattern they use,and the format of each message. The service c
阅读全文
摘要:So far I’ve talked about the standards behind it all,but in fact WCF hides most of this from the developer by providing a programming interface for de
阅读全文
摘要:While messaging protocols are responsible for message serialization formats,there must be a way to capture the protocols required to communicate betwe
阅读全文
摘要:In Chapter 1,you were introduced to fundamental WCF concepts, 在章节1中,学习了wcf中的基础概念including how to create and consume a service, 包括如何创建以及调用服务how to host
阅读全文
摘要:SummaryThis chapter covered a lot of ground,beginning with a look at the purpose of WCF,the problems it solves and its alignment with SOA,through disc
阅读全文
摘要:1.查找本机上的端口使用情况 netstat -an 2.查找指定端口的使用情况 C:\Windows\System32>netstat -ano | find "8002" TCP 0.0.0.0:8002 0.0.0.0:0 LISTENING 2884 TCP [::]:8002 [::]:0
阅读全文
摘要:1.第一种情况 百度上找到了这篇文章 http://blog.sina.com.cn/s/blog_6b44b2ba01016j0z.html 讲的是使用了using用完之后就释放了,得到启发,仔细检查了Host的代码 对比了Learning WCF第一章中的示例代码,发现用try finally来
阅读全文
摘要:Exception Handling Statements (C# Reference) C# provides built-in support for handling anomalous situations, known as exceptions, which may occur duri
阅读全文
摘要:主体代码如下 IServiceA proxyA; ChannelFactory factoryA = new ChannelFactory(); proxyA = factoryA.CreateChannel();仔细检查后发现上面的ChannelFactory的构造函数,忘记传递参数了IServ...
阅读全文
摘要:Six important .NET concepts: Stack, heap, value types, reference types, boxing, and unboxing
阅读全文
摘要:http://stackoverflow.com/questions/18720810/wcf-service-base-address-vs-endpoint-addressbaseAddress is just that, the base address for your endpoints ...
阅读全文
摘要:服务和行为是并列的对应到配置文件中 wcf的配置在system.serviceModel中可以有多个服务一个服务会有一个主机以及多个终结点主机包含多个基址 baseAddress终结点,由三部分组成 地址,绑定,契约 Address,Binding,Contract行为可以包含多种,目前只用服务行...
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/hk90416s(v=vs.110).aspx VS中自带的只能提示,一个类继承自某一个接口。 由VS为类生成接口所要求的方法 using System; using System.Collections.Generi
阅读全文
摘要:So far in this chapter,I have shown you different ways to create services,how to expose a service endpoint and metadata exchange endpoint,how to gener
阅读全文
摘要:解决方案,把新建的网站的app.config修改下配置把false改为true之后再启动客户端的话,会提示这个Security Warning: Attaching to a process owned by an untrusted user can be dangerous. If the fo...
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/aa347733.aspx The ServiceModel Metadata Utility tool is used to generate service model code from metadata doc
阅读全文
摘要:IIS8中部署WCF服务出错:HTTP 错误 404.3 - Not Foundhttp://www.cnblogs.com/xwgli/archive/2013/03/15/2961022.html解决方法,以管理员身份进入命令行模式,运行:"%windir%\Microsoft.NET\Fram...
阅读全文
摘要:win7上设置默认website的物理路径
阅读全文
摘要:How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services over HTTP protocol,the Windows Activation Service (W
阅读全文
摘要:subtree出现,是为了取代submodule http://wenku.baidu.com/link?url=ola85Z5tIXJpxCjLTk-dcO81ayXLs68_y6dsmXIa0niF8vWlnAtnEEiZTGlzCNk1G_g36UYNHUBpu9oszONFNB54LNzo3
阅读全文
摘要:In the previous lab,you created a service and client from scratch without leveraging the tools available to WCF developers. Although this helps you to
阅读全文
摘要:You’re about to be introduced to the WCF service. This lab isn’t your typical “Hello World”—it’s “Hello Indigo”! In this lab,you will learn how to bui
阅读全文
摘要:At its core,WCF is a development platform for service-oriented applications. As I mentioned earlier,WCF is part of the .NET Framework 3.0,which compri
阅读全文
摘要:WCF ServicesWCF services are the new distributed boundary in an enterprise application—with an emphasis on SOA. In the past,you had to deliberate betw
阅读全文
摘要:What is Service Oriented Architecture (SOA)? There have been so many interpretations of this throughout the years that it seems important to establish
阅读全文
摘要:Windows Communication Foundation (WCF),formerly code-named “Indigo,” is Microsoft’s platform for Service-Oriented Architecture (SOA),designed for buil
阅读全文
摘要:1.为了确保客户端可以接收到服务端反馈的异常在服务端的配置文件中需要有 在最终发布服务的时候,客户端程序是给客户使用的,为了避免客户直接知道服务端的异常。所以,程序调试完成以后,需要将service...
阅读全文
摘要:在解决方案上右键,选择属性。这样设置之后,点击开始运行之后,会同时启动2个项目。适合一个项目既包含客户端也包含服务端,方便调试
阅读全文
摘要:Which are in?Given two arrays of strings a1 and a2 return a sorted array in lexicographical order and without duplicates of the strings of a1 which ar...
阅读全文
摘要:IQ TestDescription:Bob is preparing to pass IQ test. The most frequent task in this test isto find out which one of the given numbers differs from the...
阅读全文
摘要:正文 string str = "a---b---c"; string[] array = str.Split(new char[]{'-'}); 分割之后array中的元素为 分析: a---b---c 123456789 待分割的字符串使用a---b---c,长度为9。 以-来分割,有6个-,所
阅读全文
摘要:System.Linq System.Linq.Enumerable 类 Range Repeat Reverse Select Where Sum Zip Aggregate Count FirstOrDefault Join Max Min //Returns the only element
阅读全文
摘要:Good vs EvilDescriptionMiddle Earth is about to go to war. The forces of good will have many battles with the forces of evil. Different races will cer...
阅读全文
摘要:创建wcf服务库的时候,系统自动生成的代码 服务实现
阅读全文
摘要:http://freejvm.iteye.com/blog/976878需要找时间验证一下,另外还需要学习多个参数的尾递归如何来实现的技巧斐波那契数列第n个数的求值, public static long fibo4(int n) { if (n //...
阅读全文
摘要:C#中的异常处理 while (ex != null) { WriteExceptionLog(ex, fileName); ex = ex.InnerException; } /// <summary> /// 将异常处理成字符串的形式,然后写入文件 /// </summary> /// <par
阅读全文
摘要:How to: Create a Windows Communication Foundation Client To create a Windows Communication Foundation client Create a new console application project
阅读全文
摘要:Sum of Digits / Digital RootIn this kata, you must create adigital rootfunction.A digital root is therecursive sum of all the digits in a number.Given...
阅读全文
摘要:Multiples of 3 and 5If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.F...
阅读全文
摘要:A number system with moduli is defined by a vector of k moduli, [m1,m2, ···,mk].The moduli must be pairwise co-prime, which means that, for any pair of...
阅读全文
摘要:Case swappingDescription:Given a string, swap the case for each of the letters.e.g. CodEwArs --> cODeWaRSExamplesKata.Swap("") == ""Kata.Swap("CodeWar...
阅读全文
摘要:This is the third of six tasks required to create a Windows Communication Foundation (WCF) application. For an overview of all six of the tasks, see t
阅读全文
摘要:This is the second of six tasks required to create a basic Windows Communication Foundation (WCF) service and a client that can call the service. For
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/ms731835.aspx This is the first of six tasks required to create a basic Windows Communication Foundation (WCF
阅读全文
摘要:Getting Started Tutorial The topics contained in this section are intended to give you quick exposure to the Windows Communication Foundation (WCF) pr
阅读全文
摘要:https://www.tutorialspoint.com/wcf/wcf_consuming_service.htm WCF services allow other applications to access or consume them. A WCF service can be con
阅读全文
摘要:WCF - Windows Service Hosting The operation of Windows service hosting is a simple one. Given below are the steps with requisite coding and screenshot
阅读全文
摘要:WCF - WAS Hosting To understand the concept of WAS hosting, we need to comprehend how a system is configured and how a service contract is created, en
阅读全文
摘要:WCF - Self Hosting Here, the WCF service is hosted in a console application. Given below is the process with suitable steps in a sequential manner tha
阅读全文
摘要:WCF - IIS Hosting Hosting a WCF service in IIS (Internet Information Services) is a step-by-step process. IIS Hosting is illustrated below in detail w
阅读全文
摘要:https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next step is to host it so that the client applications c
阅读全文
摘要:http://www.tutorialspoint.com/wcf/wcf_creating_service.htm Creating a WCF service is a simple task using Microsoft Visual Studio 2012. Given below is
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/dd456779(v=vs.110).aspx Windows Communication Foundation Architecture
阅读全文
摘要:WCF - Architecture WCF has a layered architecture that offers ample support for developing various distributed applications. The architecture is expla
阅读全文
摘要:For developing a WCF service application, there are mainly two tools – Microsoft Visual Studio and CodePlex. Microsoft Visual Studio is a complete pac
阅读全文
摘要:https://www.tutorialspoint.com/wcf/wcf_versus_web_service.htm There are some major differences that exist between WCF and a Web service which are list
阅读全文
摘要:https://www.tutorialspoint.com/wcf/wcf_overview.htm WCF stands for Windows Communication Foundation. The elementary feature of WCF is interoperability
阅读全文
摘要:https://www.tutorialspoint.com/wcf/index.htm WCF Tutorial WCF stands for Windows Communication Foundation. It is a framework for building, configuring
阅读全文
摘要:书名:LINQ: The Future of Data Access in C# 3.0 Learn LINQ and the C# 3.0 Features That Support It http://shop.oreilly.com/product/9780596528416.do 具体的章节
阅读全文
摘要:http://blog.sina.com.cn/s/blog_622e77cc0100n5lm.html1、根据质数的定义求 质数定义:只能被1或者自身整除的自然数(不包括1),称为质数。 利用它的定义可以循环判断该数除以比它小的每个自然数(大于1),如果有能被它整除的,则它就不是质数。对应代码...
阅读全文
摘要:1. Two positive integers i and j are considered to be co-prime if there exists no integer greater than 1 that divides them both.Write a function co-p...
阅读全文
摘要:Binary to Text (ASCII) ConversionDescription:Write a function that takes in a binary string and returns the equivalent decoded text (the text is ASCII...
阅读全文
摘要:Pizza piecesDescriptionIn her trip to Italy, Elizabeth Gilbert made it her duty to eat perfect pizza. One day, she ordered one for dinner. And then so...
阅读全文
摘要:Description:In this kata you should simply determine, whether a given year is a leap year or not. In case you don't know the rules, here they are:year...
阅读全文
摘要:Find the capitalsDescription:InstructionsWrite a function that takes a single string (word) as argument. The function must return an ordered list cont...
阅读全文
摘要:Area of a CircleDescription:Complete the functioncircleAreaso that it will return the area of a circle with the givenradius. Round the returned number...
阅读全文
摘要:SequenceSumSum of 'n' Numberssum_of_n(orSequenceSum.sumOfNin Java,SequenceSum.SumOfNin C#) takes an integernand returns aList(anArrayin Java/C#) of le...
阅读全文
摘要:shorter concat [reverse longer]Description:Given 2 strings,aandb, return a string of the form:shorter+reverse(longer)+shorter.In other words, the shor...
阅读全文
摘要:Descending OrderDescription:Your task is to make a function that can take any non-negative integer as a argument and return it with it's digits in des...
阅读全文
摘要:源自 Difference between String.Join() vs String.Concat() With .NET 4.0, String.Join() uses StringBuilder class internally so it is more efficient.Wherea
阅读全文
摘要:254 shades of greyDescription:Why would we want to stop to only 50 shades of grey? Let's see to how many we can go.Write a function that takes a numbe...
阅读全文
摘要:Where is Vasya?Vasya stands in line with number of peoplep (including Vasya), but he doesn't know exactly which position he occupies. He can say that ...
阅读全文
摘要:http://www.codewars.com/kata/54ff3102c1bad923760001f3/solutions/csharp判断给定的字符串有多少个a e i o uusing System;using System.Linq;public static class Kata{ ...
阅读全文
摘要:Project Euler 85: Investigating the number of rectangles in a rectangular gridNumber of Rectangles in a GridGiven a grid of size m x n, calculate the ...
阅读全文
摘要:[VS软件版本号定义、规则和相关的Visual Studio插件](http://blog.csdn.net/cnhk1225/article/details/37500593) [assembly: AssemblyTitle("文件说明")][assembly: AssemblyDescript
阅读全文
摘要:Application.CommonAppDataPath;win7的路径C:\ProgramData\CompanyName\ProductName\2.0.5.1[assembly: AssemblyCompany("******科技有限公司")][assembly: AssemblyProdu...
阅读全文
摘要:Factorial 计算阶乘In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to ...
阅读全文
摘要:Complete The Pattern #1Task:You have to write a functionpatternwhich creates the following pattern upto n number of rows.If the Argument is 0 or a Neg...
阅读全文
摘要:Complete The Pattern #2Description:Task:You have to write a functionpatternwhich creates the following pattern upto n number of rows.If the Argument i...
阅读全文
摘要:Complete The Pattern #6 - Odd LadderTask:You have to write a functionpatternwhich creates the following pattern (see examples) up to the desired numbe...
阅读全文
摘要:public static void Method() { double a = 1.991; a = Math.Round(a); Console.WriteLine("a = {0}",a); ...
阅读全文