
C#
文章平均质量分 83
zero_
这个作者很懒,什么都没留下…
展开
-
WCF: Throwing Exceptions With WebHttpBinding
One of the very cool new features in Windows Communication Foundation is the ability to create REST or POX services. Unfortunately, you will quickly find that WebHttpBinding and WebHttpBehavior (both转载 2009-03-01 22:57:00 · 1346 阅读 · 0 评论 -
A Custom UITypeEditor for Activity Properties
As with many other technologies, the design time experience in Windows Workflow Foundation uses many of the same extensibility mechanisms found in other designers (such as the Windows Forms designer).转载 2009-10-27 02:32:00 · 972 阅读 · 0 评论 -
Output an XML type attribute using DataContract
This tutorial will show you how to add an attribute to an XML stream returned from a Windows Communication Foundation (WCF) Web Service. Some knowledge of WCF and XML is required; the code is in C#.转载 2009-12-29 16:43:00 · 710 阅读 · 0 评论 -
WCF "Raw" programming model (Web) - receiving arbitrary data
The previous post mentioned how to return arbitrary data from WCF services. To receive data, however, there is one extra step, which Ill try to explain here.Like returning arbitrary data, the key转载 2010-04-12 03:32:00 · 1351 阅读 · 0 评论 -
ASP.NET MVC3 基础教程 – Web Pages 1.0
<br /> I:Web Pages 1.0中以“_”开头的特别文件(文件命名时不区分大小写)<br /> “_appstart.cshtml” & “_pagestart.cshtml” & “_viewstart.cshtml”<br /> _appstart.cshtml - 应用程序启动时在Global. Application_Start方法后执行。<br /> 功能:用于进行App的初始化时,需要进行处理的内容,例:向数据库记录系统初始化的一些信息。<br /> 功能与Global.A转载 2011-04-21 16:01:00 · 938 阅读 · 0 评论 -
资料
<br /> I:Web Pages 1.0中以“_”开头的特别文件(文件命名时不区分大小写)<br /> “_appstart.cshtml” & “_pagestart.cshtml” & “_viewstart.cshtml”<br /> _appstart.cshtml - 应用程序启动时在Global. Application_Start方法后执行。<br /> 功能:用于进行App的初始化时,需要进行处理的内容,例:向数据库记录系统初始化的一些信息。<br /> 功能与Global.A转载 2011-04-29 21:07:00 · 672 阅读 · 0 评论 -
Code First DataAnnotations
<br />Entity Framework Code First modeling workflow allows you to use your own domain classes to represent the model which EF relies on to perform querying, change tracking and updating functions. Code first leverages a programming pattern referred to as c转载 2011-04-30 18:50:00 · 2183 阅读 · 0 评论 -
Creating an IIS Site through managed code (C#, .NET) by Mike
public static string CreateWebSite(string NewSiteIP, string webSiteName, string pathToRoot, string DomainName){ int siteID = 1; string sSiteID = ""; try {转载 2009-06-17 07:31:00 · 817 阅读 · 0 评论 -
Active Directory编程
要开发Active Directory程序,必须导入System.DirectoryServices命名空间。还必须引用System.DirectoryServices程序集。使用这个程序集中的类可以查询对象、查看和更新属性,搜索对象,把对象移动到其他容器对象中等。在下面的代码段中,简单的C#控制台应用程序说明了如何使用System.DirectoryServices命名空间中的类。本节将介绍转载 2009-06-15 11:37:00 · 1412 阅读 · 0 评论 -
wcf webhttpbinding
1. The example below shows a client that talks to a service using WebHttpBinding. The service does not generate a meaninful WSDL for endpoints with WebHttpBinding (WSDL is for SOAP-based endpoints onl转载 2009-03-02 21:04:00 · 2869 阅读 · 0 评论 -
WCF 3.5: Hosting Services for WebGet
In my last post, I provided an overview of using the new WebGet attribute to map an HTTP GET operation to a specific method. However, I didnt cover the the necessities for hosting a service that use转载 2009-03-01 02:12:00 · 874 阅读 · 0 评论 -
REST in WCF: Varying response content type based on HTTP Request Headers
Damians used the same WCF extensibility points I used to produce some boilerplate that varies the response content type from JSON to XML, based on the Accept or Content-Type header of the GET request转载 2009-03-05 01:33:00 · 1626 阅读 · 1 评论 -
聚焦WCF行为的扩展
WCF以其灵活的可扩展架构为开发者提供了方便,其中对行为的扩展或许是应用中最为常见的。自 定义对行为的扩展并不复杂,但仍有许多细节需要注意。在服务端,一般是对DispatchRuntime和DispatchOperation进行扩展, 扩展点包括了对参数和消息的检查,以及操作调用程序,它们对应的接口分别为 IParameterInspector,IDispatchMessageInspecto转载 2009-03-09 03:42:00 · 735 阅读 · 0 评论 -
Handling Disconnects with WCF
Ive been working on an application which relies heavily on WCF to communicate. I have a very simple interface (contract) that the server supports to connect and disconnect: it exposes the methods Reg转载 2009-03-09 04:43:00 · 654 阅读 · 0 评论 -
AES Encryption to Match PHP's Mcrypt Extension
Demonstrates how to match AES encryption results with PHPs mcrypt extension. Please refer to this discussion about PHP AES Encryption. The code here matches the PHP mcrypt results on that page. D转载 2009-06-02 13:31:00 · 802 阅读 · 0 评论 -
HTML Form Handler Sample
引自:MSDN http://msdn.microsoft.com/en-us/library/bb943485.aspx Download sample This sample shows how to extend the Windows Communication Foundation (WCF) Web Programming Model to handle HTML转载 2009-06-02 22:48:00 · 1204 阅读 · 0 评论 -
WebContentTypeMapper 示例
WCF 为内容类型提供一组默认的映射。例如,application/json 映射到 JSON,text/xml 映射到 XML。未映射到 JSON 或 XML 的任何内容类型都将映射到原始二进制格式。在某些方案(例如推送式 API)中,服务开发人员不控制由客户端返回的内容类型。例如,客户端可以将 JSON 作为 text/javascript 而不是 application/json 返回。转载 2009-06-02 23:10:00 · 4234 阅读 · 2 评论 -
Howto: (Almost) Everything In Active Directory via C#
引自:http://www.codeproject.com/KB/system/everythingInAD.aspxTable of ContentsIntroduction Background Points of concern: security & impersonation Running code in batch processes Method par原创 2009-06-09 11:35:00 · 2076 阅读 · 0 评论 -
How to map an Entity framework model to a table name dynamically
<br />Using a code-first approach I'd like to map a single model to multiple table names dynamically. Currently I can do something like modelBuilder.Entity(Of Person)().MapSingleType().ToTable("Managers") but as the OnModelCreating method is only called on转载 2011-05-03 23:08:00 · 2651 阅读 · 0 评论