Wednesday, December 24, 2008
Google.. does it again...
Posted by Chinmay at Wednesday, December 24, 2008 0 comments
Labels: Google
Wednesday, December 17, 2008
Killing a Process running on Remote Computer(The batch file way..)
This morning when I came to office, I had a set of tasks which needed to be completed ASAP. My current engagement requires me to work on customer server via RDP. Now RDP has an interesting behavior, in certain cases if the server has a limited resources, it will simply refuse to allow RDP access. And unfortunately, it happened to me today. One of my colleague ran a time-consuming, resource-hungry custom code over the weekend so we can work smoothly during the weekdays, however the application could not complete its work during the weekend and was still running and consuming whatever resources were available and in turn caused a DoS (Denial Of Service). I thought to use VBScript/WMI to kill the remote process as I had the name of the process to be killed and have had used it in past effectively. I started working with the script but, I felt it will take too much time to figure out the script that will help me so I decided to search on my favorite search engine for easier and faster options. Within a few minutes I got the pointers to use tasklist.exe and taskkill.exe. I killed the process manually and easily got my access restored. However at end of the day, spending some time one this and making a batch file will come handy as we run into this situation more often. So I spent few minutes in notepad and here is the batch file that I got. This batch file is not polished but should get the job done in time of needs. And as usual I don't take any responsibility of any kind if you use this script and get into some trouble. So use it at your own risk...
@ECHO OFF
@ECHO WARNING : This script will forcefully kill the process and will not ask for confirmation before killing the process.
SET MESSAGE=
SET SYSTEMNAME=
SET USERNAME=
SET PASSWORD=
SET PID=
SET /P MESSAGE=Press any key to continue...
SET /P SYSTEMNAME=Enter target computer name or IP :
SET /P USERNAME=Enter User Name (domain\username) :
SET /P PASSWORD=Enter Password :
@ECHO Please wait while we get the list of processes...
TASKLIST.EXE /S %SYSTEMNAME% /U %USERNAME% /P %PASSWORD%
SET /P PID=Enter PID(Process ID) of the process you want to kill :
TASKKILL.EXE /F /S %SYSTEMNAME% /U %USERNAME% /P %PASSWORD% /PID %PID%
SET /P MESSAGE=Press any key to continue...
Posted by Chinmay at Wednesday, December 17, 2008 0 comments
Generic Serializer-Deserializer
Around one and half year back, I was handling an interesting situation. There were few different systems sending in XML messages, and my component had to accept the message, interpret it and take appropriate actions.
It was easy till I came to know about XML message and its elements and alternate messages. The possibilities were unlimited, and it sounded stupid to hand code/hard code XML elements. Rather than that the solution was designed so that we converted XML -> XSD -> CS. After few changes made here and there to fine tune the CS files with XML, we faced another challenge, we had to serialize/deserialize incoming/outgoing messages. After few minutes of R&D I could pull out this. I've listed the method signature and minor code implementation. It is so simple that you can easily get it working in few minutes.
public static string Serialize<T>(
T data
)
{
//Create the Serializer
XmlSerializer xmlSerializer = new XmlSerializer(typeof(T));
//Use the serializer we have just created and serialize the object.
}
the same goes with the Deserializer
public static T Deserialize<T>(
string serializedData
)
{
//check whether the incoming data is not a null string
if (string.IsNullOrEmpty(serializedData))
return default(T); //This can be controversial, so handle with care and as per your requirements, in certain cases you can return null as well, kindly let me know if you have anything that can improvise this code
//create a serializer
XmlSerializer xmlSerializer = new XmlSerializer(typeof(T));
//Use the deserializer we have just created and deserialize the object.
}
I must thank my friend Sidhartha http://IamJunk.spaces.live.com, as he helped me a lot to enhance the code. I've not published the whole code, in case you need it, drop me an email/comment. I will be more than happy to help you out.
Posted by Chinmay at Wednesday, December 17, 2008 0 comments
Labels: .Net
All In One Entity for CRM 4.0
Sometimes back I was doing a research on a script(It is coming soon.. just wait and watch...) and that script required me to try all the CRM datatypes one by one on the form. And trust me, it was a pretty boring job to create the element on a CRM form and then check compatibility of that script with it. Anyway, I thought I can help out my friends out there just in case they face the similar situation. So here is a SkyDrive link :
https://cid-b6a90e5b5092759c.skydrive.live.com/self.aspx/BlogStore/AllInOneEntity.zip
If you find that I've missed out something, kindly drop me a note. Thanks in advance.
Posted by Chinmay at Wednesday, December 17, 2008 0 comments
Friday, November 21, 2008
Google Launches Themes for Gmail
Posted by Chinmay at Friday, November 21, 2008 0 comments
Wednesday, November 19, 2008
Download Yahoo! messenger 9 setup from Yahoo!
I wanted to install Y!'s new messenger.. version 9... (oh it is beautiful I must say.. check out the screenshot..) on one of the Virtual PC... and I didn't want to connect to Internet for the sake of installing Y!.. so .. after looking here and there.. somewhere... I found that Y! keeps its installation images under http://download.yimg.com/ycs/msg/dl/msgr9/, This path doesn't have directory browsing enabled so you will not find anything there... however if you want to do an offline installation .. all you have to do is.. to click here
Posted by Chinmay at Wednesday, November 19, 2008 0 comments
Tuesday, November 18, 2008
You have seen Notepad... XmlPad.. and now... LINQpad..
Posted by Chinmay at Tuesday, November 18, 2008 0 comments
Wednesday, November 12, 2008
Voice or Video Chat? Sign in to Gmail
Gmail's official blog has this announcement shouting it loud that Gmail now has Voice and Video chat(http://gmailblog.blogspot.com/2008/11/say-hello-to-gmail-voice-and-video-chat.html).
So instead of a flash application, this one is a .Net Clickonce application(PLEASE CORRECT ME, IF I AM WRONG). I detest running any application on my laptop/desktop that comes from Google so I didn't allow it to run. But when it was being downloaded, the dialogbox was the famous.. clickonce installer dialogbox. anyways..sooner or later some one from my circle will install it and I will come to know what it is all about.
Google has been pretty quick when it comes to rolling out features to its userbase lately, as a result you can see the voice and video option in menu in the screenshot below.
Posted by Chinmay at Wednesday, November 12, 2008 0 comments
Don't be shocked if you see something like this instead of this blog
I've been getting messages from friends that they are not able to access my blog. Instead of my blog they are getting some biblecollegeonline shit. I am trying to figure it out what is wrong but as of now I am helpless. It looks like DNS Cache Poisoning or something else.. I apologize for any inconvenience caused and all I can ask is to bear with it while blogger staff is working on it.
Posted by Chinmay at Wednesday, November 12, 2008 0 comments
Tuesday, November 11, 2008
Windows 7 for Developers
Posted by Chinmay at Tuesday, November 11, 2008 0 comments
Recorded sessions of PDC 2008 available for download
Posted by Chinmay at Tuesday, November 11, 2008 0 comments
Microsoft Virtual TechDays is back!
You will be asked for your live id and also once you are logged in you can download recorded sessions and presentations... go ahead... Enjoy!!!
Posted by Chinmay at Tuesday, November 11, 2008 0 comments
Labels: Microsoft
Sunday, November 09, 2008
Visual Studio 2010 and .Net Framework 4.0
Posted by Chinmay at Sunday, November 09, 2008 0 comments
Tuesday, November 04, 2008
Microsoft Announces DreamSpark India
As described by Microsoft, Microsoft DreamSpark™ is a program that provides no-cost access to Microsoft designer and development tools for verified students around the world, to support and advance their learning and skills through technical design, technology, math, science and engineering activities. This program equips tomorrow's developers with the professional tools to inspire and create today.
I suggest to go through the site once, and if you read this on or before 5th November, 2008 02.00 PM IST then you might like to watch the live broadcast of Bill Gates speech from New Delhi, India. Click Here to register.
There is a lot more to DreamSpark but we will check it out ... laterz... till then.. bbye...Posted by Chinmay at Tuesday, November 04, 2008 0 comments
Labels: Microsoft
Monday, September 08, 2008
Microsoft Dynamics CRM 4.0 SDK Update - v4.0.6 is out
Posted by Chinmay at Monday, September 08, 2008 0 comments
Friday, September 05, 2008
Embed Image in CRM 4.0 templates
In my current engagement, there was a requirement to embed images in email template. Now, as it is very well known that you can easily achieve it by copy pasting the HTML to CRM's Rich Text Editor. Most of the times it works fine. But then if it goes normal all the times I won't have to blog about it right? so.. here it goes..
In our case, we had a sample word document which had an image on top and some formatted text. As soon as this came to me, I fired up CRM's web UI and created a blank template. I created an HTML file out of word document. After opening the html file and copying/pasting, it worked fine and template got saved without any issue. Once the template was in place, I tried to apply it to an email activity. It worked fine, I could see the formatted text, the image on top and the layout was also preserved. Happily I clicked on Save button and.... whoooooshhh... it was gone.. the image was gone, everything else was there, but the image was gone. So there I was, the only thing I needed to close today to have a nice weekend was this email template fix. Also one of my colleague was working on this and he did a lot of research eliminating many other possibilities why it won't work. After few more minutes, I made a blank html page, added a nice Windows Live Logo and repeated the copy/paste on the same email template. Once it was done, I applied to the same email and voila.. it worked. So it was pretty clear that it was all due to the HTML that we were using for the template.
I always keep IE Dev Toolbar available, so I fired it up, and clicked on Validate -> HTML. The online HTML validator showed me there were some minor issues with the HTML. I corrected them and removed word HTML tags in which my IMG tag was wrapped. After this I followed the process copy/paste and test and .. there it was a .. working email template with an image.
Also it was very clear that we will have to find out a structured process to do it as there will be more templates coming soon. I might come up with an automation process, if you are interested keep watching this blog or drop me an email, if you need it urgently.Posted by Chinmay at Friday, September 05, 2008 13 comments
Labels: CRM 4.0
Saturday, August 30, 2008
CRM 3.0 - Hiding the Delete Button Hack
My day to day job revolves around supported solutions on CRM 4.0 and Microsoft .Net however as we all know customers some times are demanding and asks for features which doesn't come under umbrella of supportability. And as a solution provider we have to meet it by hook or crook.
In this case, I came across a mail on one of our WW Community. The problem statement was pretty clear : The customer wanted to hide delete button that appears on the CRM GridView for each and every entity(maybe selected entities too). Now they wanted the users to have rights to delete CRM records so we can't just take away their rights(Yeah.. that's the first thing that came to my mind...). But they wanted to do it via some custom applications not from the CRM Web UI. After doing some R&D I found that it can be achieved via the steps mentioned in next paragraph. I would like to declare that this code/method is NOT AT ALL supported by CRM Product group. This is just to demo that certain feature can be disabled in CRM without affecting roles.
1. Locate and back up loader.aspx from CRMWeb folder.
2. Open loader.aspx in Visual Studio or any text editor of your choice.
3. At the closure of the first script tag, copy-paste the following code
<!--/******Disable Delete Button Hack BEGIN*********/-->
<script language="JavaScript" type="text/javascript">
function HideDeleteButton()
{
//Check whether the iframe is completely loaded or not
if(document.getElementById("stage").readyState == "complete")
{
try
{
//Those menu items are part of mnuBar1 span, so we will get the reference of mnuBar1 first
//and then all the SPAN elements(represents individual menu items)
var spanElements = document.frames[2].document.getElementById("mnuBar1").getElementsByTagName("SPAN");
//iterate through the menu items and check whether the title is Delete or not
//if yes, this is the one we are looking for, set its display to none and break the loop
for(var i = 0; i <= spanElements.length; i++)
{
try
{
if(spanElements[i].title == "Delete")
{
spanElements[i].style.display = "none";
break;
}
}
catch(e){continue;}//continue in case of error
}
}
catch(e){}//ignore any other error
}
}
</script>
<!--/******Disable Delete Button Hack END*********/-->
4. There are frameset definitions at the end of the page, change
<frame name="stage" scrolling="yes" src="<%HttpUtility.HtmlAttributeEncode(homePageUrl, Response.Output);%>"></frame>
to
<frame name="stage" scrolling="yes" src="<%HttpUtility.HtmlAttributeEncode(homePageUrl, Response.Output);%>" onreadystatechange="HideDeleteButton()"></frame>
5. Test by opening up the workplace.
This script might have other side effects which I've not fully explored yet so use it at your own risk.
Posted by Chinmay at Saturday, August 30, 2008 0 comments
Labels: CRM 3.0
Friday, August 22, 2008
Microsoft Releases Photosynth
I just got this mail from one of my colleague mentioning Microsoft Photosynth has just got released http://photosynth.net/default.aspx..
I found it ... really... sexy.. have a look... and dont ask me about the requirements.
Posted by Chinmay at Friday, August 22, 2008 0 comments
Labels: Microsoft
Monday, July 07, 2008
Developer Ramp up Kit for Dynamics CRM 4.0
You can access the Kit online on MSDN at : http://msdn.microsoft.com/en-us/library/cc720132.aspx
Summary of the Kit according to MSDN :
This kit is for .NET based developers who want to ramp up and build on the Microsoft Dynamics CRM platform. Microsoft Dynamics CRM 4.0 uses familiar components such as Web Service endpoints, Windows Workflow Foundation, SSRS reporting, and more; making it a general purpose platform for any line-of-business applications. Developers can use their existing .NET skills to take advantage of various features of the Microsoft Dynamics CRM platform. This kit drills into the details of such development and explains how developers can connect, extend, and embed with the Microsoft Dynamics CRM platform. It includes presentations, hands-on labs, and a VPC environment for practicing. This content was delivered earlier as part of the Metro Early Adopter initiative and the video recordings of the ramp-up presentations are included as well.
Familiarity with the .NET Framework, Microsoft Visual C#, Jscript, Microsoft SQL Server and general Web development is recommended.
You can find more info about the kit at :
http://blogs.msdn.com/girishr/archive/2008/07/06/developer-ramp-up-kit-for-dynamics-crm-4-0.aspx
Posted by Chinmay at Monday, July 07, 2008 0 comments
Wednesday, July 02, 2008
I am back...
Posted by Chinmay at Wednesday, July 02, 2008 0 comments
Saturday, June 07, 2008
Google Launches Google Mail Labs
Posted by Chinmay at Saturday, June 07, 2008 1 comments
Thursday, May 15, 2008
CRM SDK 4.0.4 is out...
If you are in CRM 4.0 Development, a must get for you is CRM SDK. You can get the latest version from here : http://www.microsoft.com/downloads/details.aspx?FamilyID=82E632A7-FAF9-41E0-8EC1-A2662AAE9DFB&displaylang=en.
Overview
It contains all new information about creating plug-ins, working with custom workflow activities, using the new Web services, using new data management features, and much more.
This SDK contains information for developers writing server side code, custom business logic, integration modules, workflow assemblies, and more. It provides an architectural overview of Microsoft Dynamics CRM, the entity model, security model, and Web services. Sample code and walkthroughs guide you through the new features.
The SDK also contains information for developers customizing the Web client or Microsoft Dynamics CRM for Microsoft Office Outlook, including scripting, integration of custom Web pages, sample code, and a detailed user interface style guide.
Look for regular updates to this SDK. Future releases will include the ISV Guide and Report Writers Guide.
Posted by Chinmay at Thursday, May 15, 2008 0 comments
Monday, May 12, 2008
ASP.Net Interview Question Links - Part I
Posted by Chinmay at Monday, May 12, 2008 0 comments
Thursday, May 08, 2008
Installing Microsoft Windows XP SP3 Made Easy
I will go step-by-step and will assume you have a clean/Legal XP SP2 Installed. I am very proud as my current installation has not failed in last 1.5+ years. It is not only that XP SP2 is really good in its own ways, there are tricks I've learnt over the years that helps me to keep my OS safe otherwise, my old friends, knows, every 6 months I had to re-install OS no matter which one is taken for example.[Soon you will find a post on that..OS I've installed and my experience with them].
So here it starts, Installing Microsoft Windows XP SP3 Made Easy for everyone... not just for noobs.. :)
Get the stand alone installer to keep the whole game simple. I know it is easy for some people to get SP3 via windows update, I think, from an average Indian's Internet access view point, we better get the stand alone installer.
Google as well as DUMB search engine on Microsoft Download[When I got it, it was ranked 20405 in popularity :P] will not get you this one easily, so here is the direct link.
http://www.microsoft.com/downloads/details.aspx?FamilyID=5b33b5a8-5e76-401f-be08-1e1555d4f3d4&DisplayLang=en
Also maybe in future you can just use the file name or other details mentioned here from the download page.File Name: WindowsXP-KB936929-SP3-x86-ENU.exe Version: 1 1 Knowledge Base (KB) Articles: KB936929 Date Published: 5/6/2008 Language: English Download Size: 316.4 MB
While the file is being downloaded, I suggest you start taking backup of your files, in unfortunate event of update failure, you might just love me that I suggested you to take this step.
Once the file is downloaded, I would suggest it to move it to your fastest disk drive - it can be the SATA drive you have or the portable HDD or anything that has more than 2 GB of free space to keep things fast[My installation started at 01.28 AM and ended at 01.45 AM with 512MB RAM on T2050 @ 1.60GHz]
Close all unnecessary programs and services[stopping services can be a serious problem so as of now if you are not a PRO I would suggest to leave them intact].
Remove all the removable drives, not the one on which you have the SP3 ofcourse. I would suggest to use a clean HDD and system i.e. Anti-Virus and Anti-Spyware check should have been performed. Also remove any bootable disks from optical drives.
Disable the all the Network Adapters and switch off the WLAN if it is on. This is not a mandatory step and it is upto you to follow it or not. However DO NOT forget that you might drop all the protection you have in place in the very next step and you will be vulnerable to any kind of attack... any time.
Shut down your Anti-Virus, Anti-Spyware and Firewall. Yes, I am not drunk this is to not to hinder with SP installation and to improve performance.
If you are using a laptop, please make sure you are plugged in and also have enough backup power in case of power loss. The same goes for PC, a decent UPS will do the trick for the PC users though.
Launch WindowsXP-KB936929-SP3-x86-ENU.exe, if you have downloaded the file from Internet, Windows XP, as a protection measure, might ask you 2-3 times to confirm whether you want to run this file or not. Click on yes without any fear, if something is gonna go wrong..anyways.. it will go wrong.. neither me..nor you can do anything about it.. ) so chill...
It will start extracting the files, most probably to the best drive/volume[In terms of performance].
Once the extraction is complete, follow the On-Screen instructions to start the SP Installation.
It is a pretty simple thing to do though, internally it takes backup of the files to the location which you mentioned at the startup and then updates the system files followed by a system reboot.
Yes, you must reboot the system once you have applied the update.
Start your Anti-Virus, Anti-Spyware and Firewall and then re-attach the removable media as well as enable the network adapters.
And hoorrrray....we are done...
If you face any problem during the setup...you know where you have to look forward to right? aahh..common... not to http://metrix.blogspot.com ... go to Microsoft Support..huh..
Posted by Chinmay at Thursday, May 08, 2008 1 comments
Its time guyz : Getting ready for Interviews
Expecting a lot of input from your side...here I stop...:)
Posted by Chinmay at Thursday, May 08, 2008 0 comments
Labels: Interview
Sunday, May 04, 2008
Bad Bad Bad News...Microsoft withdraws its hostile bid
Posted by Chinmay at Sunday, May 04, 2008 0 comments
Thursday, May 01, 2008
Important Tips against phishing attacks from Official Google Blog
Posted by Chinmay at Thursday, May 01, 2008 0 comments
Labels: Microsoft
Wednesday, April 30, 2008
Bang Bang.. on Google..
Posted by Chinmay at Wednesday, April 30, 2008 0 comments
Monday, April 21, 2008
Yet Another Gmail Bug surfaces
Posted by Chinmay at Monday, April 21, 2008 0 comments
Thursday, April 17, 2008
Blogger's made a poo poo..
Posted by Chinmay at Thursday, April 17, 2008 0 comments
Labels: Microsoft
Google is ready to penetrate deep...The Web..dude..The Web..
Posted by Chinmay at Thursday, April 17, 2008 0 comments
Did gmail made you pull your hair on 16th April?
one of the angry customer said,
"A huge, if not number one selling point for moving one of our companies over to Google Apps was Google's robust network!" complained one user. "Now that we have migrated over, it seems we are abused children who do not deserve an explanation for why the service we pay for is taken offline. Perhaps it is time to find a new e-mail host."
Now this might stop jumping monkey of SalesForce.com?.. hopefully.. as they are the latest clowns in the google apps bandwagon.
Find the whole story : http://www.news.com/8301-10784_3-9920715-7.htm
Posted by Chinmay at Thursday, April 17, 2008 0 comments
Like Gmail? Join the team then...
Posted by Chinmay at Thursday, April 17, 2008 0 comments
Saturday, April 12, 2008
After MacBook Air, Vista Gets Hacked
Posted by Chinmay at Saturday, April 12, 2008 0 comments
Orkut enhances the Search with Auto Complete
Posted by Chinmay at Saturday, April 12, 2008 0 comments
Thursday, April 10, 2008
Microsoft Discloses 14,000 Pages of Coding Secrets
Posted by Chinmay at Thursday, April 10, 2008 0 comments
Google Announces Google App Engine
You can serve your app using a free domain name on the appspot.com domain, or use Google Apps to serve it from your own domain. You can share your application with the world, or limit access to members of your organization.
App Engine costs nothing to get started. Sign up for a free account, and you can develop and publish your application for the world to see, at no charge and with no obligation. A free account can use up to 500MB of persistent storage and enough CPU and bandwidth for about 5 million page views a month.
During the preview release of Google App Engine, only free accounts are available. In the near future, you will be able to purchase additional computing resources.
Posted by Chinmay at Thursday, April 10, 2008 0 comments
Sunday, April 06, 2008
Microsoft All Set to takeover Yahoo!!! Sends a 3 weeks ultimatum
Posted by Chinmay at Sunday, April 06, 2008 0 comments
Thursday, April 03, 2008
Gmail's Spam filter taking a vacation...
Nowadays I am facing these strange mails directly going to my inbox, i wonder is Gmail's Spam filter taking a vacation?Is this only me or there are many others? :D Btw... according to some of my friends.. they get Spams in Gmail...everyday..buh buh..
Posted by Chinmay at Thursday, April 03, 2008 0 comments
Wednesday, April 02, 2008
Announcing Google Weblogs (beta) - Nice April Fool Trick from Google
Nice try guys... but I guess.. it works on on Freetards.. ;)
Posted by Chinmay at Wednesday, April 02, 2008 0 comments
Never thought that this will happen so soon...
Posted by Chinmay at Wednesday, April 02, 2008 0 comments
Labels: IIS
FlashGet or TrojanGet - Beware FlashGet Users
Posted by Chinmay at Wednesday, April 02, 2008 0 comments
Tuesday, April 01, 2008
Gmail-Gtalk April Fool?
This time Google has baffled me, I don't know whether it has to do anything with a recent news leak in middle east, where some caching at ISP Side, allowed a user to see some other user's A/C data, or maybe it is to prevent some niche XSS attacks crafted against the Search Giant's mail service. Personally I use Gmail all the times as I find it quiet faster, lighter and most importantly superior than its counter parts, so I have multiple A/Cs on Gmail. One of them is widely user with Friends while another is strictly for business purposes. On both of them chat is enabled so I don't have to rely on Gtalk whenever I need to chat. I saw this strange thing few weeks back, if on a single computer, I login to one A/C say A/C A, at first my chat will be enabled, the moment I launch A/C B, the chat applet in A/C A will die and will start working for A/C B, if I do a page refresh in A/C A, then A/C B chat will be gone with the wind. Now I know many of Gmail lovers will start jumping saying.. oh..its a feature.. you don't know..and blah blah blah... for me...ITZ A BUG....
Posted by Chinmay at Tuesday, April 01, 2008 0 comments