Using client certificates in .NET

Using client certificates in .NET part 1: introduction



Difference between Self Signed SSL & Certificate Authority

E-commerce has played a vital role in modern technology and due to phishing and spyware attacks, it is safe to install SSL certificate on e-commerce website. Generally, Certificates are of two types one is self-signed and the rest is signed certificate. Both certificates hold well position at their personal level. It depends upon the site owner, what he will choose is a right certificate for him. There are organizations who want certificate only for encryption and there are organizations who want to increase trust in identity, legitimacy, and security.

Self-signed certificate The certificate has signed by its owner. Self-signed certificates generally utilized for testing local servers. The web browser will show a pop-up, that the web site certificate is self-signed. Such certificates are not signed by the Certificate authority. Self-signed certificates deliver the same level of security to data that flows in the tunnel between browser and server, but has no relation with the identity of the person or organization issued it, thus the owner of a web service stays anonymous. That’s why self-signed certificates are considered as untrusted.

Signed certificate is an authorized certificate issued by trustworthy certificate authority. The Secure Socket Layer is utilizing to encrypt the data between the web server and client’s browser. When client visits site it shows in address bar about the authenticity of website. It boosts confidence of customer. The information flows in tunnel is secure. The most common certified authorities are Symantec Jump Thawte Jump RapidSSL Jump GeoTrust Jump etc. Both certificates provide encrypted technology but authority only verified Signed certificate.

Drawback of Self-signed Certificate: Let’s discuss the drawbacks of self-signed certificate comparing with signed certificate.

  • Self-signed shows unauthenticated message in web address while signed certificate shows authentication message hence customer find trusted seal in address bar
  • Self-signed certificate encrypt the data but flunk to retain customer on site due to error message regarding risky behavior of web site.
  • Self-signed certificate does not allow any authority for implementation while signed certificate needs a certified authority for implementation.
  • Self-signed certificate are for testing so there is no call for to pay for a signed certificate while signed certificate is embedded with https:// and utilized for online purchase.
  • Customer scared to deal with self-signed certificate because of unsafe environment of certificate while customer gains self-assurance transacting online with signed certificate.
  • Self-signed certificate fails in E-commerce business because it does not attract customers while Signed certificate attracts customers due to its authenticity.
  • Self-signed certificate are free of cost while signed certificate are usable from $10 to $1000 per year.
  • Self-signed certificate is easy to deploy while signed certificate require following a process of deployment.
  • In Self-signed certificate private key is shared between third party and end user while in signed certificate private key is kept with end user and not shared with anyone.

If we conceive the above difference than it is admirable to deal with signed certificate because customer is the king in this competitive market hence if customer is not satisfied with your website than no need to avail such certificate.




The entity or complex type cannot be constructed in a LINQ to Entities query

You cannot (and should not be able to) project onto a mapped entity. You can, however, project onto an annonymous type or onto a DTO:

public class ProductDTO
    public string Name { get; set; }
    // Other field you may need from the Product entity

And your method will return a List of DTO’s.

public List<ProductDTO> GetProducts(int categoryID)
    return (from p in db.Products
            where p.CategoryID == categoryID
            select new ProductDTO { Name = p.Name }).ToList();



Another Solution


How do I make EditorFor conditionally readonly?





@Html.EditorFor(model => model.Quantity, ViewBag.Readonly ? (object)new { htmlAttributes = new { @readonly = "readonly", @class = "form-control" }} : new { htmlAttributes = new { @class = "form-control" } })




Asc/Desc tooltip on sorting columns?


if (($(this).hasClass(‘sorting’)) || ($(this).hasClass(‘sorting_desc’))) {
$(this).attr({title: ‘Sort Ascending’});
} else {
$(this).attr({title: ‘Sort Descending’});