C
Colin Basterfield
Hi,
has anyone (tried to) implement the Front Controller pattern as described at
http://msdn.microsoft.com/architecture/patterns/ImpFrontControllerInASP/
I'm having trouble resolving the controller.mapping section in the
web.config file, as it is used in UrlMap.cs and that is used by
RedirectingCommand.cs in the samples given in the article above.
Does anyone know how this bit is meant to work? The code I have compiled
fails because
private UrlMap map = UrlMap.SoleInstance;
and then
public void Execute(HttpContext context)
{
OnExecute(context);
String tempMap = map.Map[context.Request.Url.AbsolutePath];
String tempQuery = context.Request.Url.Query;
String url = String.Format("{0}?{1}", tempMap, tempQuery);
context.Server.Transfer(url);
}
doesn't work because it doesn't consider map of type UrlMap to be
instantiated...
Any help would be greatly appreciated
Cheers
Colin B
has anyone (tried to) implement the Front Controller pattern as described at
http://msdn.microsoft.com/architecture/patterns/ImpFrontControllerInASP/
I'm having trouble resolving the controller.mapping section in the
web.config file, as it is used in UrlMap.cs and that is used by
RedirectingCommand.cs in the samples given in the article above.
Does anyone know how this bit is meant to work? The code I have compiled
fails because
private UrlMap map = UrlMap.SoleInstance;
and then
public void Execute(HttpContext context)
{
OnExecute(context);
String tempMap = map.Map[context.Request.Url.AbsolutePath];
String tempQuery = context.Request.Url.Query;
String url = String.Format("{0}?{1}", tempMap, tempQuery);
context.Server.Transfer(url);
}
doesn't work because it doesn't consider map of type UrlMap to be
instantiated...
Any help would be greatly appreciated
Cheers
Colin B