Reputation: 2861
I have an ASP.NET MVC 4 application and I want to deploy it on IIS 8. I read on the internet that it's possible to do that directly through VS 2010/2013 by creating a package and publish it but I want to deploy it with IIS manager. I tried to do it manually by doing these steps :
When I launch my website through Chrome, the browser says that he can't access http://www.abc.net:3500
What am I doing wrong here? What should I do to deploy my MVC website without Visual Studio?
EDIT : By following Imran's first link, it seems that I made a step ahead. However, instead of access the Index page of my app, that's what the browser displays :
Should I configure something in my RouteConfig? Here it is :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace AstellasSchedulerV2 {
public class RouteConfig {
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
routes.MapRoute(
name: "Default", // Route name
url: "{controller}/{action}/{id}", // URL with parameters
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
}
}
Upvotes: 2
Views: 9397
Reputation: 4635
please refer below articles step by step
IIS 8.0 Using ASP.NET 3.5 and ASP.NET 4.5
and
ASP.NET Web Deployment using Visual Studio: Deploying to Test
EDIT
Publish your website code properly and then try below
1)Please check below configration in global.asax.
RouteConfig.RegisterRoutes(RouteTable.Routes);
2)your route config should be
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "your default controller", action = "index", id = UrlParameter.Optional }
);
3)Disabled Directory browsing in IIS 8.0
Upvotes: 0
Reputation: 9391
You can create a deployment package using Visual Studio
by going to Build > Publish {project name} and follow the wizard.
In IIS
click on a site and there should be an option for Import Application under the Deploy menu. If you don't see this then you need to install the WebDeploy module into IIS
.
Alternatively, if you're still developing your solution you can configure Visual Studio
to use your IIS
installation by going to the project's Properties > Web and choose Use Local IIS Web server. When you run your application it will copy the build over to your default website automatically and run it from there.
Hope this helps.
Upvotes: 1
Reputation: 62093
No idea what you do wrong. Check the logs. Set up a web.config that shows the error when you access the site locally and / or remotely for debugging purposes. Your question is like "I have a car. It does not work. What is wrong?".
Once you enable remote debugging in teh web.config you should see a proper error message.
http://technet.microsoft.com/en-us/library/bb684665.aspx
tells that the settings are:
Change the customErrors mode attribute from "RemoteOnly" to "Off", and then save the file.
and then you should see more than a "Error 500". Making sense out of that is your job then ;)
Upvotes: 0