locked
Problem with Routing on windows 2003 .NET 3.5 SP1 RRS feed

  • Question

  • User671276120 posted

    Somehow the following construct does not work on .NET 3.5 SP1;

    routes.Add(new DynamicDataRoute("{Process}/WorkItems")
            {
                Model = model,
                Table = "Processes",
                Action = "Show"
            });

    On my development pc (Dynamic Data Futures 7/16) everything works fine.
     

    There are several routes added in the global.asax for this website, the default;

    routes.Add(new DynamicDataRoute("{table}/{action}.aspx")
            {
                Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),
                Model = model
            });

    works fine.


    Anybody got a clue?

    TIA,
    Ewart

    Thursday, September 11, 2008 1:51 PM

Answers

  • User1641955678 posted

    I see, it's because you are using an extension-less route, which is pretty hard to get working with IIS6 (which is what W2K3 uses).  On IIS7 and Cassini, this works much more easily.  Your best bet on IIS6 is to add an extension.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 12, 2008 11:42 AM

All replies

  • User1641955678 posted

    In what sense does it not work?  Compile error, runtime error, incorrect runtime behavior?

    thanks,
    David

    Thursday, September 11, 2008 3:01 PM
  • User671276120 posted

    Hi David,

    It does not work at runtime, the browser returns a 404.

    Thx,
    Ewart

    Thursday, September 11, 2008 3:42 PM
  • User-1005219520 posted

    >>On my development pc (Dynamic Data Futures 7/16) everything works fine.

    Is that running with the ASP.Net development server (AKA cassani)? If you have Vista SP1, can you add the Web server role + ASP.Net role service and test?
    Thursday, September 11, 2008 6:24 PM
  • User-330204900 posted

    Could it be that you have one of the PageTemplate open as this causes a page not found error in VS2008, or it you are in a live environment then you would need to set the start page up?

    Thursday, September 11, 2008 7:25 PM
  • User-330204900 posted

    And if it is in VS2008 you just need to right click the Default.aspc page and click Set As Start Page.

    Hope this helps [:D]

    Thursday, September 11, 2008 7:38 PM
  • User671276120 posted

    Hi Guys,

    Under Vista SP1, Visual Studio 2008 and Cassini everything works fine. On the production machine (Windows 2003 server 2003 R2) with .NET 3.5 SP1 the mentioned Route does not work.

    Navigating to: http://localhost/OT/WorkItems on the server results in a HTTP Error 404 - File or directory not found. Internet Information Services (IIS 6.0)

    Adding the ASPNET and IIS_WPG users does not solve the problem.

    Cheers,
    Ewart

    Friday, September 12, 2008 11:32 AM
  • User1641955678 posted

    I see, it's because you are using an extension-less route, which is pretty hard to get working with IIS6 (which is what W2K3 uses).  On IIS7 and Cassini, this works much more easily.  Your best bet on IIS6 is to add an extension.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 12, 2008 11:42 AM
  • User671276120 posted

    Thanks for the insight David. After adding the extension everything worked fine.

    Ewart

    Friday, September 12, 2008 12:49 PM
  • User-1910744540 posted

    I'm pretty sure I'm having the same problem.

    Any chance of giving an example of the routing code in global.asax

    and

    the configuration of the extension in the IIS6 configuration?

    I have gone through the other posts on this issue with a wildcard extension

    Mark 

     

    Friday, September 12, 2008 5:03 PM
  • User671276120 posted

    Hi Mark,

    Simply add an extension to the DynamicDataRoute like:

    routes.Add(new DynamicDataRoute("{Process}/WorkItems.aspx")
            {
                Model = model,
                Table = "Processes",
                Action = "Show"
            });

    *.aspx is already configured in IIS6 so no worries there.

    Cheers,
    Ewart

    Sunday, September 14, 2008 1:14 PM