Standalone sitelets?

25 views
Skip to first unread message

Eduard Sergeev

unread,
Jun 5, 2011, 5:00:27 AM6/5/11
to WebSharper
Hi,

I've just started playing with WebSharper 2.2 - mainly because of its
"sitelets" functionality.

A couple of questions:

1. Is it possible to compile a sitelet project in 2.2 into
"standalone" set of HTML+JS to be served from not-IIS container? This
http://t0yv0.blogspot.com/2011/01/websharper-sitelets-building-two-page.html
implies that it should be possible but it would be nice to see a real
working example.
2. If it isn't possible where can I find a detailed info on how to
serve sitelet from IIS? All the samples I found work fine from VS host
but how should I configure IIS to serve a sitelet (if I simply publish
WebApplication all the requests understandably bump into IIS
StaticFile handler).

Thanks!

Joel Björnson

unread,
Jun 5, 2011, 7:17:00 AM6/5/11
to websh...@googlegroups.com
Hi Eduard,
Using the HTML Sitelet VS template you'll find out how to compile a a
sitelet into a set of static HTML and JS files. Naturally you won't be
able to use server side features such as Rpc and session handing.

Currently the server side parts of sitelets are implemented on top of
ASP.NET. However, if we find enough demand for serving sitelets from
different environments this may very well change.

Let us know if you have further questions.

Joel

Adam Granicz

unread,
Jun 5, 2011, 2:00:58 PM6/5/11
to websh...@googlegroups.com
Hi Eduard,

1) This is what the "HTML Application" template is for - that's one of
the standard templates installed into Visual Studio.
2) By default, all WebSharper applications can be deployed under IIS.

Cheers,
Adam.

On Sun, Jun 5, 2011 at 11:00 AM, Eduard Sergeev
<eduard....@gmail.com> wrote:

--
Adam Granicz, IntelliFactory
www.intellifactory.com

Eduard Sergeev

unread,
Jun 6, 2011, 4:51:34 AM6/6/11
to WebSharper
Hi everyone,

Yes, I've somehow missed that HTML Sitelet template - and it is
exactly what I need.
As for the IIS hosting - it didn't work for me "out of the box" -
probably something is wrong with my IIS 7.5 configuration, but
nevermind - I'm happy with pure HTML Sitelets for now.

Thank you all for your help!

Eduard

Joel Björnson

unread,
Jun 8, 2011, 11:19:06 AM6/8/11
to websh...@googlegroups.com
Hi Eduard,
just out of curiosity - What kind of problems did you have with
deploying to IIS 7.5. We had some reports on failing deployments but
haven't been able to reproduce.

Thanks,
Joel

Eduard Sergeev

unread,
Jun 10, 2011, 8:31:44 AM6/10/11
to WebSharper
Hi Joel,

On Jun 9, 1:19 am, Joel Björnson <joel.bjorn...@gmail.com> wrote:
> just out of curiosity - What kind of problems did you have with
> deploying to IIS 7.5.

Well, as I said, when I simply publish default WebApplication to IIS,
"StaticFile" handler, (not
IntelliFactory.WebSharper.Sitelets.HttpModule) seems to be used to
handle requests (since they are not .aspx ones as I understand it).
Neither Classic nor Integrated mode work. I haven't touched IIS
configuration though (and I suspected that I had to, to make it
work..)

Regards,
Eduard

Joel Björnson

unread,
Jun 10, 2011, 10:47:59 AM6/10/11
to websh...@googlegroups.com
Hi,
If registered (in web.config), the sitelet HttpModule should be the
default handler. However, if it's unable to map an incoming request to
a sitelet content it will delegate the request to the default ASP.NET
handler.

Joel

Reply all
Reply to author
Forward
0 new messages