ASP.NET MVC and host problems - asp.net-mvc

Hi,
I have done the following :
Start Visual Studio 2010
New Project > ASP.NET MVC
Default ASP.NET MVC project generated by VS2010
Add a couple off simple buttons on the first page
Start local IIS manager, Create a web application and point it to the ASP.NET MVC project
Set correct right on the ASP.NET MVC project folder(to the user running the thread pool in IIS7)
Browse site (http://localhost/MyTestSight/) and the first page is shown
Upload site to www.test.figurspel.net
Host sets the site to be runned on .NET 4.0
Browse www.test.figurspel.net and the site is not working?
The host has checked that tha Active Server Page is set to allow
Host has installed up to MVC 3
I could turn on the Browsable to see the file structure but this will not help to get the site running.
How do I get this asp.NET MVC web site running?
BestRegards

Is the application pool running in integrated mode the IIS site running under that application pool?
It's my understanding that if this isn't the case, the MVC site will not run.
Alternatively, have you tried this?

+1 Unicorn power HooooooO!!!!! Also I've always when hosting a site published the project to a different folder then setup the site via IIS from that folder hope this helps.

Related

How to deploy MVC 5 web application in IIS 8 server in Windows 8.1?

I have developed MVC 5 web application in VS 2013 and I want to deploy that application in IIS 8 but its give me error as per given image.
Make sure you've given IIS_IUSRS group READ permission to the wwwroot directory. (if it requires additional permissions, Read & Execute might be necessary).
There's also a IUSR that may need READ permission as well.
If you're deploying to the default web site in IIS you can safely publish to the default website's directory and be up and running.
However, if you're deploying an ASP.NET MVC site to a subdirectory of the default site, or to a new directory on the server, you will need to create a new web site, or convert the subdirectory (when publishing under the default site) to an application.
If this is your first time setting up a site on IIS, Microsoft has documentation on the steps to follow in the learn section of ASP.NET.

Server Variables are not being accessible in ASP.NET MVC

I have two web applications hosted in the same app pool in IIS 7. One is an ASP.NET application and the other is ASP.NET MVC application. When I go to the web application in ASP.NET and click on a link it is supposed to Launch the other web application in MVC hosted in the same app pool. I can access Server Variables in the ASP.NET application, but I can't access Server Variables in ASP.NET MVC. This works in IIS 6.0 but doesn't work in IIS 7.0. Any ideas and suggestions are greatly appreciated.
Thanks in anticipation.
You are not supposed to see the other's app data (be it server variables or whatever). This is normal. Just because they're in the same process this does not provide access to them.

Setting up mvc application on IIS7?

I've created a MVC website using Visual Studio 2010 and would like to deploy it to my newly installed local IIS7. The website works perfectly running from Visual Studio on the development server that it comes with.
Here are the steps I've done:
1) Opened IIS7 Manager.
2) Under Sites created a new site called Foo.
-- I used the DefaultAppPool which is set to .net4 integrated
-- I created a empty directory and used it as the default path
-- I set the port to 54321
3) I then in Visual Studio used the publish button with local IIS and the site set as Foo.
IIS Manager now shows the following under sites:
Foo
bin
content
scripts
views
When I go to localhost:54321 I am given a message saying it can't list the directory. If I put a index.html file in this directory it will launch the file as expected. I guess I'm missing something big here. I published my site to this directory. When I go to localhost:54321 I expected it to launch the index view of the home controller, but it just tries to list the directory.
Found the answer here:
ASP.NET MVC on IIS 7.5
Can't answer my own question cause I have less than 100 points :)
The new server is missing the ASP.NET MVC 3.0. Install it using standalone ASP.NET MVC 3 installer.

asp.net mvc app in windows 2003 server extension less runs only home page

I've setup an asp.net mvc app on a windows server 2003 machine with IIS6. ASP.NET MVC3 and .NET4 framework has been installed.
Now, I setup a New Website, New AppPool for .NET4 and then put a virtual directory under there with my asp.net mvc3/razor app. So:
IIS
+NewSite <<I set home directory to MyApp
++MyApp/ <<virtual dir
Here is the annoying bit, when I navigate to the address http://<MyServerIp>/ the home page for my app loads up. But, all other links/urls fail and give me a 404.
Like if I click Log On. The URL <myServerIp>/Account/LogOn gives a 404. Similarly all other urls other than the home page give me a 404.
I've gone through as many related questions on SO. I've gone through Phil Haacks article. I've setup a wildcard mapping for .net4.
Any ideas?
Make sure that .NET 4.0 is enabled in the web service extensions folder in IIS manager console:
Also make sure that ASP.NET is properly registered with IIS:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

Does asp.net MVC need to be compiled before it’s deployed onto a web server?

I can’t get a basic MVC site to work on my web server unless I’ve compiled it first in Visual Web Developer. If it doesn’t have a dll in the Bin, it says the Namespace can’t be found.
In classic asp.net I could just upload the files and the server would compile it at first run. Is this not the case in MVC? Essentially I’d like to build an MVC site without using Visual Web Developer.
That's cause ASP.NET MVC is not based on the Website model that many ASP.NET Web Forms apps were. It is based on the Web application model.
You can read about Web Application Projects here.
I've read about people migrating the Web Application to the Web site model in ASP.NET MVC but I don't recommended it.
Yes, you do need to compile an MVC site and deploy some DLLs in a bin folder when you deploy an MVC site
You can build MVC without Visual web developer... but why?

Resources