Wednesday, July 28, 2010

Send Email in Asp.net .. System.Web.Mail

 We can easily sent emails from asp.net using Mail Message which comes under name-space System.Web.Mail.

The Code is as Follows...

Monday, July 26, 2010

C# code Protection Using .NET REACTOR

The assembly (.exe, .dll) etc we build using .Net Framework  can be decombiled using visual studio command Promt.  ildasm is the commad that we can use to open an assembly as Resource hacker is doing.

C:\Program Files\Microsoft Visual Studio 9.0\VC>ildasm

Saturday, July 24, 2010

Xml Creation and Reading that to DataSet

 Creating XML and Reading that is  very important when we come to Web-service, Serialization etc
Here i just give the basics of  creating and reading xml.

Friday, July 23, 2010

ASP.NET Viewstate MAC failed Error ... What is this?

    “Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.”

Monday, July 19, 2010

CAPTCHA generation in asp.net c#

CAPTCHA stands for "completely automated public Turing test to tell computers and humans apart." What it means is, a program that can tell humans from machines using some type of generated test. A test most people can easily pass but a computer program cannot. Mainly intended to reduce spam on our websites.

Sunday, July 18, 2010

CSV generator for asp.net c# without writing file in server...

Last topic (http://martinkabraham.blogspot.com/2010/07/csv-generator-for-aspnet-c.html) we see generating csv by saving that csv file to server folder that  need to set folder permissions (chmod(7,7,7)). Now lets see to generate csv without writing that to server.
Encoding.ASCII.GetBytes(CompleteCsv) will givbe the bye[] for the  Respose object to binary write.

Saturday, July 17, 2010

ASP .net PAGE CACHING and Substitution Control

Here we can have some basics about asp.net page caching. Think about a situations in which we are paging lakhs of data  in this case response each times goes to server and if the users are large in number that site goes to stuck definitely. It is worth to note that every post backed pages are in server memory and which are eating  server memory.  To over come this we use cache in asp.net pages.

Cache can be on same server or on another server. Cache have a duration and server will handle the post back only after the cache is expired. Till the page is in cache post back are not handled by the server.