Sign in
HongmeiG
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
RSS for posts
Atom
RSS for comments
OK
Search
Tags
No tags have been created or used yet.
Archive
Archives
May 2013
(1)
April 2013
(1)
September 2012
(1)
August 2012
(1)
July 2012
(2)
May 2012
(3)
February 2012
(3)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
HongmeiG
How to access HTTPContext from within your Web API action
Posted
over 1 year ago
by
Hongmei Ge
0
Comments
Within a Web API action, you can easily access the HttpContext via the HttpContext.Current thread static. Alternatively, you can also retrieve the context from one of the properties in the Request message. Code Snippet HttpContext context;...
HongmeiG
Supporting Multiple Authentication with Web API in the web hosted case
Posted
over 1 year ago
by
Hongmei Ge
0
Comments
With the newly released Web API Beta bits ( http://www.asp.net/web-api) , you can support multiple authentication from client. Say you want the client send both the username/password as well as Client Certificate for SSL. For the web hosted scenario...
HongmeiG
How to access ClientCertificate in a host agnostic manner
Posted
over 1 year ago
by
Hongmei Ge
1
Comments
When you choose to use Client Certificate as your client credential over SSL, you want to retrieve the x509 Certificate on the server side to do authorization. It is very simple with the latest Web API bits. If you have access to the request message anywhere...
HongmeiG
How to write a custom parameter binding to construct an object either from body or from Uri's query
Posted
over 1 year ago
by
Hongmei Ge
1
Comments
Mike has wrote this really good blog on writing a custom HttpParameterBinding at http://blogs.msdn.com/b/jmstall/archive/2012/05/11/webapi-parameter-binding-under-the-hood.aspx My blog just want to add a little bit complex example where you might...
HongmeiG
How to access the Client's IP address in Web API
Posted
11 months ago
by
Hongmei Ge
0
Comments
For web hosted, you can access your client address via the following: Code Snippet string clientAddress = HttpContext .Current.Request.UserHostAddress; For self hosted, you can access your client address via the following: Code...
HongmeiG
How to customize parameter binding
Posted
8 months ago
by
Hongmei Ge
1
Comments
Web API provides some great out of box experience with parameter binding. It also provides some powerful extensibility points to allow you customize that binding process. For example, you can bind multiple parameters from uri. However, it can only bind...
HongmeiG
How to support multiple authentication in self host
Posted
over 1 year ago
by
Hongmei Ge
0
Comments
Since we build web api self host story on top of WCF HttpTransportBindingElement, the multiple authentication is not support on WCF for 4.0. Here is the exception you will get if you tried to set the authentication scheme on httptransport binding element...
HongmeiG
Learning SignalR: Unable to get property 'client' of undefined or null reference
Posted
2 months ago
by
Hongmei Ge
2
Comments
One of the most common exceptions you will hit when you first started with a SignalR chat program could look like the following: Unhandled exception at line 78, column 13 in http://localhost:53632/home/chat 0x800a138f - JavaScript runtime error: Unable...
HongmeiG
How to retrieve all the filters that applies to one particular action in Web API
Posted
11 months ago
by
Hongmei Ge
0
Comments
Sometimes you want to retrieve all the filters that one action supports, and you can do that via the following code snippet. Hope this helps. Code Snippet Collection < FilterInfo > filterInfoCollection = action.GetFilterPipeline(); ...
HongmeiG
ASPNET WebAPI Beta has released
Posted
over 1 year ago
by
Hongmei Ge
2
Comments
Watch Dan's talk on the newly released WebAPI Beta. It is very cool! http://channel9.msdn.com/Shows/Web+Camps+TV/Dan-Roth-on-the-new-ASPNET-Web-API The aspnet web api project can be found at http://aspnetwebstack.codeplex.com/. A lot of new features...
HongmeiG
WCF: NotSupportedException: The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'Ssl'.
Posted
27 days ago
by
Hongmei Ge
0
Comments
When you are using WCF with client certificate over SSL in web hosted case, you might hit an exception like the following: [NotSupportedException: The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'Ssl'.] System.ServiceModel...
HongmeiG
Great Hiring event for Microsoft Server and Tools
Posted
10 months ago
by
Hongmei Ge
0
Comments
For more details, please visit http://stbjobs.com/ .
Page 1 of 1 (12 items)