0

I am having an issue deploying MVC2 app on Window Server 2003 R2 x64. Does anyone have the same issue? I have tried different methods from global.asx, wild card mapping and to no avail. I'm thinking this is window server 2003 R2 x64 specific issue.

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Deploying Asp.Net MVC 2 /C# 4.0 application on IIS 6

Community
  • 1
  • 1
odez213
  • 723
  • 3
  • 10
  • 24
  • What's the issue your having with the app? no compile? no routing correctly? other? – Jaime Dec 03 '10 at 18:52
  • compile is fine, did a publish bin deploy on the server and got the HTTP 401.1 - Unauthorized: Logon Failed error – odez213 Dec 03 '10 at 18:56
  • Try this step by step tutorial for Windows 2008 Server and IIS7. Might help you. 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/ – Artur Kedzior Jan 21 '11 at 09:57

1 Answers1

1

Do you have a Default.aspx on your home dir? If not, try adding one with this code-behind

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);
    }
}
CGK
  • 2,662
  • 21
  • 24
  • I tried debugging it from application.Start() in Global.asax but it doesn't seem to hit it at all. I am thinking of permission related to configuration... – odez213 Dec 03 '10 at 19:14
  • 1
    Maybe it isn't entering the ASP.NET pipeline. Does the Web Site have ASP.NET configured in IIS? Also, try hitting default.aspx directly, or a Controller/Action route. – CGK Dec 03 '10 at 19:17
  • Checking if different version of asp.net needs to be registered. Didn't think of that one CGK – odez213 Dec 03 '10 at 19:21
  • hmm now it gives An error occurred loading a configuration file: Access to the path 'c://mypath/web.config' is denied. – odez213 Dec 03 '10 at 19:24
  • Looks like a permission problem...maybe IIS doesn't have permission to read that folder (i.e. is outside the default web path) – CGK Dec 03 '10 at 19:51
  • yeah that's what I'm thinking. I wish I am the full admin of this server box. – odez213 Dec 03 '10 at 19:54
  • Do you have other web applications running on the server? Try copying the configuration. – CGK Dec 03 '10 at 20:12
  • No since this is a new server box. – odez213 Dec 03 '10 at 20:19
  • @odez213 what was causing your problem, finally? – CGK Dec 10 '10 at 14:01