WiX 3.7 IIS Setup - iis

When running our installer, we have it configured to setup 3 websites in IIS, before the upgrade this worked as expected, even if the default website (or any site listening on the same port) was still present.
If the website listening to Port 80 was already started, WiX would create the website from our installer, and just not start it (which is what I'd expect). Since upgrade to 3.7, however, what I've found is that the installer does not create the website if there is any other site configured in IIS that's listening to the same port.
Is there something missing in the WiX setup that I need to add to force WiX to add the website from our installer, or is this just a known issue with creating websites via WiX?
Edit:
Looking into this further, it appears that the website is checked by the port, rather than by name. If I have "Default Website" on port 80, any applications that are under the website I have in the installer are configured under the Default Website.

The IIS CustomActions in the WiX toolset use the "natural key" to find the web site which is the ip:port:header combination. Most websites, only the port is specified. In you scenario, I expect the WiX toolset found the existing website and "fixed it" based on the specifications in your installation package.

Thanks Rob, I managed to fix the issue by setting the ConfigureIfExists flag to true, which created the site as I'd expected it to originally.

Related

Stop IIS while using Xampp (Windows 10 - conflicts of ports)?

In Windows 10 IIS and Xampp use the same port (80), I've learned. I know how to change port in Xampp, but I'd prefere to stop IIS while using Xampp. On my old computer with Windows 10 I went to task manager > services and stopped World Wide Web Services by rightclicking. On my new computer with Windows 10, I can't seem to find World wide web services on that spot. Can it be named something else, according to language (swedish - though before on the old computer it was named as mentioned)? Any other way (in simple steps, please - beginner!) to stop IIS using the port, without disabling the IIS alltogether? (might want to learn how to use it later on)
Thanks in advance!
Port 80 is used by default with many web servers (here IIS and Apache which is bundled inside XAMPP).
The default web site created with IIS uses port 80. If you don't want to use this default web site (absolutely no harm and no data loss!), you can delete it by running the following command in inetsrv directory (path would generally be C:\Windows\System32\inetsrv).
appcmd delete site "Default Web Site"
Or you can change the port for the default web site in IIS, with:
appcmd set site /site.name: "Default Web Site" /+bindings.protocol='http',bindingInformation='*:8000:']
appcmd set site /site.name: "Default Web Site" /-bindings.protocol='http',bindingInformation='*:80:']
(8000) is for instance, use any high number you like.

Hosting TeamCity 8.1 & YouTrack in IIS 7.5

I am a newbie to IIS (and administrative tasks in general). I am trying to host TeamCity and YouTrack in IIS to allow other web applications to be run on the same port. Solving the issue for TeamCity should also solve it for YouTrack, so this post is only about getting TeamCity to work.
I have followed the guide on A Step by Step Guide to Hosting TeamCity in IIS 7 but I cannot get it to work. Whenever I enter teamcity.mydomain.com into the browser I end up at the default website (default IIS website that comes when installing IIS).
TeamCity is set to run on port 8080. Entering localhost:8080 in the browser opens up the TeamCity start page. Entering teamcity.mydomain.com opens up the default IIS website (as mentioned above).
The port number I changed in server.xml (TeamCity) is the one on the following line:<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
The server farm for TeamCity is using IP 127.0.0.1 (is this correct, or should it be the internal IP on the LAN?). URL rewrite rule has been setup according to the link above: Using wildcards with "*" pattern and a local grouping with {HTTP_POST}, Matches the Pattern, where pattern is "teamcity.mydomain.com". The default IIS website is unchanged.
Any help would be highly appreciated.
Set BaseUrl as teamcity.mydomain.com

Check if SAP Content Server is running

I'm trying to install SAP Content Server 6.40 onto a Windows Server 2008 R2 virtual machine.
I've read through several installation manuals and how-tos on the web. But can't seem to get it running.
The installation SAP is pretty straightforward. You have to choose SAP NetWeaver 7 element in the installation packages tree, then Standalone Engines -> Content Server -> content Server and or Cache Server. From thereon there you follow the instructions and the installation completes successfully.
The next step to follow is to check whether the server is running via
http:\\<servername>:1090\ContentServer\ContentServer.dll?serverInfo
The Content Server version should be displayed, but it is not.
I tried it with the actual domain, with localhost and the loopback address(es) (127.0.0.[n]) from within the VM.
Before the installation I did set up the IIS (http server). I tried it with configuring the running IIS (i. e. creating a site and pointing it to the Content Server directory - although it is aparently not needed as per the manuals I've read) and without.
QUESTION
What could be the causes resonsible for the issue I'm facing. Why are the Content Server DLLs not reacting to access per http?
One has to allow the ContentServer.dll to be executed.
To do so visit the ISAPI and CGI Restrictions, there you have to
add the aforementioned dll.
You have to install certain Role Services for IIS first (in Application Development).

Creating Web-Site and Web Application in IIS

Till date, I was thinking that we always create/host web-site in IIS.
But I was going through powershell tutorial today which says it is different to create web-site and a web application.
This is the tutorial link (check different section on creating web site and application) -
http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/
Can please guide what is the difference between the two.
Any example will be really helpful.
Thank you!
A web site in IIS is the top level under Sites. The default one that is normally automatically created for you when installing IIS is named "Default Web Site".
This is the "root" that runs on port 80.
Under that, you can create virtual directories, which is basically sub-levels under the root web site, or you can create separate web applications that lives as separate applications under the root level.
A web application must live under a web site.
It is possible to create other web sites that can either be set up to run on other ports (i.e. 81), or to be named with a different host name which enables multiple sites to run on same port number. If named with a different host name, this name must be registered in a DNS server somewere to point to the IP address for your server. A workaround is also to to add it as an entry in the hosts file on the client computer that should access it.
This is example on how it looks in IIS Manager:
I have a script I use when creating a website and AppPool in IIS 7+, .net4, Integrated pipeline and thought you might find it useful.
Use it as so:
CreateSite.ps1 [WebsiteName] [AppPoolName] [Port] [Path]
If you are reinstalling the site, you will need to Stop it first. That is done as so:
StopSite.ps1 [WebsiteName] [AppPoolName]
you can grab the scripts from my gist
Update I have added/extended the scripts and put them in their own Github repository
Here is my CreateWebsite PowerShell script: http://www.zerrouki.com/create-website/

Recreate the default website in IIS

I've accidentally deleted the default website in IIS; It no longer shows up in the tree of IIS manager and browsing "localhost" returns a 404 error.
I've re-installed IIS, but the default website still doesn't exist... Is it possible to recreate the default website so I can create my folder inside?
Other answers are basically right, thanks to them I was able to restore my default web site, they're just missing some more or less important details.
This was the complete process to restore the Default Web Site in my case (IIS 7 on Windows 7 64bit):
open IIS Manager
right click Sites node under your machine in the Connections tree on the left side and click Add Website
enter "Default Web Site" as a Site name
set Application pool back to DefaultAppPool!
set Physical path to %SystemDrive%\inetpub\wwwroot
leave Binding and everything else as is
Possible issues:
If the newly created web site cannot be started with the following message:
Internet Information Services (IIS) Manager - The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
...it's possible that port 80 is already assigned to another application (Skype in my case :). You can change the binding port to e.g. 8080 by right clicking Default Web Site and selecting Edit Bindings... and Edit.... See Error 0x80070020 when you try to start a Web site in IIS 7.0 for details. Or you can just close the application sitting on the port 80, of course.
Some applications require Default Web Site to have the ID 1. In my case, it got ID 1 after recreation automatically. If it's not your case, see Re-create “default Website” in IIS after accidentally deleting. It's different for IIS 6 and 7.
Note: I had to recreate the Default Web Site, because I wasn't able to even open a project configured to run under IIS in Visual Studio. I had a solution with a couple of projects inside. One of the projects failed to load with the following error message:
The Web Application Project is configured to use IIS. The Web server 'http://localhost:8080/' could not be found.
After I have recreated the Default Web Site in IIS Manager, I was able to reload and open that specific project.
Did the same thing. Wasn't able to recreate Default Web Site directly - it kept complaining that the file already existed...
I fixed as follows:
Create a new web site called something else, eg. "Default", pointing to "C:\inetpub\wwwroot"
It should be created with ID 1 (at least mine was)
Rename the web site to "Default Web Site"
I suppose you want to publish and access your applications/websites from LAN; probably as virtual directories under the default website.The steps could vary depending on your IIS version, but basically it comes down to these steps:
Restore your "Default Website" Website :
create a new website
set "Default Website" as its name
In the Binding section (bottom panel), enter your local IP address in the "IP Address" edit.
Keep the "Host" edit empty
that's it: now whenever you type your local ip address in your browser, you will get the website you just added.
Now if you want to access any of your other webapplications/websites from LAN, just add a virtual application under your default website pointing to the directory containing your published application/website. Now you can type : http://yourLocalIPAddress/theNameOfYourApplication to access it from your LAN.
You can try to restore your previous state by doing the following:
Go to IIS Manager
Right-click on your Local Computer.
Point to All Tasks
Point to Backup/Restore Configuration
Select the configuration you want to restore
Wait untill configuration applies
Check out this answer on SuperUser:
In short: Reinstall both IIS and WAS.
In details -
Step 1
Go to "Add remove programs"
"Turn windows features on or off"
Remove both IIS and WAS (Windows Process Activation Service)
Restart the PC
Step 2
Go to "Add remove programs"
"Turn windows features on or off"
Turn on both IIS and WAS (Windows Process Activation Service)
Note: Reinstalling IIS alone won't help. You have to reinstall both IIS and WAS
This approach fixed the problem for me.
Follow these Steps
Restore your "Default Website" Website :
create a new website
set "Default Website" as its name
In the Binding section (bottom panel), enter your local IP address in the "IP Address" edit.
Keep the "Host" edit empty
I deleted the C:\inetpub folder and reinstalled IIS which recreated the default website and settings.

Resources