Or: how do I find the IIS metabase paths in Windows 7?
I used to just run aspnet_regiis -lk, but this is "Not supported in Windows Vista" according to aspnet_regiis help...
This is because starting with Windows Vista, a new version of IIS is shipped (IIS 7) which is a LOT different in many ways than the older IIS architecture.
To control the new IIS, you should either be using the IIS manager (UI) or if you want a console tool take a look at C:\Windows\System32\inetsrv\AppCmd.exe
If you want to list the app pools and their .NET versions:
> appcmd list apppool
APPPOOL "FlexLabs Bak" (MgdVersion:v4.0,MgdMode:Integrated,state:Stopped)
APPPOOL "OpenIdTest" (MgdVersion:v2.0,MgdMode:Integrated,state:Started)
APPPOOL "TestApp" (MgdVersion:v4.0,MgdMode:Integrated,state:Started)
Get the list of applications in IIS:
> appcmd list app
APP "FlexLabs/" (applicationPool:FlexLabs)
APP "TestApp/" (applicationPool:TestApp)
Get the list of Sites:
> appcmd list site
SITE "TestApp" (id:4,bindings:http/*:82:,state:Started)
(Note: these are examples, not all the actual data from my machine :P )
It can do a lot more then list, of course.. and in some ways it's a lot more powerful than than IIS manager.
Anything specific you're looking for?
UPD:
Quiting from here: http://mvolo.com/blogs/serverside/archive/2007/07/21/Anatomy-of-an-IIS7-configuration-path.aspx
If you have worked with IIS6 and previous versions of IIS, you are most likely familiar with the IIS metabase paths. You know, the ones that look like LM/W3SVC/1/ROOT. These metabase paths serve as a mechanism to identify a part of the IIS website hierarchy, or a url therein, for the purposes of read/writing their configuration settings.
[...]
IIS7 repaces the metabase with a whole new configuration system, based on a distributed hierarchy of XML configuration files also used by the .NET Framework/ASP.NET. This confguration system is fundamentally different from the metabase
Definitely check out this article, as I think it's exactly what you're looking for in this case
Also, see more info about it here:
http://learn.iis.net/page.aspx/125/metabase-compatibility-with-iis-7/
Basically you can install the "IIS 6 Metabase Compatibility" server role, and have some control over it with some old tools and scripts :)
Related
I have an asp.net project and I want to install it on iis in another computer
with windows 7(this computer doesn't contain VS)
what I need to install for upload this web site???
and how I upload this web site in iis7?
Thanks
For hosting application on iis In windows7. Please follow the steps.
Open inetmgr.
Create new appool for your application. The apppool version should be equivalent or greater than the version in which you developed the
application.
Right click on default site and create virtual directory.
Select the apppool you created for the application in dropdown.
Give the physical path of your application and Alas name to call your application from browser.
After that you can configure default document, authentication etc.. based on your need.
Then, browse the application to make sure it works.
I hope your windows 7 has iis installed and asp.net is registered in iis. If not, please install the same and regester iis with aspnet_regiis and a option -i Before start hosting.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
For hosting, vs not needed. Windows 7 comes with .net 4.0 by default.
For more details, please refer iis.net site or msdn site for step by step process with graphical example.
As part of our .NET deployment process we'd like to make a new website on IIS. The idea is to be able to run another set of smoke tests before making a site live - plus being able to immediately roll back to a previous version should something go wrong. We hope to have this all hooked up to Jenkins.
While IIS7 has a comprehensive suite of tools that allows us to throw together and configure a new website via PowerShell, IIS6 shares no such luxury.
While upgrading to IIS7 would obviously solve our issues, our servers currently run on Windows 2003.
Is there a way to do what we want in IIS6? Are we going about the issue the wrong way?
IIS6 configuration is stored in 2 xml files, MetaBase.xml and MSSchema.xml located in %SystemRoot%\System32\Inetsrv.
Check these links about available scripts for managing IIS sites, application pools etc:
Internet Information Services (IIS) 6.0 Resource Kit Tools
Managing IIS Configurations Using Scripts (IIS 6.0)
Administering Servers from the Command Line in IIS 6.0 (IIS 6.0)
How to manage Web sites and Web virtual directories by using command-line scripts in IIS 6.0
Regarding configuration of sites like default page, .NET version etc I couldn't find any script for that on Technet. But if it is in configuration xml, I think you can create some command line tool for that.
I am developing ASP.Net project (framework 2.0) on local machine (Windows 7). IIS 7.5 is the local webserver.
When I run the project locally Environment.GetFolderPath(Environment.SpecialFolder.InternetCache) returns empty string.
I am a bit sheepish and frustrated since I encountered this issue when I setup this new dev machine, but cannot remember the solution and cannot find solution by Googling. Others on the dev team running XP do not encounter this problem.
I am expecting a return of C:\Users\DefaultAppPool\AppData\Local\Microsoft\Windows\Temporary Internet Files.
Not sure if this a iis setting issue or can I set the environment variable somewhere.
Thanks, Jeff
I'm 99% sure this is going to come down to a permissions issue. In IIS7, there is a new "user" called AppPoolIdentity that is the default identity for an app pool. This user has much lower permissions than the defaults in IIS 6.
I can reproduce your issue, I have to set my AppPool to run as either LocalSystem or a specific user with administrative rights to retrieve Environment.SpecialFolder.InternetCache which makes sense when I look at the folder in question and view it's permissions.
Be aware, there are security issues with running IIS app pools with higher permissions.
I'm trying to get Cruisecontrol.NET running with Server 2008/IIS7 and when I try and navigate to the dashboard I get the following error:
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
I'm a bit lost in IIS7 so it could be something pretty straightforward. They (cc.net) do some funny stuff with http handlers in the web.config which may be related to the problem:
Anyone have any pointers?
Is the dashboard set up as an application in IIS?
I've not used IIS7, but I know in IIS6 you need to enable an application and assign it to an app pool before you can run ASPX code.
EDIT: This works in IIS6.
Open the IISAdmin tool on the web server. Expand the web sites folder. Find the virtual directory (directories?) for CruiseControl. Right-click on it and look at properties. On the directory tab, create a new application and give it a suitable name. Enable the application to execute "scripts only". Assign it to an application pool (you may want to create a new one just for this application -- consult the help documentation for this). You may also need to change the ASP.NET version You can do this on the ASP.NET tab -- choose either v1.1 or v2.0, whichever CruiseControl requires.
In Vista, go to Windows features in the control panel. there is a section there for IIS and you will find the scripting setting under the IIS 6 compatibility section
I just had this same issue when I installed CCNET 1.5 under Windows 7/IIS 7.5
You need to configure the app pool for the ccnet site. Under the Basic Settings for the application pool, set 'Managed pipeline mode' to 'Integrated'.
We create new sites in IIS 6 (Windows Server 2003) using IIS Manager. When these sites are created in IIS 6, the ASP.NET version defaults to ASP.NET 1.1. We would like it to default to ASP.NET 2.0. The reason this is a problem for us is that when you take any site on the server and switch the ASP.NET version from ASP.NET 1.1 to ASP.NET 2.0, all web sites recycle.
Is there a setting in the IIS metabase that controls this or a way to create a site via script that sets the ASP.Net version correctly so that we can avoid the IIS reset when setting up each site?
As already mentioned by another, I reference this post whenever I need to change the .NET settings for a site.
As for your question, the following steps (summarized from the linked post) should achieve what you need:
Run aspnet_regiis -lk from any .NET framework folder to list your current settings to help you determine which sites should remain using .NET 1.1. If you know there is a .NET 1.1 site, but it is not explicitly listed by this command, then it is inheriting from the root W3SVC/.
For all .NET 1.1 sites not explicitly listed by the previous command, you will need to force them to use .NET 1.1:
Determine the Identifier ID of the site(s) which you want to force to use .NET 1.1. (Through the IIS 6 Manager, you can determine the Identifier of a site by clicking the "Web Sites" folder on the left side of the tool. On the right side, all your sites will be listed, and the Identifier column shows the ID.)
From the .NET 1.1 framework folder, run aspnet_regiis -sn W3SVC/<Identifier ID>/ROOT/ where <Identifier ID> is the ID of the site which you want to force to use .NET 1.1.
Finally, change the root W3SVC/ to use .NET 2.0 so that all newly created sites will inherit from the root and default to use .NET 2.0. To change the root, from the .NET 2.0 framework folder, run aspnet_regiis -sn W3SVC/.
You can run aspnet_regiis -lk again to verify your settings.
Be warned, running aspnet_regiis -i will remap all of your IIS websites to 2.0. If you have existing 1.1 applications that you want to keep, run aspnet_regiis -ir instead. This will set 2.0 to be the default runtime for IIS, but it won't change the script mappings for existing sites.
Find the directory for the version of .Net you want, for example;
C:\Windows\Microsoft.NET\Framework\v2.0.50727
Get a cmd prompt there and then run aspnet_regiis -i.
Further info # http://weblogs.asp.net/owscott/archive/2006/05/30/ASPNet_5F00_regiis.exe-tool_2C00_-setting-the-default-version-without-forcing-an-upgrade-on-all-sites.aspx
Ryan
The following will set the default website to ASP.NET 2.0:
C:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -sn W3SVC/
Child applications inherit the ASP.NET setting from the parent, so all children will have the new setting.
Alternatively run as variation on this command after setting up the new application.
Rob
Simple answer: Open IIS Manager. In navigation pane, find the .NET2 web site and right click on it. Select "Properties". Then select "ASP.NET" tab. First dropdown on that screen gives you option to select a different version of .NET.
Please be aware -- when I did this, all of the web sites on the web server stopped running. Microsoft support told me that .NET1 and .NET2 should not be run from same general area (default web sites) of the web server. Solution is to create an application pool on the web server for either .NET1 or .NET2 sites and then use that to isolate all sites running the "other" version of .NET. Instruction for creating an application pool can be found under "help" in IIS Manager.
You can create just one application pool and put all sites with same .NET in the same pool or you can create an application pool for each application. Your choice.