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
84 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
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:
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

758 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

22 Experts available now in Live!

Get 1:1 Help Now