joachim58
asked on
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
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.c shtml 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/Ho me 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
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.c
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
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
- localhost/cccfe07/Views gives error: Method not found: '!!0[] System.Array.Empty
- localhost/cccfe07/Views/Ho
"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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to have helped.
Dan
Dan
ASKER
Problem solved. Thank you.
ASKER
thank you very much for your comment. Using the first link you listed the problem could be solved.
regards
Joachim