あなたのホームディレクトリにはDefault.aspxを持っていますか?そうでない場合は、このコードビハインドを含むコードを追加してみてください。
public partial class _Default : Page
{
public void Page_Load(object sender, System.EventArgs e)
{
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
}
}
出典
2010-12-03 19:11:18
CGK
アプリで問題が発生しましたか?コンパイルしない?正しくルーティングされませんか?他の? – Jaime
コンパイルは正常です。公開ビンはサーバーに展開され、HTTP 401.1 - 権限がありません:ログオンに失敗しました。エラー – odez213
Windows 2008 ServerおよびIIS7の手順チュートリアルでこの手順を試してみてください。あなたを助けるかもしれない。 http://arturito.net/2011/01/21/publishing-asp-net-mvc2-application-on-windows-server-2008-iis-7-with-visual-studio-2008-on-platform- net-3-5-sp1/ –