摘要:
有时候需要在家里连接公司的服务器,但是它的外网IP会经常变换。当然可以用花生壳之类来解决,不过作为程序员,还是尝试用程序的方法解决吧。接口定义Windows里在外网IP改变时好像没有现成的事件,所以定义了这样一个接口IPublicIPMonitor:public interface IPublicIPMonitor{ event EventHandler<PublicIpChangedEventArgs> PublicIpChanged; void Start(); void Stop();}当监测到IP改变时会触发一个事件PublicIpChanged,有两个方法分别用来开...
阅读全文
posted @ 2012-03-30 17:48
hf
阅读(2720)
推荐(0)
摘要:
准备用户数据表单认证可以使用各种membership provider,也可以自己实现一个,我们采用的是sql server membeship provider。配置方法如下。执行C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exeNextNext在这里填写数据库名Next->Finish至此本地用户数据库配置完成。可以添加一些用户备用。建立新的Web 应用程序要选择基于声明的身份验证配置FBA,这两个名字一会儿要用到。先不要建立首要网站集。配置网站有三个网站需要配置管理中心、安全服务、我们自己建立的网站(Dev
阅读全文
posted @ 2012-03-30 17:37
hf
阅读(298)
推荐(0)
摘要:
安装SharePoint2010时有两个选择完整安装:可以使用完整版的sql server ,但是默认需要有域环境才能配置成功。独立安装:只能用sql server express ,即使之前已经装了完整版的sql server。本文要讲的就是如何在没有域环境的情况下配置完整安装的SharePoint2010。本文参考了http://weblogs.asp.net/sharadkumar/archive/2010/04/25/setting-up-sharepoint-without-active-directory.aspx。完整安装SharePoint2010。完成后先不要运行配置向导。配
阅读全文
posted @ 2010-09-06 11:09
hf
阅读(905)
推荐(0)
摘要:
Optional and Named Parameters When designing a method’s parameters, you can assign default values to some of or all the parameters ,when you call a method, you can specify arguments by using the name...
阅读全文
posted @ 2010-08-13 15:31
hf
阅读(290)
推荐(0)
摘要:
问题:根据线程安全的相关知识,分析以下代码,当调用Fun3方法时i>10时是否会引起死锁?并说明理由。
阅读全文
posted @ 2010-07-16 10:06
hf
阅读(597)
推荐(0)
摘要:
问题:try {}里有一个return语句,那么紧跟在这个try后的finally {}里的code会不会被执行,什么时候被执行,在return前还是后?
阅读全文
posted @ 2010-07-15 18:36
hf
阅读(424)
推荐(0)
摘要:
Instance Constructors and Classes (Reference Types) Constructor methods are always called .ctor (for constructor) in a method definition metadata table . When constructing a reference type object, the...
阅读全文
posted @ 2010-07-14 18:11
hf
阅读(454)
推荐(0)
摘要:
Constants A constant is a symbol that has a never-changing value . The compiler saves the constant’s value in the assembly’s metadata at compile time. You can define a constant only for types that yo...
阅读全文
posted @ 2010-07-13 17:33
hf
阅读(191)
推荐(0)
摘要:
The Different Kinds of Type Members A type can define zero or more of the following kinds of members: Constants Fields Instance constructors Type constructors Methods Operator overloads: &...
阅读全文
posted @ 2010-07-13 16:49
hf
阅读(287)
推荐(0)
摘要:
Programming Language Primitive Types Any data types the compiler directly supports are called primitive types . I prefer to use the FCL type names(System.Int64) and completely avoid the primitive ty...
阅读全文
posted @ 2010-07-11 21:24
hf
阅读(501)
推荐(0)