Results 1 to 4 of 4

Thread: Deployment Issues With MVC

  1. #1

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Deployment Issues With MVC

    I have an MVC app that runs fine from within VS2008. I want to publish it on my local IIS. However after publishing when I try to access it through localhost, it returns an error:

    The website declined to show this page.


    Ordinarily when I call the website URL, the default index page should get called, and typing the names of any of the controllers should invoke the respective views. However all I get is this error.

    What is missing from the deployment? I already tried setting CopyToLocal = true for the three MVC assemblies, but no luck.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  2. #2
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Re: Deployment Issues With MVC

    What version of IIS are you using? (If for some reason you got IIS6, just google that. Some issues there I never had to bother with)
    Is the application pool for the site set to Asp.Net 4.0 (Integrated)? (in IIS)


  3. #3

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: Deployment Issues With MVC

    I finally got it to work on my local IIS 5.1. I tried to install the MVC patch for IIS, but never know if it was installed or not. I have no way to verify that. Apart from that I changed the global.asax code to alter the routing so I can call my controllers by adding the ".aspx" extension (found it after googling). So my local website is now up and running.

    The problem persists with IIS 6.0 on the deployment machine. It's Win 2003 and IIS 6, which is the only difference from my development machine. I was hoping the routing changes would take care of things pretty much on all IIS versions, but unfortunately that doesn't seem to be the case.

    Latest:

    I tried the steps discussed here:

    http://haacked.com/archive/2008/11/2...lkthrough.aspx

    Specifically:

    1. I have the virtual directory set up with mapping of ".mvc" extension to the ASP.Net ISAPI (mapping for ".aspx" already exists).
    2. I have the global.asax.cs modified to set up routing on ".aspx"
    3. Now if I add wildcard mapping, nothing on my site works.
    4. If I remove the wildcard mapping, only the static html page is served. Any controller requests (made without extension, with extension ".aspx" or with extension ".mvc" are met with 404 - page cannot be found error.

    .
    Last edited by honeybee; May 17th, 2011 at 12:13 AM.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: Deployment Issues With MVC

    This is a desperate question: Is there any way to convert the MVC application into a typical Web Forms application? This is my last resort, but as I am running out of time, I am more and more inclined to pursue this course of action, however absurd.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width