IIS 7.5 - no default site / no http binding - iis

I enabled/installed IIS on my win 7 home premium hoping to be able to run asp pages on my comp.
There are two issues that I don't know how address:
1- I don't see the Default Website in the IIS Manager
2- I don't have http option under binding
This is what I did...
I enabled/installed IIS 7.5
Control Panel - Programs - Turn Windows Features On or Off
checked everything under "Intenet Information Services"
checked everything under "Intenet Information Services Hostable Web Core"
I open the IIS Manager and see three panes (windows):
Connections on the left
Features or Content view in the middle section
Actions on the right
This is my question # 1: Any idea why I don't see any default site in the connections pane?
Server name
Application Pools
Sites (folder)
**** nothing here !!! ****
My question #2 relates to binding... when I want to set up a new site, I do the following:
(in Actions pane) - add web site
site name:
app pool: ASP .NET v4.0
Physical path: C:\inetpub\wwwroot\testsite
Under binding type, these are the options that I see... but there's no http option available.
Binding type:
- net.tcp
- net.pipe
- net.msmq
- msmq.formatname
Any idea why and/or what to do to have http option available?
I should probably mention that I am running xampp 1.8.0 on my comp as well on port 80.
127.0.0.1:80.
Any tips or suggestions are appreciated!
Thanks!

I had the same issue and the only solution was:
Remove WAS (Windows Activation Services)
Remove IIS
Reboot
Install WAS
Install IIS
Reboot
open the IIS and see the default web site with both HTTP and HTTPS bindings

Related

Host asp.net core app in IIS to access from other PC's inside the network

How can i host my Asp.Net Core (1, 2 or 2.1) web app in Windows IIS to be able to access it from other PC's in our local network (or my Virtual OS)? My PC is a Desktop Windows 10 Pro (not Win Server).
I have followed the Host ASP.NET Core on Windows with IIS article, but i can't get it to work.
What i did based on that article is as following:
Ensure Prequisites: Visual Studio 2017, Install Asp.Net Core 2.1 SDK, Add Internet Information Services (IIS) from Turn Windows features on or off, Asp.Net Core Hosting Bundle Installer from here (verified AspNetCoreModule module in IIS) and then:
Publish a default asp.net core app in Visual Studio (Build > Publish > Folder) to a folder and copy its contents to D:\publish1.
in IIS, right-click Sites > Add Website... and use these values (according to the picture shown there):
[Site name]: mysite_com
[Physical path]: `D:\publish1`
[IP address]: `All Unassigned`
[Port]: 80
[Host name]: mysite.com
Also change Application Pools > mysite_com > Basic Settings > .Net CLR Version to No Managed Code.
Now, my web app can't be reached in browser when i tested http://[IP of my PC]/mysite.com or similar addresses.
So, What's wrong with these IIS settings?
Edit: It seems that this is not specific to .net core 2.1 only (the instruction is mainly the same when you change the .net core version of article), so i modified the title and question.
I found the solution and want to record it here as it may be helpful for other ones. Its interesting that the Microsoft doc does not explain all details for such a common scenario as when you want to run you web app in an intranet network like as building of a large office. Here is the required IIS settings:
Ensure you have IIS (Turn windows features on or off > internet information services)
Ensure Asp.Net Core Host Bundle is installed: dotnet-hosting-2.1.1.exe: AspNetCoreModule in IIS can be verified from IIS Manager > Web Sites > any website eg Default Website > Modules.
Publish your asp.net core app in Visual Studio (Build > Publish > Folder) to a folder and then copy its generated files to other desired destination path (eg D:\publish1) to avoid file lock issues for next code updates.
in IIS, choose Application Pools (from the left tree view above the Sites), right-click > choose Add Application Pool > Name: myAppPool, .Net CLR Version: No Managed Code. (for .Net Core Apps)
Find your IP address: run ipconfig in the command prompt (in windows 10, it is under Ethernet adapter: IPv4 Address, eg: 192.168.103.xyz).
Now, there are two options: A) Add Website, or, B) Add Application inside Default Website
A) Add Website => http://192.168.103.xyz:890
in IIS Manager, choose "Sites" node from the left tree view > right-click > Add Website... >
[Site name]: myApp
[Application Pool]: Select:myAppPool as specified in step 4. if you didn't create it in before, IIS will add a new pool based on your SiteName which you can edit its Basic Settings later in Application Pools tree view node to set its .Net CLR Version to No Managed Code.
[Physical path]: path to your published files (eg: D:\publish1)
[IP address]: can change it to your IP (from drop down) or left it to `All Unassigned`
![Port]: must be something other than 80! (eg: 890), it must be a free port not taken by other apps. you can test different values if some fails. in my case, port 4, 100, 200, 1100 works; but 80, 110 (pop3 email) or 3000 not works as they are used/reserved for other means.
![Host name]: left it blank if you want to access this app from your network! It is required for real internet world wide web sites!
The key settings you may miss here is the Port (other than 80) and Host name (empty string) as noted above! Check this link to know about different port numbers: System Ports (0-1023), User Ports (1024-49151), Dynamic/Private Ports not assigned usually (49152-65535).
You can set more than 1 port number or IP for your site: choose [Bindings] from the right panel and edit or add the entries.
Allow your chosen port number through your Firewall to be able to access it from external PC's. For windows firewall go to: Windows Firewall with Advanced Security > Inbound Rules > New rule > [Port] option, specify your port number > ...
browse: 192.168.103.xyz:890 (using your ip address and choosen port number). If you don't set specific IP for your site (ie All Unassigned) then you can also browse localhost:890 to see your app.
B) Add Application (inside Default WebSite) => http://192.168.103.xyz/myApp
in IIS Manager, choose "Default Web Site" from the left tree view, right click > Add Application > choose a name for [Alias]: (eg: myApp), [Application Pool]: Select:myAppPool as specified in step 4, [Physical path]: your publish path (eg: D:\publish1)
browse: localhost/myApp in a browser in your own PC to test if you see your web application.
browse: 192.168.103.xyz/myApp (using your IP address) if you want to get it from other PC's on the network or a virtual PC.

Not able to browser created website in IIS

I have configured sites in IIS in Windows server 2012 (IIS version 6.2) but after successful configuration I am not able to browse the site, getting the error 'This page cannot be displayed' while browsing locally. And while using the URL with port number and browsing from remote getting http 500 error.
Have tried so many settings and changes like permission,directory browsing (enabling), setting up of the default page (start page), but with no luck. Same error, this error is common across all the 7 sites. All sites are of .net 4 version with properly configured app pools.
All required windows features have been installed.
Can any one advice in this regard?
Make sure IIS Apppool\{App pool name} has access to the folder the website is running from.
Make sure the you have the proper features installed by going through
Add Roles and Features -> Server Roles -> Web Server (IIS) -> Web Server -> Application Development -> ASP.Net 4.5

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.

How can I change the Start Automatically setting in IIS 8.5

I have a problem with a web site running on an IIS 8.5 server that is not started automatically when the server reboots. The site is originally installed through ServerManager, where there is this line of code:
site.ServerAutoStart = false;
Now I would like to change this setting through the IIS Manager interface.
In IIS 7.5 i can set a web site to start automatically by setting the Start Automatically property under Advanced settings. But this setting is gone in IIS 8.5.
I found a solution to my problem inspired by this question:
How to config application pool in IIS 7.5 automatically re-start when it was stopped?
It is possible to access and edit all the detailed settings through the Configuration Editor, which can be accessed through the Features View in IIS Manager. I realize that in the link Mr Mo sent, the Configuration Editor was used, but it is not specified very clearly how to access it.
Check it out:
http://blogs.msdn.com/b/benjaminperkins/archive/2014/01/07/configure-the-iis-application-initialization-module.aspx
I think it will solve the issue.

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