Monday, January 17, 2011 strongly typed view and virtual path provider

Use Case

Have custom system inspired by VirtualPathProvider samples from MSDN. Need ability to use strongly typed views.


In the case of using generic views (not-strongly types), everything works fine. The problem appears when I'm trying to use strongly-typed view as shown below:

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Abc.Xyz.MyClass>" %>

The problem is obvious and well-known, if Views/ folder miss web.config file, mvc application can't load the view. In Virtual Path Provider solution is more tricky. The quickest solution (for me) was to add content of web.config file that must reside in views folder directly to main web.config file in separate location.

For example, if you have your VPP accepting smth like "~/page/xxx", the problem is easily solved by adding following snippet to your web.config


  <!-- Important change for virtual pages -->
  <location path="page">
        <add path="*" verb="*"

        Enabling request validation in view pages would cause validation to occur
        after the input has already been processed by the controller. By default
        MVC performs request validation before a controller processes the input.
        To change this behavior apply the ValidateInputAttribute to a
        controller or action.
          pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
          pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
          userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <add assembly="System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />

      <validation validateIntegratedModeConfiguration="false"/>
        <remove name="BlockViewHandler"/>
        <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>


During research, I've found several good articles:

Tuesday, January 11, 2011

Jack Rabbit WebDAV and MS Office

Use Case

Have MS Office to work with Jack Rabbit WebDAV


The solution given below is for internal usage only. Do not follow if you're not realize what you're exactly doing.

There is well known feature of MS Office which prevents it from correct work with WebDAV. During transmissions back and forth MS Office magically lose important auth headers which actually imply on WebDAV security. After hours of struggling with this, the only solution for internal usage was to disable authorization in Jack Rabbit.

I tried to play with security settings in jack rabbit but wasn't successful. The reason is that by default anonymous user has read only permission and any other login has full permission. I was able to tweak file:, rebuild sources and everything got worked :)

jack rabbit over http / rest

Use Case

Provide REST access to jack rabbit.


Use following article from jack rabbit guru:

It's also good idea to take a look at: It works perfectly, but I didn't like it because wan't able to reconfigure it to use external jack rabbit installation.. Maybe another day.

For those who need to access Jack Rabbit from .NET, I may suggest excellent WebDav Client Library for .NET from

Monday, January 10, 2011

jboss hosts

Use Case

Get JBoss to listen all IP addresses.


Start JBoss using command: run.bat -b Note that this is easiest but not best way to go. If your server will have more than one network card, you will have to specify interface implicitly.

More information how to setup serveral hosts using JBoss can be found at:

jboss + jack rabbit

Use Case

Setup Jack Rabbit on JBoss


JBoss AS (jboss-5.1.0.GA), Jack Rabbit (2.2.0, jackrabbit-webapp-2.2.0.war).

There is official manual on how to setup Jack Rabbit onto JBoss:

However, I prefer to work with WAR distributable files, so, my steps were a bit different:

1. Download jackrabbit-jcr-rmi-2.2.0.jar  from, put this file to jboss/server/default/lib

2. Copy jackrabbit-webapp-2.2.0.war to deploy directory

3. Start JBoss

In my case, jack rabbit started but wasn't able to create repository. The reason is odd error that default RMI port 1099 was occupied. That error will be fixed in 2.2.1.

I managed to fix this issue by specifying different RMI port (1100) in  jboss\bin\jackrabbit\ Not sure that this is correct, but after this, JBoss picked up JackRabbit, created repo, give me webdav access and much more.

Useful links:

JackRabbit Configuration

Next steps would be to configure WebDAV with MS Office, setup access, configure db file system and play with hadoop.

More info coming.

jboss + jasper report server

Use Case

Setup jasper report server on jboss.


Download JBoss (jboss-5.1.0.GA), Jasper Server ( Installation is pretty straightforward, if follow this guide:

By default, Jasper Server uses MySQL / PostgreSQL to keep internal data. Good post about how to marry JasperServer & Oracle could be found here:

It's strange, but I wasn't able to get running JBoss 6.xx and Jasper Server 3.7.xx..