HeartattacK

Browse by Tags

All Tags » .NET (RSS)
Speaking at Microsoft Day @ Dhaka- June 20, 2009
It’s finally happening…we’re having an MS dev (and IT) event here in Dhaka, Bangladesh. This is the first one ever and marks a significant landmark for the software industry here. It’s going to be held on June 20, at IDB Bhaban Auditorium. You can find...
Finally Set Up My Own Site: BlogEngine.Net
Note: Cross posted from Heartysoft.com . Permalink In this article, I've looked at a few CMSes for my site. I've looked at Graffiti, Umbraco, Dnn, AxCMS and BlogEngine.Net. I've found the last one to fulfil most of my needs. This article explores how...
FileUpload Control Doesn’t Give Full Path….HELP!!!!
I’ve answered this question about five times in the last few days at the forums. It’s getting tedious so I thought I’d make a blog post about it. Issue: The FileUpload control has a FileName property. In FireFox (FF) and some other standards compliant...
Posted: May 20 2009, 03:44 AM by HeartattacK | with 13 comment(s)
Filed under: ,
How to Send Emails from .Net [example uses GMail SMTP]
We frequently see questions about sending emails using .Net in the asp.net forums. The process of sending mail is the same for Windows apps and asp.net websites as the same .Net classes are used. The process can be slightly shortened by specifying default...
Posted: Apr 28 2009, 12:10 PM by HeartattacK | with 3 comment(s)
Filed under: , ,
How to Read the HTML of a Web Page Programmatically
We might need to read the contents of some page (local or remote) by code. This is quite simple in .net. using System.Net; using System.IO; WebRequest req = WebRequest.Create(" http://www.asp.net"); WebResponse res = req.GetResponse(); StreamReader sr...
Posted: Nov 21 2008, 10:38 AM by HeartattacK | with no comments
Filed under: ,
WCF .svc Gives HTTP 404 on Host, Works Perfectly on Local
I was recently working on a project that used WCF web services extensively. Everything was ready for deployment, I deployed to the remote host, and voila – nothing works (nothing WCF related). After a LOT of frustration, I managed to make it work. I found...
Disable Caching in an HttpHandler
I was generating some custom reports in Word 2007 format today. The reports were being served by an HttpHandler and various params are passed to it (mostly by query string). One report needed a list of ids to be passed and the query string wasn't an option...
Posted: Sep 18 2008, 05:56 PM by HeartattacK | with 4 comment(s)
Filed under: ,
How to use Session values in an HttpHandler
When writing a custom HttpHandler, by default you have no access to the Session object. Doing something like HttpContext.Current.Session also returns null. The workaround is quite simple: Reference the System.Web.SessionState namespace: using System.Web...
Posted: Sep 18 2008, 03:30 PM by HeartattacK | with 13 comment(s)
Filed under: , ,
Memorystream Not Expandable: Invalid Operation Exception
There's a little gotcha with the MemoryStream class that I just found out. It has 7 constructors. The default constructor has the stream set as expandable, with an initial capacity of 0. The ctors that take the capacity set the capacity to the param,...
Posted: Aug 25 2008, 02:31 AM by HeartattacK | with 7 comment(s)
Filed under: , ,
.Net 3.5 SP1...finally
Fate has a weird sense of humour. I held out from installing .net 3.5 sp1 all through the CTPs, then beta 1 and beta 2. This is also the first time I restrained myself from installing new stuff (coz simply put, having to uninstall a bunch of betas and...
More Posts