Welcome to weblogs.com.pk Sign in | Join | Help

Cassini :: Rich Reporting Emails

Developer” has written a post on how useful Microsoft’s Cassini is. It’s a light weight engine to host ASP.NET applications; no need of IIS; embed ASP.NET application in your application transparently; or use it as a stand alone web server having .NET hosting features. Few months back; I implemented a cool application using it. Just wanted to share the idea with you guys here..

Imagine a service or a console application; that sends a rich email; having data being populated from some data source. Earlier writing such application you had to write some non maintainable code having all those weird HTML tags along with the data values to generate the message body and then send that string as a rich email using some library. Well; here is a modern approach…Write a simple ASPX page; having business logic in code behind or some library; enjoy the separation between design and code that ASP.NET provides. Host this ASPX page into Cassini in runtime; get the response using WebRequest class from the base class library and then simply send that response as a rich email.

Published Tuesday, October 18, 2005 4:59 PM by khurram
Filed under: ,

Comments

# re: Cassini :: Rich Reporting Emails

Tuesday, October 18, 2005 6:59 PM by developer
I wonder why to host this ASPX into Cassini?
What if we host data-and-graphics-driven ASPX page into IIS and then using WebRequest extract all the generated html and supply it as a string to send rich email.
Frankly speaking genrating rich email newsletters have been a problem for me for long. Although i've developed a lot of techniques for this issue but still i couldn't develope a *prefect* server control for sending rich emails. If you have something to share for this i would be more than appriciative.
I remember i developed a web app for a video (rental) shop . When i deployed the solution the shop owner request me to give him a Windows app instead of Web app. Then i develope a simple win form with IE COM component and hosted all the web pages in it using Cassini. The final result was awesome. It was a Window application but with flash movies and colorfull graphics. Since then i never develop any pure Win form application. Whenever i was given the task to develope a window app i simply design and develope web pages and finally hosted them in IE COM component with Cassini. And now with the advent of 2.0 Microsoft released a pure .net assembly for rendering HTML tags, means no need to host IE COM in .net app. I'm sure developing web user interfaces are far more easier and interesting than any other.

# re: Cassini :: Rich Reporting Emails

Tuesday, October 18, 2005 8:00 PM by Khurram
As it was a Windows Service; I didnt wanted to have a dependency on IIS. And at the same time I wanted to have the seperation ASPX provide.

# re: Cassini :: Rich Reporting Emails

Monday, October 31, 2005 9:06 AM by Khurram
Last friday I used Cassini to generate MRTG's CFG files. I helped my network team and made them a small utility that generate configuration files for a popular graphing tool.
New Comments to this post are disabled