0

I am developing an ASP.NET MVC 4.5 application in C#. It works flawlessly when I run it after compiling on my local IIS Express. However, when I try to upload it to a remote server it does not seem to recognize anything in its root directory. It only displays the default welcome screen.

I have tried reconfiguring the web.config file to point to Global.asax file, without any success. I am able to load single images by modifying the URL according to the sites structure.

What is the initial "starting file" on ASP.NET MVC 4.5 and how do I configure IIS7 to load it?

1
  • Install Web Platform Installer on the server, and use it to install Asp.Net Mvc 4. Then see if it works. Commented Jan 9, 2013 at 15:04

2 Answers 2

1

Check you server configuration (if possible), first enable Web Server (IIS) role (is posible to add from Server Manager or PowerShell), then install .NET Framework, or use aspnet_regiis.exe from .net framework folder (C:\Windows\Microsoft.NET\Framework\v4.0.30319 and C:\Windows\Microsoft.NET\Framework64\v4.0.30319) if server has configured iis web role and .net framework installed but configured incorrectly. If unsure what role features to add use Web PI and add IIS Recommended Configuration (http://www.microsoft.com/web/downloads/platform.aspx)

Note: In Visual Studio 2012 project template for MVC 4 Web Application references as copy-local MVC Assemblies from NuGet and therefor you don't need to install MVC 4 on web server.

Command to register current .NET version (from folder wich you are executing this utility, execute for both, first for 32-bit and than for 64-bit on 64-bit OS) with IIS:

aspnet_regiis -i

PowerShell to add Web Server role:

PS> Import-Module ServerManager
PS> Add-WindowsFeature Web-Server
Sign up to request clarification or add additional context in comments.

3 Comments

Thank you for you replay, however the problem is that I do not have a direct access to server controll. The server is verified to be running .NET framework as there are other similar (not MVC) applications running on it.
Yes this possible for example if you have .net framework 3.5 sp1 on sever and applications compiled for that version .net deployed on server. Can you answer what is latest .net framework installed on the server?
Silly me, after adding <system.webServer><modules runAllManagedModulesForAllRequests="true" /> IIS responded with .NET 2.0 error page. Installing proper .NET solved this. Thanks for you help!
0

If you see the default IIS welcome screen then it's probably because of incorrect website bindings (IP:port:hostheader). Whenever IIS cannot locate a website with specific binding it falls request back to "Default Web Site" with *:80 binding which you probably observe.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.