加参数 /console 启动,每次输入phrase来进行验证,或者使用目标系统的用户来登录
或者安装成服务,但是服务的方式就不能使用phrase来进行验证了。
windows7下正常连接调试器,但是windows2008R2+IIS7调试器连接失败,据小马哥说重启之后好使了,未试过。
加参数 /console 启动,每次输入phrase来进行验证,或者使用目标系统的用户来登录
或者安装成服务,但是服务的方式就不能使用phrase来进行验证了。
windows7下正常连接调试器,但是windows2008R2+IIS7调试器连接失败,据小马哥说重启之后好使了,未试过。
This header must be modified using the appropriate property. Parameter name: name Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: This header must be modified using the appropriate property. Parameter name: name
You can see above that copying the headers collection from one request into another is going to cause the problem. The following is a list of request and response headers that must be set via properties instead of headers collection. These properties will be translated to headers on the wire:
| Header | Restricted on Request | Restricted on Response |
|---|---|---|
| Accept | true – use .Accept property | false |
| Connection | true – use .Connection property | false |
| Content-Type | true – use .ContentType property | false |
| Content-Length | true – use .ContentLength property | true – use .ContentLength property |
| Date | true | false |
| Expect | true – use .Expect property | false |
| Host | true | false |
| If-Modified-Since | true – use .IfModifiedSince property | false |
| Keep-Alive | false | true |
| Proxy-Connection | true – use .Proxy property | false |
| Range | true | false |
| Referer | true – use .Referer property | false |
| Transfer-Encoding | true – use .TransferEncoding property | true |
| User-Agent | true – use .UserAgent property | false |
| WWW-Authenticate | false | true |
本文来自: This header must be modified using the appropriate property
配置文件里面添加:
<appender name="UdpAppender" type="log4net.Appender.UdpAppender"> <localPort value="10419" /> <remoteAddress value="127.0.0.1" /> <remotePort value="1009" /> <layout type="log4net.Layout.PatternLayout, log4net"> <conversionPattern value="<log><Level>%level</Level><Source>%logger</Source><Properties>%property{NDC}</Properties><LogDate>%date</LogDate><Message><![CDATA[%message]]></Message><Exception><![CDATA[%exception]]></Exception></log>" /> </layout> </appender> ... <root> ... <appender-ref ref="UdpAppender" /> ... </root>
如果要广播到局域网,你的ip段是192.168.1.X,则设置
文档说明在这里:http://logging.apache.org/log4net/release/sdk/log4net.Appender.UdpAppender.RemoteAddress.html
另外在windows7下,还因为ipv6的关系,如果使用localhost,可能得到的ip不是127.0.0.1而是::1,并且log4net目前貌似不支持ipv6的神址,所以必须host里面去掉ipv6的映射。
本文来自: log4net udpappender 广播设置
设置property的属性是否直接被更改: Indirect="yes"
,INSTALLDIR为你的目录Id
访问安装的目标文件夹,session["INSTALLDIR"]
自动更新:produc、package的Id不能为“*”,然后product的upgradeCode和upgradeCode必须要一致
customaction要加 Execute="immediate"
如果需要获取属性值的时候,确保至少在Before='InstallFinalize' 时候执行相应的操作
本文来自: wix tips
今天试验了下RabbitMQ的.NET客户端的调用,包括简单的发送和获取以及订阅方式,不过RabbitMQ的持久化好像有些问题,重启服务之后,数据丢失一部分,很奇怪,改天再仔细研究下。
阅读这篇文章的其余部分 »
本文来自: RabbitMQ .NET Client使用范例
蔡學鏞的大內高手專欄里的这篇:.NET中間語言(IL)是非常好的入门资料,推荐啊。
MSIL指令速查(from:http://www.cnblogs.com/longgel/archive/2010/05/19/1739231.html)
本文来自: MSIL指令速查
ElasticSeach.Client客户端更新了,支持索引模板了,cool~,下载地址:http://github.com/medcl/ElasticSearch.Net
ElasticSearch IndexTemplate帮助文档。
创建一个索引模板:
var tempkey = "test_template_key1"; var template = new TemplateSetting(tempkey); template.Template = "business_*";//支持通配符,假设所有business开头的索引自动使用如下的索引设置(setting和mapping) template.IndexSetting = new IndexSetting(3, 2); var type1 = new TypeSetting("mytype") { }; type1.CreateNumField("identity", NumType.Float); type1.CreateDateField("datetime"); var type2 = new TypeSetting("mypersontype"); type2.CreateStringField("personid"); type2.SourceSetting = new SourceSetting(); type2.SourceSetting.Enabled = false; template.AddTypeSetting(type1); template.AddTypeSetting(type2); result = ElasticSearchClient.Instance.CreateTemplate(tempkey, template);
基于索引模板的创建索引(以后不需要做重复的索引Mapping操作了,yeah):
result = ElasticSearchClient.Instance.CreateIndex("business_111");//创建索引,自动获得索引设置和mapping设置
获取索引模板的信息:
var temp = ElasticSearchClient.Instance.GetTemplate(tempkey);
更多详细的操作,参照我写的测试用例,https://github.com/medcl/ElasticSearch.Net/tree/master/ElasticSearchTests。
/* * Created by SharpDevelop. * User: medcl * Date: 2010/11/17 * Time: 18:10 * */ using System; using Ninject; namespace NinjectTests { //ref http://blog.fh-kaernten.at/wehr/2010/04/27/ninject-the-first-contact/ public class Manager{ int a=0; public void DoSomething(){ a++; Console.WriteLine("zzzz...zzz...,{0}",a); } } public class Boss{ [Inject] public Manager TheManager{set;get;} } class Program { public static void Main(string[] args) { IKernel kernel=new Ninject.StandardKernel(); kernel.Bind<Manager>().ToSelf().InSingletonScope();//Manager单例 //Transient .InTransientScope() A new instance of the type will be created each time one is requested. (This is the default scope) //Singleton .InSingletonScope() Only a single instance of the type will be created, and the same instance will be returned for each subsequent request. //Thread .InThreadScope() One instance of the type will be created per thread. //Request .InRequestScope() One instance of the type will be created per web request, and will be destroyed when the request ends. var manager=kernel.Get<Manager>(); manager.DoSomething(); var manager2=kernel.Get<Manager>(); manager2.DoSomething(); kernel.Get<Boss>().TheManager.DoSomething();//Inject 自动注射合适的实现 Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } }
输出:
zzzz...zzz...,1 zzzz...zzz...,2 zzzz...zzz...,3 Press any key to continue . . .
本文来自: Ninject单例及属性注入示例
System.Lazy
http://msdn.microsoft.com/en-us/library/dd642331.aspx
http://msdn.microsoft.com/en-us/library/dd997286
本文来自: System.Lazy