Wednesday, March 12, 2008

skiing vacation .....

I am composing this blog from Mumbai bound Rajdhani express and I am amazed that in spite of all the chaos on the platform it is quiet inside this train. I am on my way home to finish my last 3 days of a 15 days vacation and am pretty excited about these last three days as I am there to attend wedding of a very dear friend of mine.
I spent my last week learning skiing in the small town of Auli in the Himalayas. I went there with a college friend of mine and we made a whole load of new friends on the trip. The place is not known to many and finding information about skiing in India on Google is a herculean task. You need to type in the correct keywords and you might just hit the website of Garhwal Mandal Vikas Nigam (GMVN) http://www.gmvnl.com/ . The place is situated in Uttaranchal and reaching Auli is loads of fun. I took a 2.5 hours flight from Bangalore to Delhi. From Delhi I reached Haridwar by a holiday special train in little over 5 hours. After that begins a road journey of around 10 hours to reach Joshimath and from there I took 2 cable cars (around 30 mins.) to reach the town of Auli. There isn’t much except the GMVN quarters and a private shop and a hotel in Auli. There’s an abandoned temple from where one can see the nice view of Nanda Devi (2nd Highest peak in India) and other peaks like Palki, Dronagiri etc.
Stay:-
We stayed in a Dorm and had a mess where one can have nice meals with the warmth of Bukhari. We had a Bukhari in our dorm however it was in the common area and hence one had no access to the Bukhari once you want to go to bed. I was dreaded at the thought of going to bed for first couple of days as even if you turn around in your sleep you would hit an area in the bed which is cold and damp. It was easier during the later part of the stay, may be because I was damn tired by the time I hit the bed or may be because I got acclimatized to the cold J .
Ski Equipment:-
First day was the day when GMVN people registered us and distributed the equipments to us. The equipment was basically a pair of sticks, skis and shoes. We found it damn difficult to walk in those shoes and I fell a couple of times trying to walk in those shoes. However it became easier by the day to balance in those shoes and I found it comparatively easy to walk as I got tips from the instructors on how to make them easy on feet.
Skiing progress:-
Since ours was a March batch the snow from the lower slopes had already melted and hence we didn’t have access to the ski lift. This meant that we had to carry our skis up on the slope every time we come down on the skis, which was a tiring job however enthusiasm in the batch was awesome and people did it tirelessly. First day we got just the basic of how to wear the skis, what is meant by tip, heel, mountain, valley, fall line etc. We also got to know how to stand on the skis without falling or sliding.
On the second day when the instructors started I couldn’t stand on my skis and got so damn frightened that my legs started trembling on the skis. That was a bad sign however instructors started again and taught us how to stand as well as how to do side stepping and go up the slope. We also got to do the basic snow plough on our skis.
Third day again was to perfect the snow plough and braking skills.
Personally the fourth day was a disaster as the instructors started to teach how to turn on the skis and how to traverse the slope by weight balancing on upper and lower skis. I couldn’t do that and to top it I couldn’t even do the snow plough which I was able to do on the second day. That was the day I didn’t manage to stop the skis even for once without falling. My brake was to fall sideways that day. I had at least 15 falls that day.
As they say Fifth day was a charm as not only I managed to traverse the whole slope in the first shot I got my snow plough and braking technique back too. I had a spectacular somersault fall that day which I wish someone had video shot for everyone to see J
Sixth day again we kept traversing the slope and it was nice to see that instructors managed to teach it to the whole batch including non athletic people like me on how to turn the skis and how to lean on the skis.
Evenings:-
We used to be back from skiing at around 1.30 and had lunch from 2.00 to 3.00 PM. Post this we had all the time in the world and it was killed playing cards, doing bakar near Bukhari, having tea, Maggi and Momos.
Badge Ceremony:-
At the end of the sixth day the whole batch got a badge from the instructors and the whole batch was all praise for the instructors as they were as patient as Himalayas with us and they taught basic skiing to almost everyone in the batch.
Group:-
I managed to make a few acquaintances’ on the trip. There was a Doc (Sonal) in the group who treated me for a blister in my leg. Her 7 year old twins (Buddies) were the best in the whole group in learning skiing. They were the only ones who treated the skis as extension of their feet. IIT Guys (Nitin and Gaurav) who donated their cold cream and jacket to protect me against the sun and snowJ. Gujju no. 1 (Hemali) and Gujju no. 2 (Jineesha) whom I always defeated in cards ;-) (Well you defeated me twice and I defeated you 1000 times). Israeli buddy (ET) with whom I sang hotel California like I used to in college. Sohel bhai and Sirji (Pushpak, the navy guy) from whom I knew about lot of other adventure sports stuff like Waterfall rappelling, rafting etc.
So that’s the end of a long post about the short visit I had to Auli and some terms which I learned about skiing.

Thursday, January 31, 2008

SSOProvider for BDC doesn't work for .NET 3.5

If you are using Visual Studio 2008 to build a SSOProvider for BDC in Sharepoint 2007 it might not work.
It'll work if you build the dll by targetting it for .NET 2.0 framework.
Looks like Sharepoint 2007 can't load the SSOProvider assembly if the target runtime is 3.5

~Abhishek

Writing a simple SSOProvider for BDC in Sharepoint 2007

Here's a simple code which i wrote to enable BDC call webservices which support basic authentication.

I started with msdn sample for a simple pluggable SSOProvider and hardcoded the user according to my own needs.
I was getting an exception when Sharepoint tried to call this SSOProvider as it expects that GetRestrictedCredentials method of ISSOProvider is also implemented. I just returned the output of GetCredentials from this method and was able to call the service successfully.
Here's the code for reference ....


public class BasicAuthentication : ISsoProvider
{
#region ISsoProvider Members
public SsoCredentials GetCredentials(string AppID)
{
try
{
SsoCredentials ssoCreds = null;
switch (AppID)
{
case MyAppName:
{
//this is our application so return the basic credentials
ssoCreds = CreateSsoCredentials(AppID);
break;
}
default:
{
//not our application so let's not even let it have access to our SSO
throw new SingleSignonException(SSOReturnCodes.SSO_E_ACCESSDENIED);
}
}
//return the created SSO Credentials
return ssoCreds;
}
catch (SingleSignonException singleSignonEx)
{
EventLog.WriteEntry("GetCredentials has thrown SSO Exception");
throw;
}
catch (Exception exception)
{
EventLog.WriteEntry("SimpleSSOProvider", exception.ToString());
throw new SingleSignonException(SSOReturnCodes.SSO_E_EXCEPTION, exception);
}
}
private SsoCredentials CreateSsoCredentials(string AppID)
{
SsoCredentials ssoCreds = new SsoCredentials();
ssoCreds.Evidence = new SecureString[2];
ssoCreds.Evidence[0] = MakeSecureString("D034677M1");
ssoCreds.Evidence[1] = MakeSecureString("Welcome1");
// Put the User Name and Password values into the credential object
ssoCreds.UserName = ssoCreds.Evidence[0];
ssoCreds.Password = ssoCreds.Evidence[1];
return ssoCreds;
}
private SecureString MakeSecureString(string sourceString)
{
if (sourceString == null)
{
//we don't have a good source string so return null
return null;
}
SecureString secureString = new SecureString();
foreach (char ch in sourceString)
{
//append each character in the source string to the end of our secure string
secureString.AppendChar(ch);
}
return secureString;
}
public SsoCredentials GetRestrictedCredentials(string AppID)
{
return this.GetCredentials(AppID);
}
public SsoProviderInfo GetSsoProviderInfo()
{
//This method is required for all SSO Providers.
SsoProviderInfo ssoProvInfo = new SsoProviderInfo();
//setup the information about our sso provider
ssoProvInfo.AssemblyName = Assembly.GetExecutingAssembly().FullName;
ssoProvInfo.Vendor = MyAppName;
ssoProvInfo.Version = "1.0.0.0";
return ssoProvInfo;
}
private const string MyAppName = "MyApp";

////Continue to implement other methods of the interface
////You can safely throw NotSupportedException from these methods...
}


~Abhishek

Calling SAP ESOA services from .NET

If you are calling a webservice from SAP ESOA world and are getting an InvalidOperationException then don't be surprised.
You just need to open the wsdl file and replace '' with '' and recreate the proxy. It should start working ....

According to a document on https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0421f9a-4c9e-2910-1085-a45f8e813324 SAP supports document style wsdl while Microsoft Visual Studio expects a RPC style wsdl and hence the runtime exception.

Hope this helps anyone who's struggling with calling SAP ESOA services from .NET world...

~Abhishek

Friday, January 11, 2008

BDC Metaadata Editor

Finally after struggling for one full day i got a BDC Metadata Editor from Microsoft in their SDK.
The SDK can be downloaded from http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en
Happy BDC'ng...

~Abhishek

Thursday, January 10, 2008

Setting a reference to assembly in GAC

I wanted to set reference to an assembly and couldn't find a direct way to do it from Visual Studio.
So here's how i hacked into registry and was able to view the GAC as i view any file in windows explorer.

Here is how:
1) Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion in the RegEdit
2) Add a new Binary Value DisableCacheViewer and given it a value of 1
3) Navigate to C:\WINDOWS\assembly and you can see the contents of the folder as sub folders, not the standard GAC Viewer


Happy coding...

~Abhishek

Wednesday, January 2, 2008

Using ISO Images without burning them on DVD

I am trying to use ISO images to install some stuff on my machine and i found it very strange that not many easy to use tools are available on web to read ISO files and use them. Most of the tools allow you to burn the iso image on a DVD and then use them. Now this is pretty time consuming process.
So i googled hard and found an unofficial tool from microsoft which can be downloaded from http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe
Its probably unsupported from Microsoft but is very easy to use. Don't forget to read the readme file which you would get once you extract the exe.

So happy mounting the ISO images...

~Abhishek