> (1) Not necessary to take so much care about Http Context (create a
> property, set as parameter). It's always available by
> HttpContext.Current.
The Context idea's based on how most other (monorail, aspx,
asp.net
mvc) views work. The almost always have Context/Request/Response
instance variables. Plus I wanted to provide an example of where you
could initialize the view after it's created and the context is about
the only thing meaningful at the time.
Although now that you mention it I guess the view could also be given
a reference to the handler that was executing...
> (2) I got an error for missed semicolon in Default.aspx, and even
> putting it there I got an exception of incorrect character (UTF-8
> encoding problem). So, I'd better suggest to put 2 lines to
> Global.asax.cs
That's odd... I didn't see that problem but it might be from using the
development server instead of iis. But rewriting instead of
redirecting does let you keep a clean "/" url on the browser though,
so that's a good idea
> And my bigger concern: I think very inconvenient to update
> AllKnownDescriptors() manually. Are there any contra's for collecting
> paths and names of all .spark files under viewsLocation and adding
> them to descriptors directly in PostBuildStep.cs ?
No problem at all if that's a rule that works in your app. Something
that could be a problem is if someone had different master files for
different views, or needed a decoration-less master for some ajax
views. For the sample I wanted to show how you could provide
descriptors explicitly.
On Aug 30, 12:22 am, "Igor Loginov (aka ilog2000)"
<
ilog2...@gmail.com> wrote:
> Louis, thank you so much! From my prospective it's a really good
> progress.
>
> As soon as I've learnt DirectUsage --> MediumTrustHosting sample
> almost by heart, let me make several notes about it.
>
> Two minor things first:
>
> protected void Application_BeginRequest(object sender, EventArgs e)
> {
> string url =
> Request.AppRelativeCurrentExecutionFilePath.Replace(".aspx", ".ashx");
> Context.RewritePath(url);
>
> }
>
> having mapped all .aspx to .ashx (and using Default.ashx as landing
> page)...
>
> And my bigger concern: I think very inconvenient to update
> AllKnownDescriptors() manually. Are there any contra's for collecting
> paths and names of all .spark files under viewsLocation and adding
> them to descriptors directly in PostBuildStep.cs ?
>
> On Aug 29, 8:09 am, Louis DeJardin <
Louis.DeJar...@gmail.com> wrote:
>
> > Ah - I didn't include a link...
>
> >
http://dev.dejardin.org/downloadormore specificallyhttp://
dev.dejardin.org/sites/default/files/Spark.release.20080829.zip