Another Installer/Setup Project drama, .NET 3.5 required but .NET 4 is installed

Rather simple thing, but took me a fair bit to solve this one. Maybe cause I am blind.

Had  .NET project create with target framework 4. Changed them to 3.5.

In installer/setup project changed .NET framwork to 3.5 also changed link.

If I clicked on setup.exe it still would dl .NET Framework 4.
Go to Installer/Setup project properties. Click on prerequisites and select what you need.

Simple ehhhh ūüôā

Advertisements

.NET ssl certificates and webservices

Hi,

Had to  change one of my c# programs that uses consumed webservices to use SSL and not just server side certificat, but also client side.

1. Certificate files

Add your server certificate to “Local machine”¬† -> “Trusted Root “certificate store.

Add your client host certificate to “Local machine” -> “Personal” certificate store.

2. Change csharp code to use ssl

Create HttpBinding

BasicHttpBinding primaryBinding = new BasicHttpBinding();

primaryBinding.Security.Mode = BasicHttpSecurityMode.Transport;
primaryBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;

Create EndpointAddress

EndpointAddress remoteAddressPrimary = new EndpointAddress(new Uri(conn.PrimaryCapturePointURL));

Create ws

wsPrimary = new iWebServiceClient(primaryBinding, remoteAddressPrimary);

set webservice to use client certificate

wsPrimary.ClientCredentials.ClientCertificate.SetCertificate(
                                        StoreLocation.CurrentUser,
                                        StoreName.My,
                                        X509FindType.FindBySubjectName,
¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬†¬† “yourdomain.com”);

This next line will override stanadart mode, I had to use this line since I have IE8, if you try to access webservice via IE you will  have to accept client certificate as well

more on this http://blogs.msdn.com/b/ieinternals/archive/2009/09/03/client-certificate-selection-prompt.aspx

So actual line is

 wsPrimary.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.PeerOrChainTrust;
That should be it.

NOTE:

If you do not import server certificate in root please use following code

I have this line in class cunstructor.
System.Net.ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(OnValidationCallback);

Then add follolwing method  to class

public static bool OnValidationCallback(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors)
        {
            return true;
        }

Hope this helps.


Ubuntu 11.10: Dell Latitutde trackpad/touchpad problem

Problem:

Installed ubuntu 11.10 on my works laptop. Could not change touchpad/track pad sensitivity. Installing all kind of packages did not work.

Error:

No driver installed

Fix:

Download driver

Reference:

http://ubuntuforums.org/showthread.php?t=1887683


Magento 1.6.0 : Product is not displayed

Problem:

When in category page customer clicks on product. Product is not displayed.

Error:

Call to undefined method Mage_PageCache_Helper_Data::getNoCacheCookieLifetime()

Can See error in log file or with fire bug

<div¬†class=”col-main”>

<script¬†type=”text/javascript”>
var lifetime = <br />
<b>Fatal error</b>:  Call to undefined method Mage_PageCache_Helper_Data::getNoCacheCookieLifetime() in <b>/home/aaaaaaa/www/app/design/frontend/base/default/template/pagecache/cookie.phtml</b> on line <b>29</b><br />

Fix:

Add follwoing code to file app/code/core/Mage/PageCache/Helper/Data.php

public function getNoCacheCookieLifetime()
{
return Mage::getStoreConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME);
}

If your magento uses compiler mode also change file

include/src/Mage_PageCache_Helper_Data.php

References:

http://www.magentocommerce.com/boards/viewthread/265631/#t374170

Please leave feedback if this was helpful, thnx.