What is the Visual Studio's Web Deploy "Mark as an IIS Application on destination" mean? - visual-studio-2010

when I'm trying to deploy to an IIS7 website using Web Deploy, one of the options is to Mark as an IIS Application on destination.
What does this mean when have it ticked on or off?

When setting this option your site becomes an Virtual Application as opposed to a Virtual Directory.
For the differences between the two see: http://blogs.msdn.com/b/wenlong/archive/2006/11/22/virtual-application-vs-virtual-directory.aspx

Here is the relevant text from Oded's reference....
6.If you are not deploying IIS settings, select the Mark as IIS application on destination check box.
This option is not shown if you are deploying IIS settings, because the Web project's IIS application status is one of the IIS settings that is deployed.
You typically select this check box when the Include all IIS settings as configured in IIS Manager check box on the Package/Publish Web tab of the project Properties page is cleared. There are very few scenarios in which you would not want to deploy a Web project as an IIS application on the destination Web server. For example, suppose that the project that you are deploying is not actually a Web application but only contains virtual directory content, such as images, XML files, and so forth. In that case, you might want to clear this check box so that the deployed project is not set up as an IIS application.

It causes the deployed project to be setup as an IIS application on the destination.
If you uncheck it, the project will not be setup as an IIS application.
See step 6 of Creating a Publish Profile on this MSDN article, in particular the last sentence.

Related

MVC6 Web API - How to deploy

I downloaded and installed the RTM of VS 2015, got my Web API project working nicely, can hit F5 all works in IIS Express, lovely. But now I go to deploy my WebAPI on a local network server and oh my! I was hoping to find the publish to File System option and then to be allowed to select IIS but it ain't there. Publish to file system is there but that compiles wwwroot and approot folders and for the life of me I haven't been able to get them's files to run under IIS - tried all sorts, ege approot as my website root on IIS, wwwroot as my website root. I've found plenty of reference to show you how to deploy Web API ASP 5 to Azure but have as yet been unable to locate any information for how to deploy to IIS on network.
Just got it to work, for the sour down voter here's how
Right click WebAPi project select Publish
Profile -> Select File System
Connection Target Location browse to somewhere that makes sense eg. C:\inetpub\WebAPI
Settings ->Configuration select Release
Settings Target DNX Version select x64 example dnx-clr-win-x64.1.0.0.beta4
In IIS set the Physical Path of your website to be C:\Inetpub\WebAPI\wwwroot
Test eg localhost/api/Values

Manually Assigning WCF Application in IIS

In a Visual Studio "WCF Service Application" project, on the properties->web page, if I select "Use Local IIS Web Server"->"create virtual directory"...it creates the IIS application successfully in the Default Web Site of a local IIS 7.5 install. So far so good.
However, I'd like to use a site other than the default web site. My attempts to host the service in a different web site aren't working. I tried:
Delete the application / virtual directory in IIS that Visual Studio successfully created.
Manually create a new IIS application, in the different web site, using the same settings that were present in the IIS application previously created by Visual Studio automatically.
Go to Visual Studio, project properties->web, and select the "visual studio development server". Save. This is just an "erase" step.
On the same properties page, I select "Use Local IIS Web Server" again and hit save (without pressing "Create Virtual Directory").
In that last step, I expect it to save. It doesn't. It pops up a message saying the virtual directory does not exist. But as I stated, it does exist because I had manually created it just prior.
My own guesses about this problem:
*. The non-default site I've made is somehow different from the default web site, in a way I've yet to determine.
*. Visual Studio is not designed to work with a virtual directory that is not in the default web site.
Any suggestions or clarifications?
I've activated IIS "failed request tracing," but no records are created for this issue.
What you want to do is look at your second site is IIS (the one you want the WCF service to run under) and look at the host name on new or if you go to manage web site -> advanced settings and look at what is after the the bindings. So it may show something like: http:*:80:localhost2 . localhost2 is what you need. It may be an IP Address too, not sure how you set it up.
So then in your WCF project properties in the Use Local IIS Server -> Project URL you put the host name of the site. So for example it may be something like: http://localhost2/yourservice.svc .

Asp.net mvc3 application display project directory content instead of main page in browser

I've copied Asp.Net MVC3 application from another source to my development machine.
Now I want to run application, but when I run application the browser show me project directory content instead of application main page.
I suppose a have some mistakes in IIS configuration, but I don't know what is incorrect.
So, what is wrong?
UPD:I did found that "Use Local IIS Web Server" radiobutton in settings window is checked (instead default "Use Visual Studio Development Server"). Мay be this option affects?
Did you configure the folder in IIS as an Application? Sounds to me that you've just cloned a folder and expect it to 'just work'.
Right-click on the folder in IIS and select 'Convert to Application'. On the dialog that appears you will need to change the app pool to 'ASP .Net v4'.
Once you've done that it should work.

Visual Studio 2010: Debug web app in root of IIS 7 Web

I'm trying to configure my mvc project, so that I can debug it from IIS7, but I need it to be configured for the root of the web application.
What I've done:
Added the support for the "II6 configuration and metadata support" to IIS7
Created a new site in IIS7 at localhost:5000 (default settings)
Set the property "Use Local Web Server" in the project properties to : http://localhost:5000
When I click save I get the following warning:
"The local IIS URL http://localhost:5000/ specified for Web project MVC has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?"
When I click yes I get the message:
"Unable to create the virtual directory. http://localhost:5000/"
The above works fine when I set the url to point to a sub/virutal folder e.g. http://localhost:5000/mvc.
Any ideas?
The solution is when creating your IIS Site, the underlying folder needs to point to the asp.net project folder..
Soo easy if you know the solution :)
In my case, I hadn't added the required host header to the IIS config. After doing so, Visual Studio stopped complaining.
In IIS7 manager, right-click on the site, and select "edit bindings." Make sure that the URL you're entering in VS is listed, and that you can ping it from the command line (should respond from 127.0.0.1). If you can't ping it, add the url to your c:\windows\system32\drivers\etc\hosts file.

Deploying IIS Settings with Web Deploy

If I look at the Package/Publish Settings of a web application in Visual Studio 2010, there is an option to "Include all IIS settings as configured in IIS Manager (used only for IIS Web projects)"
I am using IIS instead of the VS Dev Server to run my web application, but when I deploy the package that Web Deploy creates to a remote server, the IIS settings that get applied to my remote IIS application are at the least, unfamiliar, and at the worst, completely wrong.
For instance, my local IIS has 2 virtual directories (images, sounds). But when I deploy, it creates 4 completely different virtual directories (_controltemplates, _layouts, _vti_bin, _wpresources), and if I manually create the 2 correct vdirs on the remote server beforehand, Web Deploy will delete them. Where the heck did Web Deploy get those from? Web Deploy also mis-applied the correct authentication settings on the remote IIS application.
Since the "Include all IIS settings as configured in IIS Manager" setting doesn't seem to pick up the right settings, I ultimately want to be able to create some kind of configuration file that Web Deploy will use as part of its deploy package. Ideally something that I can check into source control. But I can't figure out from the documentation how to do this. I see something about parameterization and manifests, but I can't quite figure it out.
Here is another article to look at. See the note about IIS Configuration, not all settings will be inherited, check if Windows authentication is set to true on the default web site.
Package/Publish Web Tab, Project Properties
http://msdn.microsoft.com/en-us/library/dd410108.aspx

Resources