When I run my asp.net mvc site in visual studio 2008 is it running iis7 or iis6 Internally?
Also does mvc require iis7 (is intended for?)
Via Visual Studio, you're not really running IIS6 or IIS7. You're running Cassini. You can find out how Cassini differs from IIS here. As for ASP.NET MVC, it may be deployed to run under IIS6 or IIS7. As mentioned previously, you have to jump through some hoops if you want to run under IIS6 so IIS7 is ideal if possible. If you are stuck with IIS6 (maybe you're on Windows Server 2003) there are a couple of best practices (Url file extensions or wild card application maps) which Phil Haack has well documented which will help to get your application running correctly.
If you mean the one built in to windows, that is tied to your OS version rather than to your version of Visual Studio.
If you mean the version that Visual Studio uses as a development webserver, then that version is not IIS. Its an internal webserver (very similar to Cassini) suited for testing and debugging only.
MVC can work in IIS6 but you need to make sure to set your routing to "{controller}.aspx/{action}/{id}".
As for IIS6 or 7 for the "IISLite" that VS uses, I am unsure of that. I think VS2008 uses IIS7 because I do not need to add ".aspx" to my controller in the route when debugging.
Related
Having a hard time finding the right doc for this particular feature.
Under the green arrow (launch profiles dropdown list) in Visual Studio 2017 I have a menu item named after my project. Is this the Kestrel server option? Is it the default? Is this option (Kestrel) the recommended one to use for ASP.NET Core 2.1 web apps? Is IIS Express considered obsolete?
I think it is a little bit annoying really that there are so many options to choose from. Specially when there's no quick explanation in the IDE and you don't know which is which. It's like having three play buttons in Spotify each doing the same thing but with different names on them. So which one do I click?
I recommend to read these docs:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/?view=aspnetcore-2.1&tabs=aspnetcore2x
ASP.NET Core ships two server implementations:
Kestrel is the default, cross-platform HTTP server for ASP.NET Core.
HTTP.sys is a Windows-only HTTP server based on the HTTP.sys kernel
driver and HTTP Server API. (HTTP.sys is called WebListener in ASP.NET
Core 1.x.)
In simple words ASP.NET Core runs its own HTTP server. Than you can use IIS, IIS Express, Nginx, Apache as reverse proxy.
When you run ASP.NET Core project in Visual Studio you can run in two modes:
Without debugging - it fires up Krestrel and IIS Express.
With debugging - it only fires up Krestrel
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/start-mvc?view=aspnetcore-2.1&tabs=aspnetcore2x
My Google skills are lacking at the moment. When should I be using IIS Express vs. IIS vs. Project vs. Executable? What are the pros/cons of each?
IIS Express: A common default that runs the ASP.NET Core application behind the IIS Express development server. This is a good default.
IIS: When you actually have a full IIS installed, you can set this up, so that your application runs directly behind IIS. That isn’t really a good choice for development, at least not for ASP.NET Core, and I actually don’t even know if this works properly with ASP.NET Core.
Project: This runs the application as a console application. As a result, this is the same as running dotnet run from the command line. This is also a very good option for debugging, as you can directly see the logging output. Depending on your target production environment, this might even make more sense than running behind IIS Express.
Executable: This allows you to run an arbitrary executable. That’s not really useful for running your ASP.NET Core project.
So basically it comes down to IIS Express or Project. These are the two that are also configured properly by default in the launchSettings.json file that comes with the ASP.NET Core application template.
Whether you prefer IIS Express or running the application directly probably comes down to personal preference. So just give both a try and see what feels nicer to you.
I need to know if developing a Windows Identity Foundation (WIF) solution requires IIS installed. I would like to be able do develop a WIF solution using the built-in Visual Studio Development Server (I heard it is called Cassini) if possible.
All of the samples I've downloaded assume that IIS is up and running on the local system.
This blog, Securing WCF Services with Custom WIF STS: A Step-By-Step guide, lists requirements for a WIF example and has IIS as one of the requirements.
I've added the images to allow you to follow easily with the steps.
Pre-requisites:
Visual studio 2010
The development machine has IIS installed (I use Windows 2008 R2)
Windows Identity Foundation (WIF): download it from http://www.microsoft.com/download/en/details.aspx?id=17331
Windows Identity Foundation SDK: download it from : http://www.microsoft.com/download/en/details.aspx?id=4451
I also have noted another StackOverflow posting indicating that IIS Express can be used. I have not yet fully investigated IIS Express, however this doesn't answer my basic question.
I can't seem to find any other references anywhere else about this topic. I'd appreciate knowing if anyone has been able to develop a WIF solution implementing a Security Token Service using the standard Visual Studio Development Server alone. Otherwise, I will look into using IIS Express. I am unable to install and use IIS (non-Express) on my system as I don't have local admin access.
Thank you.
Before .NET 4.5 WIF was a separate package and an additional installation step.
.NET 4.5 makes several important changes and moves WIF into the .NET base class libraries. The move enables WIF to be used by any application regardless of host. There's enough changes that if you are starting new, I recommend upgrading to .NET 4.5 to avoid porting in the future and because the integration does make things easier.
I'm currently running Visual Studio 2012 and testing WIF code in IIS Express and ServiceHost without issues.
I don't have local admin access
This is a big problem. Not having local admin for WIF development may not work. You will need elevated privileges to install tools and test applications.
Regardless of version, you shouldn't have any issues running apps with WIF outside IIS. The limitations are more around running SSL. Have you tried? Did you get any errors?
As #Eugenio states, one of the issues is around SSL. The other problem is that Cassini uses localhost which means that you need to have a valid localhost certificate if you are thinking of adding this application to something like ADFS. (as opposed to having a certificate for the actual machine name).
Also, to do WIF development, you have to run VS in Admin mode.
What I am looking for and seem unable to find, it's late and I'm tired, is a step by step guide on how to set up windows 2008 server to run asp.net mvc applications.
I am a web applications developer, amongst other things, and can do that bit fine. Normally I let someone else, like the hosting company, worry about the setup and just publish using 1-Click with web deploy or ftp.
However, for this projects I have a local Windows Web Server 2008 R2 installed but I don't know how to set it up to run the application. the deploy works, all the files arrive in the correct folder on the server, but can I get it to work?
No.
Hence the question.
For your information the app is built using Sharp Architecture, MVC3 and Razor and targeted at .NET 4 which is installed on both my development PC and the server.
Any suggestions?
Thanks.
Best thing would be to download Windows Web Platform installer and select the options you want, for example, .NET 4, MVC3 etc etc ...
Then, remember to enable ASP.NET in your IIS (under Roles or something...).
I decided to follow this tutorial on getting started with ASP.NET. I have Visual Web Developer 2010 Express (with SP1) installed, as well as the ASP.NET MVC3 tools.
I created the project and starting debugging it by going to Debug->Start Debugging - which then opened my browser to http://localhost:50531 and displayed:
According to the tutorial, that's not what I'm supposed to see.
Additional details:
OS: Windows Vista Home Premium 32-bit (with SP2)
I also have IIS 7.0 installed and running.
Did you use the presets or an empty project? If the latter, you don't have any controllers or views, thus the routing doesn't match anything, resulting in an error.