It works fine for me in Web Developer 2005 Express Edition, here is my code:
public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
Aspose.iCalendar.License l = new Aspose.iCalendar.License();
Maybe this article is applicable:
I hope you are not trying to put C# code straight into .aspx file like discussed in the above link. As they say, C# code can only be executed in methods.