Solved

MVC5 App runs on development machine but gives HTTP 404.0 or 403.14 when deployed to http://w.x.y.z/Default Web Site/Application

Posted on 2016-09-12
4
94 Views
Last Modified: 2016-09-18
The MVS application CCCFE07 starts without problems on the development machine
It is deployed to our demo webserver using the Framework 4.5 Web-Deployment feature
server: http://80.90.100.110
site name: Default Web Site/CCCFE07
destination URL: http://80.90.100.110
Validate Connection is ok

RouteConfig is
namespace CCCFE07 {
    public class RouteConfig {
        public static void RegisterRoutes( RouteCollection routes ) {
            routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
CCCFE07\Views\Home\Index.cshtml  exists

The Web Deploy feature installs the app on the server to Default Web Site/CCCFE07 and maps Default Web Site/CCCFE07 to the physical path c:\inetpub\wwwroot\CCCFE07 where we can see the subdirectories bin, Content, fonts, Scripts, Views

Trying to start the app on the server with
- localhost/cccfe07 gives error 403.14 Forbidden
- localhost/cccfe07/Home gives error 404.0 not found which seems reasonable since physical path C:\inetpub\wwwroot\CCCFE07\Home\ does not exist
- localhost/cccfe07/Views gives error: Method not found: '!!0[] System.Array.Empty
- localhost/cccfe07/Views/Home gives same error

"Enable Directory Browsing" is probably no option, since the configured start document shall be started
A default document is defined in RouteConfig (see above)

What must be done so that the http://localhost/CCCFE07 app can be startet on the Web Server?

Thanks for your help.

Joachim
0
Comment
Question by:joachim58
  • 2
  • 2
4 Comments
 
LVL 26

Accepted Solution

by:
Dan McFadden earned 500 total points
ID: 41795549
1. Have you verified that the required .NET Framework is properly registered in IIS for the app?

I would read thru some of the following article, most are dealing with similar issues:

1. https://devio.wordpress.com/2014/12/05/deploying-asp-net-mvc-5-on-windows-server-2008/
2. http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html

Dan
0
 

Author Comment

by:joachim58
ID: 41795954
Dan,
thank you very much for your comment. Using the first link you listed the problem could be solved.
regards
Joachim
0
 
LVL 26

Expert Comment

by:Dan McFadden
ID: 41795957
Glad to have helped.

Dan
0
 

Author Closing Comment

by:joachim58
ID: 41803621
Problem solved. Thank you.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now