Results 1 to 2 of 2

Thread: cshtml files causing 404 on web site

  1. #1
    J Trahair is offline VB.NET Forum Fanatic
    .NET Framework
    .NET 3.0 (VS 2005/2008)
    Join Date
    May 2008
    Location
    Spain
    Posts
    148
    Reputation
    66

    cshtml files causing 404 on web site

    Hi. I've done a tutorial in ASP.net, the pages have .cshtml extensions. It works fine using IIS on localhost - the pages show fine. I uploaded all files and folders correctly, but I get a 404.3:
    HTML Code:
    HTTP Error 404.3 - File or directory not found: MIME map policy prevents this request.
    Internet Information Services (IIS)
    My ISP says 'the hosting account is on Windows servers, the ASP.NET is version 4.'
    I attach a zip of the tutorial site. Try http://www.foreversoftware.co.uk/web.../Movies.cshtml

    I know that .cshtml files aren't normal .html files, but that's what the instructions for uploading said!

    What have I missed?
    Attached Files Attached Files

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,197
    Reputation
    2368
    cshtml is C# Razor files, in VB.Net you use vbhtml files. There is a C# forum here if that is what you pursue C# Developer Forums

    As for IIS, maybe they haven't installed MVC, this may help you iis6 - What exactly needs done to IIS 6 to serve cshtml pages? - Stack Overflow

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking