Win Svr 08 R2 - IIS 7.5 - All sites went down after change without full privlidges - iis

Server: Windows Server 2008 R2 Standard SP 1 - 64bit
IIS: 7.5
3 websites hosted from these locations:
D:\WebApplications\TestAccessManager
D:\WebApplications\dg
D:\WebApplications\TestVM
All Application Pools are up and running, and have been restarted.
All Sites are up and running, and have been restarted. (a total of 7 sites, just don't need to list everything).
The "default website" points to \TestVM and has no DNS name, it is only accessed by IP address.
The second site test.accessmanager.com, and the third site test.dg.com.
6 of the 7 sites are inaccessible. The one that can be accessed, the default website, is accessed by IP.
Now, how this all started.
Yesterday a user account was setup for me to access this server.
Another developer wanted to put a secondary site as a sub-site within default website, so the files were all dropped into a child folder: TestVM\subsite\. However, because the subsite has a web.config, I then created a Virtual Directory and pointed it to that sub folder. We then started having even more issues, so I right clicked on the Virtual Directory and hit "Remove".
Next, we were told that both dg and accessmanager were down. So I removed the \subsite\ folder completely to eliminate that from the equation... but to no avail.
Now, the kicker to all of this... is that the user account I had been given, apparently didn't have admin privileges... which would explain why certain folders would prompt "You don't currently have permission to access this folder. Click Continue to permanently get access to this folder".
One of our guys here says that without full authority, certain registry keys could have gotten messed up while working in IIS, and that he's seen it happen in the past, and never successfully had it fixed without just recreating all the virtual sites and "starting from scratch" in IIS.
Thoughts? Need more info? Anything?

Related

iis 10 Static Website: Deleting default site and creating completely new site (how to access new site)

This post needs help from experienced iis administrators, but must be explained in details for EXTREME newbies.
What I am doing:
I have two computers, both running Windows 10. One is a desktop and one is a laptop.
iis is enabled on both computers. Each computer can access the iis web server from the other and pull up a page from the other - using the ip address.
There is no DNS or host files being used (this is by ip address only), nor do I want to use any sort of naming.
Both computers are running an identical website, and the website files are in a different directory than the default. The structure is like this:
C:\inetpub\ROOT\myWebsite\myIndex.html
web.config
Changes I've made - now a few problems.
On both computers I have deleted the DefaultAppPool and the default website that comes installed with iis. This has not stopped the website from completely working, so adding that back seems unlikely to fix my problem.
I have deleted my application pool and website from iis (never deleting the actual files from the file system) several times, and added it several times. Each time I do this, my site comes back, but with the same problem I am having.
I have deleted all of the default documents, and the only default document listed in iis is myIndex.html.
myIndex.html initially displays a graphic image (using the standard tag), and this image comes up. Sort of. See explanation below.
The problem I am having
Before I started this project, I had iis working on the desktop with the default site and app pool and simply added some of my own files with really simple text content and some pics. I had replaced the default iis splash image with my own image, and all that worked with no problem.
the image that comes up is a link to another page that has a list of links to other stuff in my website. It all works no problem there.
Now, with the setup I have now, on the desktop I was originally using (in the paragraph above) if I pull up my website locally, myIndex.html loads in the browser and my image comes up, and everything works fine.
The same is true on the laptop, when I access the site locally.
However, if I attempt to access the desktop site (using its ip address) from the laptop, it pulls up the old splash image from the default site I deleted.( I left those files there even though I deleted the site from within iis). All those files are in the default location C:\inetpub\wwwroot.
If I move those files to another directory, thus leaving C:\inetpub\wwwroot completely empty, then when I access the site on the desktop (via the ip address) from the laptop, my new site comes up without a problem.
While it seems I may have solved my problem by moving the file from the previous project, doing that does not teach me how iis is actually working, and why files from a website that no longer exists in iis are still being accessed from remote computers.
So, please teach me something about the internal workings of iis, and how it chooses to access the different application pools and websites.
Again, please word your answers for complete newbies, because I know a little but not enough to get real technical.
I have been reading posts on stackexchange.com and other sites; links to microsoft docs etc. That's not helping as those docs are expecting too much prerequisite knowledge, and speaking in terms that are not really explaining things in a way I can understand.
You have described several different problems. I will try to address each of them (contrary to S/O recommendations).
First, when you make changes, and they don't seem to show up, it is usually because of caching. IIS always wants to cache files/configs. So does your web browser. So, to force an accurate test, you need to dump your browser cache and cycle IIS (to make sure it drops its cache and loads new files and configs). Start there.
Second, IIS is designed for settings inheritance. Which means, each app and each folder will inherit settings and permissions from the parent, unless you override them. Overriding them can be done by files and/or IIS configs (application vs folder). The IIS configs are the stronger of the two.
Also, the IIS config for "default files" might have come into-play for your test. If you didn't set up MyIndex.html as the top-most default file, then IIS would look for other files first. In fact, if you don't have MyIndex.html in the list of default files, IIS would have to depend on your app to choose that as a default page (MVC routing, etc).

Website not working in IIS 7 using the IIS Manager

I have Microsoft Windows server 2008 R2 and have the IIS 7 running.
I have coded a web application on a seperate laptop and would like to publish it now on my server (serves as AD, DNS, File Server, IIS) that runs locally and has no external access. We will be using the application internally only.
I have followed the steps to install a website on IIS, however, it does not work. Below are the steps I have done.
Created a folder hierarchy and pasted the code files there. (check below image. The code files are inside wwwroot)
Create a new website from the IIS Manager as the below image.
The wwwroot folder has SYSTEM permission and it inherits the permissions from the parent. (Does it need to have other permissions?!?)
Whenever I visit the website, I get an error that the page is not found.
UPDATE
Upon #Ravi A's answer below, I have tried his steps as the below image, but the username is not found and the error persists.
Any ideas what is wrong?
windows iis website
You need to add a binding in your DNS i.e. ping mysite.local should resolve to the server IP, in your case since it's a intranet it should resolve to 192.168.1.253.
See here on how to do it. You need access to DNS Manager.
Also since you are not clear on DNS mapping leave the hostname empty and use machine name or IP to browse the site.

WSCONFIG on ColdFusion 11 and ColdFusion 10

I have a Windows 7 virtual machine that has ColdFusion 9 installed for development and testing. I need ColdFusion 10 and 11 as well for other projects.
ColdFusion 9 is running perfectly, but when I spin up ColdFusion 10 or 11 and try to use WSCONFIG to configure a site in IIS, I get the following list of sites:
https://www.dropbox.com/s/v7mdgha536shk9t/Screenshot%202015-05-21%2023.29.14.png?dl=0
In reality each site in IIS has a separate name and when I delete a the site that each one is named after, in this case "cfadmin", all of the remaining sites show up in WSCONFIG as another one of the site names.
I have never had this problem before. Can anyone point me in the right direction?
Update:
As suggested in the comments, here are the results when I launched a command prompt as Administrator and ran the suggested command:
C:\Users>%windir%\system32\inetsrv\appcmd list sites SITE "cfadmin"
(id:3,bindings:,state:Unknown) SITE "mccalmon"
(id:1,bindings:http/:80:,state:Unknown) SITE "Virtus"
(id:5,bindings:,state:Unknown) SITE "EMSA"
(id:9,bindings:,state:Unknown) SITE "Classic"
(id:10,bindings:,state:Unknown) SITE "Test"
(id:2,bindings:http/:80:local.test.com,state:Unknown)
All of your site "state" are "Unknown". The problem seems to be with your sites only. If appcmd is not able to identify the correct state, then, ColdFusion will definitely not be able to recognize the same. The sites state would be unknown, if the IIS Server is stopped/shut down.
For e.g, my server shows the below information with the "%windir%\system32\inetsrv\appcmd list sites" command.
SITE "Default Web Site" (id:1,bindings:http/*:80:,state:Started)
SITE "CF9" (id:2,bindings:http/*:81:,state:Started)
SITE "CF10" (id:3,bindings:http/*:82:,state:Stoped)
SITE "CF11" (id:3,bindings:http/*:83:,state:Started)
You can try IISRESET in command prompt to restart IIS. Then, launch the Web Server Config tool as administrator and create the connector.

virtual directory not being configured as an application in IIS

hi i am comletly new to iis and asp.net i am trying to setup bugNET on a godaddy server. i created a virtual directory and once i tried to launch the site i get this error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
here is complete detail of what i did.
hosting: godaddy
created virtual directory (child folder of root) - named: devbunk with these settings (anonymous access, directory browsing)
that is all i can do to with iis on godaddy.
the error tells me that i need to turn the virtual directory as an application. godaddy doesnt let me do that... how do i do it? btw, i have iis7 setup.
You can configure this with Godaddy Hosting Control Center. log in to godaddy hosting center.
Go to Content >> IIS Management.
Click on the pencil icon to edit your selected directory.
you will get a popped up screen with three check boxes. You need to check the one that says "Set Application Root".
Click Ok and your directory will be configured as an application in IIS.
Hope this helps you and feel free to ping me if you need more info.
You need godaddy to do that, usually hosters do offer the ability to convert a regular folder as an application through their Control Panel, so if you have access to one search for that option. Other hosters give access through IIS Manager and Web Deploy to convert folders to applications as well, but it boils down to "you need your hoster to do that".
There are no ways for you to do that through Web.config or FTP or etc. I think Front Page Server Extensions did had a way as well. The best thing is contact your hoster and ask them what is the right way of doing this. Usually all hosters will allow you to create as many applications as you need as long as they run the same .net version.
Check the properties on Web.Config to ensure "Copy to Output Directory" is set to "Do not copy"

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