Saturday, July 05, 2008

When trying to order pizza today, I get this error on the Pizza Hut web site. The site crashed when making my transaction , and I had to call the bank  to check if the transaction went through.

pizza-hut-error

Is it really that hard to show some care when  running a web site ? I mean, it doesn't take a lot to turn on  Custom Error pages on the web.config and turn off debug mode. Having this sort of error shown on a public web site that is getting a lot of traffic shows lack of care, lack of planning and un-professionalism by whoever built and runs this site. Expecting something to fail and handling the failure gracefully shows that the developer has planned for the unexpected. But not in this instance.  From this it is likely that the site owners didn't use some decent infrastructure to handle fail over, they didn't think of what could go wrong. I was still getting this for about an hour means that they don't have anyway of getting notified to fix it. 99% uptime ? Nah, not for us.

Would I trust my credit card details with them again ? Nope..

Maybe it was because they used business objects written by Van Halen.

Saturday, July 05, 2008 3:09:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Saturday, June 07, 2008

 a distributed cache solution for ASP .Net, and its from MS at last. About time there was a solution to the age old problem of session state and scalability. Its in CTP right now, and looking forward to having this in a standard .net distribution.

Saturday, June 07, 2008 2:27:42 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, March 01, 2008

VS 2008 throws a COM Exception when loading a web application project. This happens when the project was made in VS 2005 and upgraded using the Upgrade Wizard. It loads web application projects made natively without a problem. There is a work around if this happens to you.

Via http://www.codeattest.com/blogs/martin/2008/01/comexception-loading-solution.html

"In order to load the Web Application Project you must make sure that the URL that the project is using, is valid and can be resolved. This can happen pretty often since when you download a project from source control for the first time, it is highly unlikely that you will have the web site already set up."

 

If this happens to you, the project will not load and will be grayed out in the solution explorer. Right click and edit the project, (or edit the .csproj file in notepad) look for the WebProjectProperties element. Check if the IISUrl child element points to a valid location. The server should exists, and the virtual directory should point to the same location as the web application project.

Saturday, March 01, 2008 1:17:44 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Thursday, January 24, 2008

Many web applications have a back end "admin" pages to manage tables in the database.  These pages exist solely to perform CRUD operations against a single table. Sometimes with a bit of validation.

It is tedious work if you have to create and write the same code  for each table and to maintain them. To make this task somewhat easier, there are solutions that look at the database structure, and generate the data access code and the asp.net pages.

The latest and greatest of them is ASP .Net Dynamic data. This uses LINQ to SQL for data access. Its quite easy to get a site up and running using this.

Mono Rail has an ActiveRecord scaffold.  This uses Castle ActiveRecord and Nhibernate to generate the scaffold. However, this doesn't generate the database to object model mapping automatically.  Classes that inherent from an ActiveRecord base have to be created first. Fields and relationships have to be defined in code. When this is done its all a breeze. Its a good way to get to grips with MonoRail.

 

Subsonic which I'm using on a project now, has two methods of operation. It has a set of scaffold controls which you can use on any asp.net pages to get CRUD functionality, and it also has the option to generate the asp.net pages and the data classes. The data classes generated by subsonic use the active record pattern too. The code generated by subsonic can be modified if you need to do so. After the code is generated these are normal asp.net pages to which you can add validation, combine with master pages etc..

Subsonic and Asp.Net dynamic data offer the quickest way to get up and running.  Subsonic and MonoRail offer the possibility to extend the application when things get more complex. The data classes generated can be reused when the application grows beyond a simple prototype or admin section.

Thursday, January 24, 2008 9:53:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Thursday, November 08, 2007

DevConnections - The ASP.NET MVC Framework

ASP .Net MVC != Web Forms 4.0

"One important point I kept stressing in the talk was that this is designed to be compatible with the ASP.NET subsystems you already use. That means Session, Cache, Personalization, Roles, Membership, etc, still work and are there to be used and abused. This framework, in the namespace System.Web.Mvc, is an alternate architecture, but not "an entirely new parallel ASP.NET," no more than any of the other home-grown or open source MVC/MVP frameworks that are out there"

Thursday, November 08, 2007 11:41:40 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, July 24, 2007

Going through my RSS reader today and catching up ..

http://blogs.iis.net/bills/archive/2007/05/07/iis-vs-apache.aspx

Tuesday, July 24, 2007 2:52:52 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Nikhil K has released a development framework for creating Facebook applications with ASP .Net.

http://www.nikhilk.net/Entry.aspx?id=167

There is also this

http://www.codeplex.com/FacebookToolkit

Tuesday, July 24, 2007 10:49:36 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, May 29, 2007
Tuesday, May 29, 2007 10:17:18 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, April 03, 2007

Scott blogs about the new features in IIS 7.0 server version coming out later this year. One set of features that I think is really really amazing :

"The web farm support in particular is really cool, and will allow you to deploy your web applications on a file-share that contains all of the code, configuration, content, and encryption keys needed to run a server.  You can then add any number of stateless and configuration-less web-servers into a web farm and just point them at the file-server to dynamically load their configuration settings (including bindings, virtual directories, app pool settings, etc) and application content.  This makes it trivial to scale out applications across machines, and avoid having to use replication schemes for configuration and application deployment (just copy over the files on the file-share and all of the machines in the web farm will immediately pick up the changes). "

I already use source control to deploy files to the web farm so replication is not a big issue, but it is a pain to configure sites for the first time on each server.

More on this

Tuesday, April 03, 2007 9:15:55 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, January 16, 2007

I have situations where I need the domain name and the application path of the current page (request ).

if the current request was http://www.myserver.com/website1/page.aspx

I need http://www.myserver.com/website1. Though the web.config can store this setting, I don't want to change the config each time I move the site between servers.

So here is a little function I wrote.

Request.Url.AbsoluteUri   gives http://www.myserver.com/website1/page.aspx

Request.ApplicationPath gives /website1/. Subtract page.aspx from http://www.myserver.com/website1/page.aspx

 

public static string GetSiteUrl() {

if (HttpContext.Current.Request.ApplicationPath == "/") {
     return "/"
}

          string url = HttpContext.Current.Request.Url.AbsoluteUri;
            int end = url.IndexOf(HttpContext.Current.Request.ApplicationPath) +
                  HttpContext.Current.Request.ApplicationPath.Length;
            url = url.Substring(0, end);
            return url;
        }

 
Tuesday, January 16, 2007 11:17:33 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, January 13, 2007

Have you checked out the speakers list ? http://www.webdd.org.uk/Speakers.aspx. Do not miss this if you are a serious web dev.

del.icio.us tags:
Saturday, January 13, 2007 8:33:56 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

During the past couple of weeks I've been evaluating content management systems. My core requirements were;

1. Built with C#, .Net 2.0

2. Modular structure like SharePoint.

3. Granular permissions. Page and section level.

4. CSS and XHTML support.

I started building one from scratch; I wanted the CMS to leverage all the features of ASP .Net 2.0, such as master pages, membership and themes. The open source solutions didn’t impress me much. Dotnetnuke did not have a lot of flexibility (for me). I didn’t spend too much time with DNN because it was written in VB .Net.

While I was building my CMS, I found Sitefinity built by Telerik. Sitefinity is a pure .Net 2.0 solution. Written in C# and a killer feature is that it comes with the Telerik rad controls. The upcoming 3.0 version uses master pages for layout. The CMS engine detects the placeholder controls and uses them as containers for CMS driven content.

Extending Sitefinity is as easy as opening the generated website in Visual Studio as a web project. The experience is analogous to a situation where someone had already written the core CMS and given the project to extend. Sitefinity host simple ASP .Net controls. So developing a solution is the same as any other ASP .Net project. This is a big advantage for me, as I don’t have to go and learn a new framework. Sitefinity uses the native ASP .Net provider model. This makes Sitefinity come close to SharePoint 2007. This all applies to v3.0; the previous version 2.7 does not use master pages and recursive table layout model, which did not support CSS layouts. Version 3.0 is in beta, with the final release in February.

So if you are developing content management systems, Sitefinity definitely should be on top of your list.

PS : This is not a free solution, but well worth the money it in my opinion. Telerik should be banging the drum on this one :).

PPS : I don't work for Telerik, though my company has purchased an enterprise licence.

Saturday, January 13, 2007 8:23:51 PM (GMT Standard Time, UTC+00:00)  #    Comments [3]  | 
 Sunday, December 03, 2006

Wrote a CSS Adapter for the SiteMapPath control. I wanted a breadcrumb trail with clean link tags only. Renders a clean set of link tags within a div tag (and optionally a span tag).

Usage:

Add the SiteMapPathAdapter.cs file to your web project. (rename the .txt file to .cs)

Add a .browser file to the web site. Add the following entry in the controlAdapters element.

 <adapter controlType ="System.Web.UI.WebControls.SiteMapPath"
               adapterType ="SiteMapPathAdapter" />

 

Drag and drop the control on to the web form

<asp:SiteMapPath ID="SiteMapPath1" runat="server" CssSelectorId="breadcrumbs" >
        </asp:SiteMapPath>

Use the CssSelectorId attribute to give the surrounding div an identifier.

More on CSS Adapters

CSS Control Adapter Toolkit for ASP.NET 2.0

Architectural Overview of Adaptive Control Behavior

Browser Definition file schema

Sunday, December 03, 2006 11:42:43 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Sunday, November 26, 2006

If you ever wanted to add a simple username/password authentication to your web service, but ended up with a whole lot of this ?

[WebMethod]
public string HelloWorld(string userName,string password)

Well then, here is a much cleaner way. You can use SOAP headers to pass extra information to a web service. This method uses SOAP headers to pass the user credentials to the web service.

The web service.

We need an object to hold the user credentials. For this example a simple class with username and password properties would suffice. The class should derive from the SoapHeader class.

public class Authentication:SoapHeader
{
    private string _userName;
    private string _password;
	
    public string Password
    {
        get { return _password; }
        set { _password = value; }
    }

    public string UserName
    {
        get { return _userName; }
        set { _userName = value; }
    }
}

In the web service class, declare a public field (or property) of the Authentication type.

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1,Name="MyWebService")]
public class MyWebService : System.Web.Services.WebService {
    public Authentication ServiceCredentials;

In the next step, set up the web method to accept a SOAP header, of the type Authentication, and assign the value to the ServiceCredentials member.

    [WebMethod]
    [SoapDocumentMethod(Binding="MyWebService")]
    [SoapHeader("ServiceCredentials") ]
    public string HelloWorld() {
        if (ServiceCredentials.UserName == "test" && 
ServiceCredentials.Password == "world") { return "Hello World"; } else { return "Invalid authentication"; } }

 At the client.

  1. Add the web service reference as usual. Instantiate a new object of the type MyWebService.
  2. In addition instantiate a new object of the type Authentication and assign the username and password properties.
  3. Next, assign this to the Service credentials property of the MyWebService instance.
  4. Call any web method, as you like.

The credentials are being passed with the soap headers, so you don't need to add the username/password to each and every method. Since, this is done once for the web service, it can be used for multiple calls to any web method in the same service.

This is how the SOAP XML looks like,

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <Authentication xmlns="http://tempuri.org/"> <Password>string</Password> <UserName>string</UserName> </Authentication> </soap:Header> <soap:Body> <HelloWorld xmlns="http://tempuri.org/" /> </soap:Body> </soap:Envelope>
Sunday, November 26, 2006 11:59:53 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, November 25, 2006

The Object Data Source (ODS) helps you expose your business objects, to provide data to databound controls such as the GridView, DetailsView and many other data bound controls.

Compared to the other data sources like the DataTable and DataSet, the ODS does require some work to achieve the same functionality. The main advantage of the ODS is that it allows you to maintain your layers, without polluting your presentation layer with data code.

To start off,  drag and drop the ODS control to a web form. Set the TypeName property to the business object you want to work with. For example, if we have a BO named Employees in the TimeTracker namespace, this will be TimeTracker.Employee.

Selecting
 A common scenario is to display the a list of records. Say we want to display the list of all employees in a GridView. To retrieve the records, the Employee object needs a GetEmployees static method that will retrieve  all the employees from the DB.  Set the SelectMethod property of the ODS to GetEmployees. Now bind the ODS to the GridView just like any other data source.

At runtime the ODS uses reflection to find the GetEmployees method and invokes it.

Paging and filtering

Filtering Employee objects is as easy as adding a new method to your Employee object. If we want to select Employees by department, the Employee object should have a static method

GetEmployees(string department)

In the properties window of the ODS, add the department parameter to the SelectParameters collection. You can set a default value to it, and this is where things get real easy. You can bind the parameter to a control on your web form ( like a DropDownList) , a Session variable and even a query string parameter.  Adding  filtering functionality is simple as that. You can do the same programmatically by adding Parameters to the SelectParameters collection. Be sure to clear the collection before you add a parameter( or check if the parameter exists).

Paging is where working with the ODS gets a bit complicated. To enable paging ( in conjunction with the GridView) set the EnablePaging property to true. The Employee object too, needs to have methods to support paging.

When paging is enabled, the ODS calls the GetEmployee method with two extra parameters. by default the parameters are startRowIndex and maximumRows. These can be changed by setting the StartRowIndexParameterName and MaximumRowsParameterName properties.

Now we need a GetEmployees method with the signature like
GetEmployees(int startRowIndex,int maxiumRows)
To support filtering it will have to be GetEmployees(string department ,int startRowIndex,int maxiumRows)

The maximumRows parameter, will have the value of how many rows to display per page. This will have the value of the PageSize property of the GridView. The startRowIndex will contain the the index of the current page. This can be the starting row index of the current page of records. See here for more on how to pass these on to an SQL query.

In addition to this the ODS needs another method that is set by the SelectCountMethod property. This is invoked to find out the total number of rows available. So we need another static method in our Employee object. GetEmployeesCount() .If the total number of rows is 100, and you have a page size of 20. The GetEmployees count method should return 100, so that the ODS can tell the GridView, how many pager links to display. I usually return this as an out parameter from the stored procedure that retrieves the paged results.

Inserting, Editing and Deleting

Inserting, editing and deleting is pretty easy. All you will again is to have the appropriate static methods in the Employee object.
AddEmployee(Employee e)
UpdateEmployee(Employee e)
DeleteEmployee(Emplyee e).

Set the InsertMethod , UpdateMethod and DeleteMethod properties accordingly. All these method can be configured with parameters like the SelectMethod. However, setting the DataObjectTypeName property to the Employee object will reduce a lot of the hassle by passing Employee objects to the Add,Update and DeleteMethods.

Saturday, November 25, 2006 1:33:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, October 07, 2006

 

A few issues to keep in mind when converting a VS 2005 web project to a Web Application project.

http://webproject.scottgu.com/CSharp/Migration2/Mi...

ASP .Net automatically generates a strongly typed Profile class when using Profile Personalization (System.Web.Profiles). This does not happen when using WAP (Web application projects).

There is a free utility to generate the Profile class from the web.config

http://www.gotdotnet.com/workspaces/workspace.aspx...

The default SqlProfilesProvider works by serializing all the profile properties into one column. However, as with all providers this can be changed.

http://www.asp.net/downloads/teamprojects/default.... is a download to a Table profile provider and stored procedure profile provider. These work out of the box, to a profiles table of your own choosing.

Saturday, October 07, 2006 8:46:03 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, September 23, 2006

I was looking into ASP.Net Webparts last week. Here are a few helpful resources.

Sahil Malik introduces Webparts by conducing a walkthrough of creating a qucik and not so dirty CMS (content management system) link 

A good introduction into writing custom editors for web parts by the same author.

A MSDN article giving an overview of the whole framework.

Saturday, September 23, 2006 4:13:58 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, August 15, 2006
Monday, August 14, 2006 11:15:23 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, June 02, 2006

If  you want a FTP login to change to a directory upon login heres what to do.

Create a vritual directory or directory with the same name as the user login

If the user login is john, create a directory under the FTP root named "john". On logging in john will access ftp:///ftp.myserver.com/john.

 

 

Friday, June 02, 2006 3:45:18 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Sunday, February 05, 2006

 http://www.urlrewriting.net/ has a free URL re-writing HTTP module for ASP .Net with source code. This supports regular expressions. This is a must have for every ASP .Net developer. I haven't compared this to the Apache mod_rewrite module yet, which I would say is very powerful.

My view is that URL rewriting is best implemented in the web server (IIS), just like the implementation in Apache. This would give URL rewriting functionality regardless of the file type served. I have yet to see a (free ? ) URL rewriting module for IIS, that gives all the features of Apache mod_rewrite.

Will we see this in IIS 7 ?

Sunday, February 05, 2006 6:38:02 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, November 11, 2005

For all of you ( like me) who were frustrated a bit with the new web project system in VS 2005, this add-in resolves some of those issues.

This uses creates a Msbuild  file to give more fliexibility with deploying web projects.

Single assembly for the whole app, with a name of your choice, versioning, assemblies for each directory. Anyways, much more control over the build process.

http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx

Friday, November 11, 2005 10:19:46 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Monday, October 31, 2005

When going through the asp.net forums, one thing I've noticed is that there is a lack of understanding among many devs about ASP .Net caching. The majority of the problems are caused when trying to use the Cache as a reliable in-memory storage medium. The Cache object is not meant to do this.

Cache storage is volatile, It can be garbage collected, it can expire, and it is not expected to be synched in a web farm.

So far I've used the Cache to avoid expensive db hits. I use a refactoring approach to storing data in the Cache.

First I write my usual data access and data binding code with,

   Datatable userDataTable;
   userDataTable = DataUtils.GetUsers();
   //bind and display

 

Now to cache the user date, I refactor the code to this,

DataTable userDataTable;
userData = Cache["USER_DATA"];
if(userData == null){
	userDataTable = DataUtils.GetUsers();
	//code to refresh cache, insert etc...
	Cache.Insert("USER_DATA",userDataTable);

}

//bind and display
 
This simple practice ensures that there is always data, and handles a cache miss gracefully. Any thoughts on this ?
Monday, October 31, 2005 8:58:47 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, October 08, 2005

In VS 2003/ASP .Net 1.1 , global resource files (.resx files used by the whole application) compile to thier own assemblies like, assemblyname.resources.dll.

In VS 2005/ASP .Net 2.0 these global resources are kept in the App_GlobalResources directory, and do not compile to individual assemblies. Because of this using the ResourceManager constructor to load the resource assembly does not work in ASP .Net 2.0 because a resource assembly does not exist. .Net 2.0 adds these global resources to their own namespace, and does some runtime magic to load the correct resources.

For example in 2.0, if you have a resource file named myresources.resx, the resource manager object is obtained by

  1 Resources.myresources.ResourceManager

This applies to ASP .Net web applications only, the ResourceManager works in the old way in class library project and WinForm apps.

read more here

I'm doing all this on the RTM version of VS 2005, and its looking very good :)

Saturday, October 08, 2005 8:33:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, September 30, 2005

Mainsoft has a free developer edition of their Visual Mainwin product. This integrates with VS 2003, and compiles .net code into Java classes, which can then be deployed on J2EE app servers. This is pretty neat, I can deploy the web application on IIS and on a J2EE appserver. The installation comes with Tomcat.

Porting a .Net app to J2EE is simple, just right click on the project in VS 2003, and selecte Generate J2EE project. This adds a new project to the solution, but the source files can only be changed in the original  project. Building the solution compiles the .net app, and the J2EE project. This also creates the neccessary deployment descriptors for Java. This also creates a complete package to deploy on a remote app server.

VB.Net 2003 is a pre-requisite for Visual Mainwin, but they plan on removing this dependancy in future versions. One thing to watch out is that, the source files of all the projects and the projects they refer to is needed.

For example, in your web application if you add a reference to a component, the J2EE project will not compile because it cannot generate the java libraries for the component. So there should be an equivalent java library (jar file) or the source code should be there to create it.

I've so far done some simple web applications with it, and it works well.

Now because.Net apps can be deployed on other platforms, here is an article on best practices

http://linux.sys-con.com/read/117910.htm

Friday, September 30, 2005 9:40:01 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Monday, August 22, 2005

A detailed post explaining the new web project system by Scott Guthrie. The features are interesting, but not implemented in Beta 2 or are buggy. MS expects all of this to be in the final release.

To summarise,

No need for Frontpage server extensions on the server or development machine. Just install VS 2005 and you are good to go. No need for IIS too. This is good cos now it would be possible to test web apps using Apache and the mod_dotnet module.

There is no web project file. The project infers the contents from the file system. With this there would be no more mapping a IIS virtual directory for a web project. Very useful when you want someone else to open your web project.

There is a "hit refresh to compile" feature. Say you make a change to a page or a code behind file, now just refresh the page for it to compile.

Anyways thats just a lil bit of what interests me. The has been quite a bit of confusion regarding the new web project system, and this post clears some of that. However, I'll have to wait and see how this all works in the Final version.

 

Monday, August 22, 2005 9:55:29 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Sunday, August 21, 2005

Presentations from Tech ED introducing the new features of ASP .Net 2.0

Download them here.

A collection of HOW TO's from Brain Goldfarb.

ASP.NET 2.0

Authentication and Authorization

Code Access Security (.NET Framework 1.1)

Communications Security

Configuration

Cryptography

Sunday, August 21, 2005 4:28:45 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, August 20, 2005

new blog version , new look and feel..

let me know what you think...

Saturday, August 20, 2005 9:34:40 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Saturday, August 13, 2005

Finally got Dasblog to build under .Net 2.0. I got an update to the migration wizard from http://weblogs.asp.net/scottgu/archive/2005/08/07/421827.aspx (Thanks Chris). There were 2 snags in the migration. The dasblog.web project was not converted because there wasn't a IIS virtual directory for it, I created a virtual directory and reloaded the project. VS 2005 then converted the project. However it missed one file 'Activity.aspx'. I had to change the codebehind attribute to codefile and the class declaration to a public partial. After this the project compiled, but still will not run. A resource assembly seems to be missing. I'll have to hunt this issue later. Atleast I got to the point where the site runs and gives me a stack trace. The web site does not work under IIS and only on the development webserver.

fyi I'm converting dasblog 1.6.4121.1.

If anyone has any .Net 1.1 to .Net 2.0 conversion stories,tips,tricks and gotchas to share.. please let me know. As I posted earlier I was able to convert a 1.1 Winforms project with no problems, and this was under the Express edition.

anyways more on this later...

Saturday, August 13, 2005 2:59:09 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Thursday, August 11, 2005

As posted earlier I'm trying to migrate Dasblog from 1.1 to 2.0. Visual studio refused to compile aspx pages in the dasblog webproject after the conversion. The aspx pages did not see the custom controls the custom controls that were used by the pages and the compiler was throwing missing reference errrors. The controls themselves did not have any errors and compiled individually but will not show up in Intellisense and the class viewer. None of the pages showed up in the class viewer. I even tried adding a new page, but still no luck.

Googling for this got me here http://west-wind.com/weblog/posts/2130.aspx. Well atleast I'm not alone in this. The reason for this seems to be partial classes. Now partial classes are combined to a complete class at compile time and for some reason these complete classes made of partial classes are not visible at design time. I'm using the February 2005 CTP release of Visual Studio 2005. I dont have a solution yet..so I've paused this conversion project for now. I'll try it again when I get the June 2005 release or the final.

If any of you have had this problem and solved it please let me know...

Thursday, August 11, 2005 7:42:38 PM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 
 Monday, July 25, 2005

Got this article on Unicode via freelancers.net

http://www.joelonsoftware.com/articles/Unicode.html. A good intro to the workings of Unicode and why it is so

Monday, July 25, 2005 7:22:32 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, July 23, 2005

Funny presentation by Rich Bowen http://people.apache.org/~rbowen/presentations/apacheconEU2005/hate_apache.pdf

On the same topic is there a GUI administration tool for Apache on Windows ?

I'm looking for information on how Apache for Windows compares to IIS. Since Apache Win32 can be used with .Net, how many of you will use it in a production environment ? Since any Windows Server comes with IIS anyway my opinion is that this is not a very useful combination, other than to use it for testing on a development machine. IIS 6.0 has given good a performance in my experience, but I havn't compared it against Apache Win32. IIS 6 would have the upper hand since the HTTP processing is integrated into the kernel.

Saturday, July 23, 2005 8:17:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, July 08, 2005

I'm looking at two browser based HTML editors. I've shortlisted my choices to two TinyMCE http://tinymce.moxiecode.com/ and FCKEditor http://www.fckeditor.net/. Both are F/OSS and TinyMCE is used on Mambo. It is quite customisable but I still have to figure out  how to fit in my own custom image filemanager. FCKEditor comes with a filemanager, but does not have the feature to disable buttons on the editor. This is because I wont need all the features (may confuse users). If I'm able to do a file manager for TinyMCE, I'll use it.

On the same topic, PostXING is what I've been using to post entries on here and very happy with it. Very stable and has good editing features. Now only if they would add a spell checker.

 

Friday, July 08, 2005 8:37:19 PM (GMT Standard Time, UTC+00:00)  #    Comments [2]  | 
 Monday, July 04, 2005

Was searching  for Web Accessibility info and got this site http://www.ua-wg.org/articles/
From reading all of this, it is not hard to create accessible websites, all that is needed is the mindset and sticking to a few simple rules. The side effects from building an accessible website is that the site's usability is increased. This makes it easier for normal people to use the site. The articles also suggests that accessibility improves search engine rankings. This makes sense because if the structure and content of the site are cleanly separated it will be easy for a search engine bot to crawl through the site. It also makes the site easier to view from other devices such as phones and PDAs.

I also learnt about the label tag for the first time. Using the<label> tag tolabel form elements will set the focus to the form element when the label text is clicked. Why go through complex tables and css when there is a simple set of tags to group related form elements, just like the group box control in Windows Forms. This also shows a simple way to group items within a dropdown box.

This site conforms to Priority 1 of the WAI guidelines, but with many warnings. There is an automated testing tool at http://webxact.watchfire.com/. From the errors given, it doesn't seem much work to make this site conform to all 3 checkpoints. To conform with the UK Disability Discrimination Act (DDA) a website will have to conform to Priority 1 and Priority 2 of the WAI guidelines.

Monday, July 04, 2005 2:26:06 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, June 24, 2005

fine tune website performance, see what the browser is doing. Handcraft http requests etc..

this beats using ethereal to do the same..

http://msdn.microsoft.com/ie/default.aspx?pull=/library/en-us/dnwebgen/html/ie_introfiddler2.asp

Downlod from http://www.fiddlertool.com/fiddler/

Friday, June 24, 2005 8:46:23 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Friday, June 17, 2005

I'm evaluating PHP versus .Net for an application I have to build. One factor that favours PHP is hosting costs. LAMP hosting is much cheaper than .Net hosting. PHP gives most of the functionality that .Net can give, more like classic ASP so the higher cost of .Net hosting cannot be justified. So I'm learning PHP and MySQL. I'm pretty good with Linux but never tried any development on it.. so here goes. I'm planning on using Apache mod_rewrite, there is an IIS equivalent but not so powerful as mod_rewrite. If I had done this in .Net, I'd have to write it as an http handler. I might do this later but its nice to have this as part of the web server. A few regular expressions is all it takes.

Friday, June 17, 2005 8:24:41 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Thursday, June 16, 2005

Two good articles on using the new features in ASP. Net 2.0

http://msdn.microsoft.com/msdnmag/issues/05/02/WickedCode/

http://msdn.microsoft.com/msdnmag/issues/05/06/WickedCode/default.aspx

I like the script call back feature using XML-HTTP. This can replace a Java Applet I built sometime back.

Its good to see that some of the code I've written using the 1.1 runtime be part of the base class library. This would make development so much faster.

On the other hand are Java Applets still relevant ? The use of JavaScript and XML-HTTP is increasing. Combine that with the wonderful interfaces Flash can produce and you have the capability to deploy very light weight web based apps.

Thursday, June 16, 2005 8:37:09 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Tuesday, April 26, 2005

From http://support.microsoft.com/default.aspx?scid=kb;en-us;257591

 

SUMMARY

The Secure Sockets Layer (SSL) protocol uses a combination of public-key and symmetric-key encryption. Symmetric-key encryption is much faster than public-key encryption; however, public-key encryption provides better authentication techniques. An SSL session always begins with an exchange of messages called the SSL handshake. The handshake allows the server to authenticate itself to the client by using public-key techniques, and then allows the client and the server to cooperate in the creation of symmetric keys used for rapid encryption, decryption, and tamper detection during the session that follows. Optionally, the handshake also allows the client to authenticate itself to the server.

MORE INFORMATION

The steps involved in the SSL handshake are as follows (note that the following steps assume the use of the cipher suites listed in Cipher Suites with RSA Key Exchange: Triple DES, RC4, RC2, DES):
1. The client sends the server the client's SSL version number, cipher settings, session-specific data, and other information that the server needs to communicate with the client using SSL.
2. The server sends the client the server's SSL version number, cipher settings, session-specific data, and other information that the client needs to communicate with the server over SSL. The server also sends its own certificate, and if the client is requesting a server resource that requires client authentication, the server requests the client's certificate.
3. The client uses the information sent by the server to authenticate the server (see Server Authentication for details). If the server cannot be authenticated, the user is warned of the problem and informed that an encrypted and authenticated connection cannot be established. If the server can be successfully authenticated, the client proceeds to step 4.
4. Using all data generated in the handshake thus far, the client (with the cooperation of the server, depending on the cipher being used) creates the pre-master secret for the session, encrypts it with the server's public key (obtained from the server's certificate, sent in step 2), and then sends the encrypted pre-master secret to the server.
5. If the server has requested client authentication (an optional step in the handshake), the client also signs another piece of data that is unique to this handshake and known by both the client and server. In this case, the client sends both the signed data and the client's own certificate to the server along with the encrypted pre-master secret.
6. If the server has requested client authentication, the server attempts to authenticate the client (see Client Authentication for details). If the client cannot be authenticated, the session ends. If the client can be successfully authenticated, the server uses its private key to decrypt the pre-master secret, and then performs a series of steps (which the client also performs, starting from the same pre-master secret) to generate the master secret.
7. Both the client and the server use the master secret to generate the session keys, which are symmetric keys used to encrypt and decrypt information exchanged during the SSL session and to verify its integrity (that is, to detect any changes in the data between the time it was sent and the time it is received over the SSL connection).
8. The client sends a message to the server informing it that future messages from the client will be encrypted with the session key. It then sends a separate (encrypted) message indicating that the client portion of the handshake is finished.
9. The server sends a message to the client informing it that future messages from the server will be encrypted with the session key. It then sends a separate (encrypted) message indicating that the server portion of the handshake is finished.
10. The SSL handshake is now complete and the session begins. The client and the server use the session keys to encrypt and decrypt the data they send to each other and to validate its integrity.
11. This is the normal operation condition of the secure channel. At any time, due to internal or external stimulus (either automation or user intervention), either side may renegotiate the connection, in which case, the process repeats itself.
Tuesday, April 26, 2005 9:48:45 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
 Saturday, April 16, 2005

Been waiting for this for a while. Didn't notice it when it was released.

http://httpd.apache.org/cli/

This works only for the 1.1 version of the .Net runtime

Free webserver

Free runtime

not so free OS, this is for windows only. If you want to run ASP .net on linux or other platforms check out mono

Saturday, April 16, 2005 5:14:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |