Wednesday, July 13, 2011

Windows Powershell to import certificate in store

Powershell to import certificate in store.
Quick go through of adding certificates to Trusted Root Store using powershell.
Code is as follows –
Param
(
[String]$certPath="your certificate path ",
[String]$certRootStore = “CurrentUser”,
[String]$certStore = "root", - this means we are adding certificate to Trusted Root Certification authorities

$pfxPass = "Your password"
)   

Monday, July 4, 2011

ASP.NET - Paging in DataList control and binding generic List to DataList control in horizontal orientation


Paging in DataList control and binding generic List to DataList control in horizontal orientation.
June was very heavy because of work. I could not get time to write a blog post. July looks better as I am free. Client rejected all the efforts I put in the month of June and cancelled the project. I hate clients..!!
Hmmm…Anyways, during that time in June, I had implemented many things which look simple but hard to find on Google. Here is the one. Implement Paging in DataList control. I was so much used to GridView control that I never devoted time to look at DataList control. And when I had to work with DataList, I was stuck with basic functionality of paging even.


Alright here we go –
 

Tuesday, June 7, 2011

WCF - The page you are requesting cannot be served because of the extension configuration

The page you are requesting cannot be served because of the extension configuration.
Today I was getting bored. So just for time pass I was uninstalling and installing IIS repeatedly. Just for fun. Sounds crazy right? But I was doing it.
Finally at the second half my team lead asked me to create a sample WCF service and host in IIS with some useless functionality. J


Well, I created WCF, hosted in IIS. When I browsed .svc page, I received following error –
HTTP Error 404.3 – Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.


This was the point when I was happy!! J
Cause of the Problem – If you have Visual studio installed, then uninstall and install IIS again, then you will get above error. Due to uninstall of IIS, extension mappings for WCF SVC file were removed.

Wednesday, June 1, 2011

Windows Azure Connect – Enabling local machine or domain controller for windows azure connect

Enabling local machine or domain controller for windows Azure Connect.
After post of Enabling Azure Connect for VM Role, today, I will discuss about enabling local machine or domain controller for windows Azure Connect.
To enable local machines to connect to your Windows Azure roles, you need to install the connect endpoint software (connect agent). Login to local machine which you want to use for Azure Connect and follow al the steps mentioned below –