PagedList<T>

Last post 01-08-2008 9:40 AM by michielvoo. 11 replies.

Sort Posts:

  • PagedList<T>

    12-10-2007, 9:19 AM
    • Member
      147 point Member
    • CVertex
    • Member since 09-09-2006, 2:53 AM
    • Posts 116

    ScottGu demo'd a PagedList<T> to make passing paged view data into views. I can't find this in the MVC, is it around anywhere?
    What's an easy way to implement a paged list in MVC?

    MVC is alot of fun, there's an tool I can deploy that uses it already - a simple reminder system.


    Why does IIS 6.0 need the .mvc extension? Why is it a bad idea to avoid the .mvc? This seems a bit contrary to the super clean URL promises.

     
     

  • Re: PagedList<T>

    12-10-2007, 11:52 AM
    Answer
    • Contributor
      5,773 point Contributor
    • Haacked
    • Member since 09-17-2003, 2:43 PM
    • Posts 388
    • AspNetTeam

    I don't know where the PagedList is, but I can answer your question about IIS 6.

    The ".mvc" extension is required for IIS 6 because IIS 6.0 won't hand off an exception to ASP.NET unless the request is for an extension that is mapped to ASP.NET via the aspnet_isapi.dll.

    So ASP.NET won't even know about these requests.

    One workaround some have attempted is to map all requests to ASP.NET in IIS 6.0. We don't support this with MVC and it's generally not a good idea.

    IIS 7.0 improves on IIS 6 because of its integrated pipeline.

    Phil Haack (http://haacked.com/)
    Senior Program Manager, Microsoft

    What wouldn’t you do for a Klondike bar?
  • Re: PagedList<T>

    12-10-2007, 12:29 PM
    • Member
      147 point Member
    • CVertex
    • Member since 09-09-2006, 2:53 AM
    • Posts 116

    That explains it, although is a little lame.

    Will IIS7 be available for Win2k3? 

     

  • Re: PagedList<T>

    12-10-2007, 4:42 PM
    • Member
      2 point Member
    • digitalego
    • Member since 12-10-2007, 9:41 PM
    • Posts 1

    "One workaround some have attempted is to map all requests to ASP.NET in IIS 6.0. We don't support this with MVC and it's generally not a good idea."

    Can you give a reason why this is not a good idea? In general mapping all requests to asp.net...

  • Re: PagedList<T>

    12-10-2007, 4:47 PM
    • Contributor
      5,773 point Contributor
    • Haacked
    • Member since 09-17-2003, 2:43 PM
    • Posts 388
    • AspNetTeam

    You can find longer explanations on the web. The short summary is this:

     In IIS 6, if you map all requests to ASP.NET, that means the ASP.NET runtime is responsible for all requests.

    Suddenly, you need to write handlers for .jpg requests and .css requests etc... At that point, you've told ASP.NET that requests for *.jpg should be handled by an IHttpHandler (a .aspx Page is an IHttpHandler). So now you need to supply that handler. Make sense?

    Phil Haack (http://haacked.com/)
    Senior Program Manager, Microsoft

    What wouldn’t you do for a Klondike bar?
  • Re: PagedList<T>

    12-11-2007, 4:07 PM
    • Participant
      846 point Participant
    • robconery
    • Member since 02-23-2005, 10:16 PM
    • Posts 192
    • AspNetTeam

    I believe you can also use Ionic's ISAPI Rewrite tool to filter extensionless requests and rewrite them as MVC. I haven't used it before but I know this is how Rails guys get Rails working under IIS:

    http://www.codeplex.com/IIRF

    I'll look into this over the weekend - let me know if you find out how to filter the requests - it should be pretty simple. 

  • Re: PagedList<T>

    12-11-2007, 4:08 PM
    • Participant
      846 point Participant
    • robconery
    • Member since 02-23-2005, 10:16 PM
    • Posts 192
    • AspNetTeam

     Also, RE PagedList<T>:

    http://blog.wekeroad.com/2007/12/10/aspnet-mvc-pagedlistt/

     

  • Re: PagedList<T>

    01-07-2008, 4:25 PM
    • Participant
      1,593 point Participant
    • mxmissile
    • Member since 06-19-2002, 10:42 AM
    • Ewtahh
    • Posts 362

    robconery:

    I'll look into this over the weekend - let me know if you find out how to filter the requests - it should be pretty simple. 

     

    Rob, did you every get a chance to look over this?  Any thoughts? 

    http://www.heliosfx.com
  • Re: PagedList<T>

    01-07-2008, 5:10 PM
    Answer
    • Member
      574 point Member
    • abombss
    • Member since 06-27-2006, 4:13 PM
    • Chicago, IL
    • Posts 164

     A good workaround to mapping * in iis6 is to then have another vdir where all static content goes.  This means your dynamic content gets handled by the runtime and css, js, images, etc all get handled by iis native.

    Adam Tybor -- abombss.com
  • Re: PagedList<T>

    01-07-2008, 8:18 PM
    • Participant
      983 point Participant
    • ChadThiele
    • Member since 04-27-2003, 2:43 AM
    • Japan
    • Posts 274

     So, in the MVC scheme of things, would setting a vdir to the content folder work (as long as you always pull images, js, etc... from there)?

    Did I answer your question(s)? Phweew...
  • Re: PagedList<T>

    01-08-2008, 1:47 AM
    • Participant
      846 point Participant
    • robconery
    • Member since 02-23-2005, 10:16 PM
    • Posts 192
    • AspNetTeam

     I didn't yet - I've been on vacation for the holidays and i'll try to get a post out on this in the coming weeks - it's important!

  • Re: PagedList<T>

    01-08-2008, 9:40 AM
    • Participant
      1,256 point Participant
    • michielvoo
    • Member since 02-11-2007, 9:52 AM
    • Rotterdam
    • Posts 174

    Sooo, to get this you need to upgrade your server? Can't Microsoft release a fix for this?

    Thanks.

    When you have asked a question, remember to click "Mark as answered" for a reply that answered your question. This ensures the right forum member gets credits (and it makes search more relevant too).
Page 1 of 1 (12 items)