[英]Deployed Website not working in IIS
I locally hosted my asp.net (razor) application on my machine. 我在本地将我的asp.net(剃须刀)应用程序托管在我的计算机上。 The website is hosted but giving some errors.
该网站已托管,但出现一些错误。 I have fixed some of them but now when i hit url the website open in directory browser mode
我已经修复了其中一些问题,但是现在当我点击url时,该网站以目录浏览器模式打开
localhost - /mytls/
[To Parent Directory]
3/20/2015 11:43 AM <dir> bin
3/20/2015 11:43 AM <dir> Content
3/20/2015 11:43 AM <dir> EmailTemplates
3/19/2015 4:25 PM 115 Global.asax
3/19/2015 4:25 PM 2587 logging.config
3/19/2015 4:25 PM 2062 packages.config
3/20/2015 11:43 AM <dir> Scripts
3/20/2015 11:43 AM <dir> Views
3/20/2015 12:24 PM 6879 Web.config
What happen if you disable direcotry browsing? 如果禁用直接目录浏览会怎样?
https://technet.microsoft.com/en-us/library/cc731109(v=ws.10).aspx https://technet.microsoft.com/en-us/library/cc731109(v=ws.10).aspx
And check your default start page. 并检查您的默认起始页。 If you use MVC it can be in the RouterConfig.cs
如果使用MVC,则可以在RouterConfig.cs中
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
// default route here
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new[] { "MyApplication.Web.Controllers" }
);
}
The solution of this issue is very simple. 这个问题的解决方法非常简单。 I just install asp.net (version in which you develop your website) on my machine.
我只是在我的机器上安装asp.net (用于开发网站的版本) 。 Restart IIS server.
重新启动IIS服务器。 The website start working.
该网站开始工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.