Oxite - Blogging Engine based on MVC

Discussion in 'ASP / ASP.net' started by siphilp, Feb 19, 2009.

  1. siphilp CSNM Customer

  2. paul1664 CSNM Customer

    Thanks for the tip... this is exactly what I'm after.

    I have posted my own MVC site to CSNM but the routes won't resolve... eg. /Home/Index won't resolve on my CSNM domain. I know the reasons (no .aspx for IIS to match) and the fix (rewrite the URL or use IIS7) but I was wondering how you managed to get Oxite to run. Does it use /Home/Index format or something else?

    Paul.
  3. siphilp CSNM Customer

    well,
    If i go to http://oxite.siphilp.co.uk/ it breaks due to not finding a route. But if you go to http://oxite.siphilp.co.uk/oxite.aspx it works. I have only looked at it for a couple of hours (main code side) but am sure there is a way to get the default.aspx working :)

    Will keep you posted. Will be looking at it more this weekend. Only problem I have with it is that the plugin framework isn't in place yet which means there could be a serious potential problem. I am told via twitter that the plugin model is in an early stage, so no time frame yet.
  4. paul1664 CSNM Customer

    Oh, okay. Then you will definitely want to read this.

    I'm hoping Carl will go to option 5 as soon as possible. :D
  5. siphilp CSNM Customer

    lol. Think we will have a bit of a wait :whistle:
  6. paul1664 CSNM Customer

  7. siphilp CSNM Customer

    Just remember that this is in early development and hasn't as many options as subtext or be.net. I have a feeling subtext will be moving to MVC soon as Phil has been quite quiet lately which means something is stirring....
  8. paul1664 CSNM Customer

    This is how to do it

    Hi,

    I've finally got MVC working on my app with 'proper' routing - eg. http://www.domain.com/Home/Index.

    Its quite simple:

    1. Get ISAPI_Rewrite installed on your domain. £15+VAT (kind of irritating as I already have a license for it!)
    2. Get .mvc extension mapped in IIS Application Settings. Just raise a support ticket and ask Carl nicely.
    3. Add a file called .htaccess file to the root of your app and paste the code below. You may have to rename the file using Command Prompt as Windows Explorer doesn't like filenames with just an extension.

    Code:
     
    RewriteEngine on
    RewriteRule ^Home(/)?$ $9 [NC,R=301]
    RewriteRule ^$ Home [NC]
    RewriteRule ^([\w]+)$ $1.mvc [NC]
    RewriteRule ^(?!Content)([\w]*)/(.*) $1.mvc/$2 [NC]
    
    4. Add the following routing code to Global.asax.cs AFTER the default routing code:

    Code:
                routes.MapRoute(
                    "Default.mvc",                                          // Route name
                    "{controller}.mvc/{action}/{id}",                       // URL with parameters
                    new { controller = "Home", action = "Index", id = "" }, // Parameter defaults
                    new { controller = @"[^\.]*" }                          // Parameter constraints - Do not allow dots in the controller name
                );
    Job done! More details are available here. This is for the Release Candidate (RC) release of ASP.NET MVC so may change in the final version.

    Paul.
  9. siphilp CSNM Customer

    Thanks for posting :) Not sure if I will be porting my personal blog to Oxite in the near future. I will be developing skins for it though so keep an eye on my site. I have a couple of projects which run on mvc but unfortunately i have had to take else where due to the nature they run and the cost of the rewrite module.

    I have a couple of ideas on plugins for it. Problem is the framework hasn't been released yet :( When it is I am going to be busy lol.

    Make sure you report any problems/discussions to the official oxite pages :)

    [UPDATE] Broke my install. Downloaded from trunk and deployed. Doesn't like it :( Never mind will fix it tomorrow when head is fresh...

Share This Page