Search this site

Monday, November 14, 2011

Build your own Twitter Application in C-sharp/C# dot net (.NET).

This blog will help you create an application that will allow you to work with Twitter from your website.

The application is build according to Twitter OAuth 1.0a.

For this you need to register the website for sending request that can be done from here

You can give any live site URL here it will not accept local URL. Also describe the call back URL in case you intend to set request from a web application/site

Once you create you application you will get Consumer Key & Consumer Secret Key these will be used by you application (below).

Once you application is created go to the setting tab and select the application option as below in case you intend to tweet.

Now for creating a application follow these steps:

1) Download the twitter library(twittervb.dll)

2) Add reference of this dll in your .net web application.

private String ConsumerKey = "xxxxxxxxxxxxxxxxxxxxxxx";
private String ConsumerKeySecret = "xxxxxxxxxxxxxxxxxxxxxxxxxx";
TwitterAPI twitterAPI = new TwitterAPI();
if (String.IsNullOrEmpty(Request["oauth_token"]))
// Send the browser to Twitter for authentication along with a callback URL
Response.Redirect(twitterAPI.GetAuthorizationLink(ConsumerKey, ConsumerKeySecret, "http://localhost:1592/default.aspx"));
// Exchange the request token for an access token
twitterAPI.GetAccessTokens(ConsumerKey, ConsumerKeySecret, Request["oauth_token"], Request["oauth_verifier"]);
// You've got all the tokens now. You can write them to a database, cookies, or whatever
twitterAPI.AuthenticateWith(ConsumerKey, ConsumerKeySecret, twitterAPI.OAuth_Token, twitt

// Get some tweets from their timeline
foreach (TwitterStatus tweet in twitterAPI.HomeTimeline())
Response.Write("" + tweet.User.ScreenName + ":" + tweet.Text + "
twitterAPI.Update("You have Done it!!");
3) Update http://localhost:1592/default.aspx with you URL.
4) Run the .net web application.

Since this URL is different from the one that was used at the time of application creation Twitter will ask to confirm the request each time

You need to enter the credential and confirm the request click Authorize app.
5) Congratulations!! You have read some tweets as well tweeted something.

Thursday, November 03, 2011

Easiest manual Malware/Virus removal technique: How to manually remove Viruses/Spyware/Malware? Malware/Virus has corrupted all .exe files.Unable to open Task Manager, regedit, Folder Option and other system tools.


Some of the related Symptoms of the problems are as under:

1.       In Windows XP/Vista/7 based computer, Virus has disabled Task Manager, Registry Editor (regedit), Folder Option and not allowing execution of other system tools, for example: Process Explorer, Process Monitor, etc..
2.       Unable to view hidden files.
3.       Computer has become too slow.
4.       There are frequent pop-up messages.
5.       Anti-virus software either is not working or showing all .exe files corrupted.

The Easiest Solution 

If you have got more than partition on your hard-disk and you know Windows Installation, then:

1.       Take Backup: Move your important data from Windows partition (usually c:\ drive) to other partition/s.
2.       Keep ready a recently downloaded Anti-Virus setup in CD/DVD or USB disk. Free or evaluation versions of Anti-Virus software such as AVG, Avast, Avira etc. are good. The only thing is that you should download a recent one, so that the Anti-Virus  can have updated AV-definitions. (This step should be done on a virus free computer)
3.       Insert Windows bootable CD/DVD and re-start the computer.
4.       Install the Windows in the same partition (C:\ drive). Do select FORMAT option while installing the Windows. Leave other partition/s un-changed.
5.       At first boot, before doing any activity, go to Start menu, click  Run and browse the executable (.exe) file of the Anti-virus setup. Install the Anti-Virus and scan the whole computer.

Note:  (a). Anti-virus software should be installed before doing any activity. ‘My computer’ also must not be clicked/opened before scanning whole computer through Anti-virus.

(b). You can also use command prompt instead of Run for installing Anti-Virus.

6.       The Anti-Virus may detect several .exe files as infected files. You must either remove all these files or send to virus-vault.
7.       You may need to restart the computer. Better to do a quick Anti-virus scan again.