随笔分类 - 系统架构
系统架构 
    
摘要:http://www.php.net/json_encode
        阅读全文
            
摘要:http://blog.163.com/longsu2010@yeah/blog/static/1736123482011025102551291/PHP之JSON -json_decode函数2011-01-25 22:25:51| 分类: PHP | 标签: |字号大中小订阅json_decode (PHP 5 >= 5.2.0, PECL json >= 1.2.0)json_decode — 对 JSON 格式的字符串进行编码说明 mixed json_decode ( string $json [, bool $assoc ] ) 接受一个 JSON 格式的字符串并且把它
        阅读全文
            
摘要:$data ={"itemName":"Giordana","itemId":450,"itemPrice":45,"itemCategory":"Shirit",};$result = json_decode($data,true);You need to do above two steps in the controller function and then if you want to show that json data in the view file You
        阅读全文
            
摘要:http://www.developer.nokia.com/Community/Wiki/Finnkino%E5%89%A7%E9%99%A2%E7%9A%84%E7%94%B5%E5%BD%B1
        阅读全文
            
摘要:/// 发送消息 ///</summary> ///<param name="sendUserId"></param> ///<param name="toUser">格式7FFA3AF2-E74B-4174-8403-5010C53E49A7|userName,7FFA3AF2-E74B-4174-8403-5010C53E49A7|userName</param> ///<param name="content"></param> ///<p
        阅读全文
            
摘要:对于每个类型拥有的值范围以及并且指定日期何时间值的有效格式的描述见7.3.6日期和时间类型。 这里是一个使用日期函数的例子。下面的查询选择了所有记录,其date_col的值是在最后30天以内: mysql>SELECTsomethingFROMtable WHERETO_DAYS(NOW())-TO_DAYS(date_col)selectDAYOFWEEK('1998-02-03'); ->3 WEEKDAY(date) 返回date的星期索引(0=星期一,1=星期二,……6=星期天)。 mysql>selectWEEKDAY('1997-10-04
        阅读全文
            
摘要:SELECT COUNT(*) FROM tb_user_info WHERE DAYOFWEEK(create_date)=3 AND TO_DAYS(create_date)=TO_DAYS(NOW()) AND user_role_id=82今日,在 Codeplex 上看到一个开源项目,对 Http 协议进行了封装,这下可以方便这些在 .NET 平台下访问 Web 服务器的同学们了,比如,从 Web 服务器抓取一个页面,使用 .NET 而不是借助浏览器向服务器发一个 Post 请求之类的操作,就可以直接调用一下实现好的方法了。项目的地址:http://httplib.codeplex.
        阅读全文
            
摘要:在Asp.net MVC controller的底层,常常有提到repository和service layer, 好像都是逻辑相关的层,那么它们到底是什么区别呢?简单的说:repository就是一个管理数据持久层的,它负责数据的CRUD(Create, Read, Update, Delete)service layer是业务逻辑层,它常常需要访问repository层,但是它不关心数据是如何获取和存储的。来发现很多ASP.NET MVC的例子中都使用了Repository模式,比如Oxite,ScottGu最近发布的免费的ASP.NET MVC教程都使用了该模式。就简单看了下。在《企业架
        阅读全文
            
摘要:在上篇文章中和大家一起学习了建立基本的WebAPI应用,立刻就有人想到了一些问题:1.客户端和WebService之间文件传输2.客户端或者服务端的安全控制要解决这些问题,要了解一下WebAPI的基本工作方式。(一)WebAPI中工作的Class在MVC中大家都知道,获取Request和Response使用HttpRequest和HttpResponse两个类,在WebAPI中使用两外两个类:HttpRequestMessage 和HttpResponseMessage,分别用于封装Requset和Response。除了这两个类之外,还有一个常见的抽象类:HttpMessageHandler,
        阅读全文
            
摘要:http://stackoverflow.com/questions/10861568/asmx-web-service-basic-authentication//-----------------------------------------------------public class BasicAuthHttpModule:IHttpModule{ voidIHttpModule.Init(HttpApplication context) { context.AuthenticateRequest+=newEventHandler(OnAuthenticateRequest); }
        阅读全文
            
摘要:publicclassUserAuthenticator:IHttpModule{ publicvoidDispose() { } publicvoidInit(HttpApplication application) { application.AuthenticateRequest+=newEventHandler(this.OnAuthenticateRequest); application.EndRequest+=newEventHandler(this.OnEndRequest); } publicvoidOnAuthenticateRequest(object source,Ev
        阅读全文
            
摘要:http://www.cnblogs.com/yingzi/archive/2012/03/13/2394809.htmlHTTP请求格式当浏览器向Web服务器发出请求时,它向服务器传递了一个数据块,也就是请求信息,HTTP请求信息由3部分组成:l请求方法URI协议/版本l请求头(Request Header)l请求正文下面是一个HTTP请求的例子:GET/sample.jspHTTP/1.1Accept:image/gif.image/jpeg,*/*Accept-Language:zh-cnConnection:Keep-AliveHost:localhostUser-Agent:Mozi
        阅读全文
            
摘要:不同于之前的HttpWebRequest类型,在.NET 4.5中新的HttpRequestHeaders类型直接有一个Authorization属性,对应类型是:AuthenticationHeaderValue,同样在System.Net.Http.Headers命名空间内。AuthenticationHeaderValue有两个属性Parameter和Scheme。为了弄清这两个参数在对Authorization属性的作用,我们可以做一个简单的测试:首先得记得加入.NET 4.5中HttpClient相应的命名空间://+ using System.Net.Http;//+ using 
        阅读全文
            
摘要:Implementing Basic Authentication in ASP.NET 2.0ByAdministrator27. 八月 2008 20:35I have many times wanted to implement basic authentication in asp.net applications, but has been unwilling to use the built in basic authentication of IIS, since I think its a bother to use either the Windows machine'
        阅读全文
            
摘要:var http = require('http');var server = http.createServer(function(req, res) {// console.log(req); // debug dump the request// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object)
        阅读全文
            
摘要:HTTP使用BASIC认证的原理及实现方法上一篇/下一篇2011-10-19 15:56:15 / 个人分类:java查看( 4555 )/评论( 5 )/评分(10/0)一.BASIC认证概述在HTTP协议进行通信的过程中,HTTP协议定义了基本认证过程以允许HTTP服务器对WEB浏览器进行用户身份证的方法,当一个客户端向HTTP服务器进行数据请求时,如果客户端未被认证,则HTTP服务器将通过基本认证过程对客户端的用户名及密码进行验证,以决定用户是否合法。客户端在接收到HTTP服务器的身份认证要求后,会提示用户输入用户名及密码,然后将用户名及密码以BASE64加密,加密后的密文将附加于请求信
        阅读全文
            
摘要:BasicAuthMessageHandler1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950publicclassBasicAuthMessageHandler:DelegatingHandler{privateconststringBasicAuthResponseHeader="WWW-Authenticate";privateconststringBasicAuthResponseHeaderValue="Basic&quo
        阅读全文
            
摘要:using System;using System.Net;using System.Security.Cryptography;using System.Security.Cryptography.X509Certificates;using System.Security.Principal;using System.ServiceModel.Channels;using System.Threading;using System.Web.Http;using System.Web.Http.Controllers;using System.Web.Http.Filters;using D
        阅读全文
            
摘要:http://stackoverflow.com/questions/11135473/how-to-use-an-authorized-username-in-other-controllershttp://stackoverflow.com/questions/12227495/httpactioncontext-request-headers-authorization-is-null//----------------------------------------------------------------------------------Posted on June 10, 
        阅读全文
            
摘要:使用asp.net mvc3的Filter模拟实现http basic Authentication近段时间,在编写一个淘宝家园的手机客户端,需要一个配套的api提供服务,使用http basic验证来确认用户。在iis7上架了一个api的测试站点,iis默认的http basic 验证需要和windows的用户绑定在一起,无法将用户认证和业务数据中的用户进行对应关联。查询相关资料后,准备使用mvc的filter模拟实现http basic authentication,也方便在实现api时对验证和非验证的调整。1.vs2010中建立asp.net mvc3 web项目2.添加用户验证filt
        阅读全文
            
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号