How can I duplicate a website's settings in IIS7? - asp.net

I'm going mad trying to get an ASP.NET application running on IIS7 (Server2008).
I have one web site set up in IIS7 which works fine. I'm trying to create another one now but I only get 404s for all .aspx files. The Handling Mappers are all different from the working site's.
Is there any way I can duplicate the working site's settings so I don't have to go through 50 mappings manually.
Or is there a better way to get the correct settings?
removed dead ImageShack links

IIS7's default configurations are held in c:\windows\system32\inetsrv\config\applicationHost.config
Any changes you make on a per site/application basis are stored in the web.config for that site/application.
You should be able to simply copy the files onto the second server.

If you are merely trying to re-install the default ASP.NET mappings, the best way to do that is use
aspnet_regiis.exe
which is in the %windir%\Microsoft.NET\Framework\v___ folders (depends on which version you're trying to set -- looks like 3.5?)
Use the documentation at http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx to see whether you want to use the -i, -r, or -s option.

For IIS 5 (and 6?), Microsoft had a free download called MetaEdit. It was used for just this - backing up and restoring an IIS configuration from machine to machine. Check MS's web site to see if there is an updated version for IIS 7.

Related

Why is Railo in conjunction with IIS performing slowly?

I have ColdFusion installed in my machine.
Just now I have downloaded and installed Railo.
I have stopped the ColdFusion application server.
I have created a simple app and mapped with IIS.
Railo is taking huge amount of time to run a single .cfm file.
So can anyone please suggest how Railo With IIS should be configured so that it will run faster?
It works fine with Tomcat, but I want to use it with IIS.
IIS is trying to connect to ColdFusion before Railo
, but as you've stopped the CF service it's just waiting for the timeout.
You should remove/disable the ColdFusion connector.
The Handler Mappings can be defined at different levels in IIS; server level or website(s) level. If they are defined at the server level then each website will inherit those properties and chances are your Railo website has them too.
If they are defined at the server level you should be able to remove them under your Railo's website level without affecting any other sites. But be careful to remove the correct one(s) because Railo needs to have mappings for it to work as well. See this page for what it should look like for Railo with IIS.
For the existing Handler Mappings tied to your Adobe install, click on the website for your Railo install. Double-click the Handler Mappings icon. The Adobe install creates four mappings.
cfcHandler - path is *.cfc
cfmHandler - path is *.cfm
cfmlHandler - path is *.cfml
JWildCardHandler - path is *
The Adobe ISAPI DLL assigned for the first three handlers is something like C:\JRun4\lib\wsconfig\jrun_iis6.dll (depending on your install). For the JWildCardHandler handler the executable is something like C:\JRun4\lib\wsconfig\1\jrun_iis6_wildcard.dll. Check to see how yours are assigned. The Railo installation may have overwritten some or all of these.
According to the page that I linked above Railo only creates handlers for *.cfm and *.cfc and they should point to the Railo ISAPI DLL. You should remove any of the Adobe handlers that still exist under your Railo website. I am guessing that the JWildCardHandler is the culprit here and it is trying to pass your requests to the Adobe install.
NOTE: If you remove the handlers in this way, under the Railo website, the changes will be written to the web.config file in the root of your Railo website. If you make a backup of this file before making changes then you can always revert back to what you had.
Go into the web site properties, handlers
select coldfusion handler
delete it

aspx problems while switch webhost

my friend have a site whole written in aspx (i dont know much about it).
we are trying to switch his web-hoster. we opened a new account (in a web-host site that supports everything we need) and moved all the files AS IS to the new web hoster.
now we get a:
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
what where we doing wrong? is there anything we need to concider besides putting the files in the new web-hoster...?
thanks.
Try http://yourwebsite.com/yourwebpage.aspx if this works then your deployment is correct. Now what you want is set the default page to "yourwebpage.aspx" as already commented by Brandon. Different host service provide different ways to do this. First let us know if http://yourwebsite.com/yourwebpage.aspx works. Also provide your host service provider name will look into their documentation and tell how to setup default page
It sounds like the website could have been running a url rewrite module which would require the server to pass all requests via asp.net using wildmapping.
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true
There are different ways this is handled depending on the version of IIS you are using. There is also limitations on this depending on your hosting environment.
A couple of questions that might help identity the issue
Was the previous hosting environment shared or dedicated/virtual
Was the previous hosting environment Windows 2003/IIS 6 or windows 2008/IIS 7
Is the new hosting environment shared or dedicated/virtual
Is the new hosting environment Windows 2003/IIS 6 or windows 2008/IIS 7
Before and application can run, you need to specify that the folder is an asp.net application. There should be a way to do this through your control panel, if not contact the vendor

ASP.NET - Publishing a web site to IIS

What is the difference between publishing a website to {localdrive}\inetpub\wwwroot and anywhere else on the web server e.g. C:\Website.
I have noticed that I am always left with a directory and a website in the IIS console if I publish to {localdrive}\inetpub\wwwroot.
After reading articles on MSDN, I am still unclear of the difference. I realise that there is probably a simpe answer to this, but I cannot find it.
The web path / is already mapped to c:\inetpub\wwwroot, so /abc is mapped to c:\inetpub\wwwroot\abc automatically.
When you publish to c:\website, you need to set up a virtual path manually.
Nothing too much as your website path in IIS can point to any directory. However, that being said always double check your directory permissions and security settings. In addition, I guess if a hacker did compromised your webserver... the default c:\inetpub\wwwroot is well known.
And just for good measure in case you are having issues - check out the Aspnet_regiis.exe tool on MSDN as it usually solves a lot of issues for folks.
{localdrive}\inetpub\wwwroot is usually used for the default web site that comes with IIS.
Additional Microsoft products use the same directory and take advantage of the virtual directories that exist in the default site.
If this is your personal web site, or a web site you created from scratch, you can publish anywhere you want.
Before you publish, you need to make sure IIS knows where the directory will be, and you need to assign the correct permissions for that folder.
The default website in IIS is mapped to C:\inetpub\wwwroot by default, so publishing to wwwroot makes it easy to add applications as virtual directories.
However, you can publish wherever you like, and either point a virtual directory or new website at your publication location. You simply need to make sure user the App Pool is running as (usually IUSR under IIS7, IUSR_MachineName under previous versions) has read/execute permissions on the folder you are publishing to.
Although they say Virtual Directory created by default for your website in wwwroot and you don't have to configure it again. Many times I found we still have to go there and click on Remove and then click on Create button again :)
Thus it is almost no problem if you create your website outside wwwroot, only difference outside you have to give full path of VD and inside you have to click Remove and then Create button
The problem I had was different from all of the above. I was trying to publish in "C:\inetpub\wwwroot" and the publish failed every time. Than i changed the publish folder to another and it worked. When I launched visual studio as administrator I could copy to C:\inetpub\wwwroot also without problems

How to set up a asp.net application on IIS

I've copied a whole folder which keeps a website inside from a web server to another computer.From the original server I can easily run the web application. Now I need to know what exactly I have to do in order to be able to run the application on the second computer too. I think there are some special considerations with IIS. What and how do I have to set up in IIS?
Follow these steps.
create a new site from left menu By right clicking and add new website.
Give physical path to that folder
Map with the site url
Give permissions to Directory as (like everyone)
Set up the default page if (index page is not present in the directory)
Set framework which ever you are using.
Install the IIS Windows component for whatever version of Windows you're using.
Create a new site in IIS
Point this new site to your web root
Configure DNS for the site (maybe using your hosts file)
There are some considerations to make depending on which version of IIS you are using. It would be helpful to know if you are using 6 or 7.
If you are under 7, you need to copy the site to your IIS directory (typically wwwroot) and then setup the basic settings in IIS by choosing your application pool and such. Application pools are typically (but not always) setup by .Net Framework. You may need to setup your default page and set it as an application. There are many blogs and sites out there that will tell you how to setup this basic functionality but are specific to your application.
For configuring IIS
1. Firstly, in Programs and features go to Turn on and off windows features...in that tick everything under IIS..go to sub folder and tick everything everywhere
Go to Internet Explorer> Setting> Internet Options> Advanced> untick Show friendly http error messages option
Go to IIS manager
a. In default application pool> advanced settings > Set true enable 32-bit program option
b. Go to Asp> setting> expand debugging properties> there will an option of error messages some 2nd last or last option that would be false...set it to true..apply changes
Run vbscript and asp only in Internet Explorer (edge 10 in developer options for pop ups)

How to copy iis property settings from one server to another

I just needed to copy the Default Website Property settings everytime a new test server is to be set up. It is tedious to compare and do that manually everytime and there is a chance of mistakes.
I know we can use the Web Deployment Tool to sync websites between a local and remote IIS server. But all I need is copying the iis settings and not the websites in it.
If I use the Web Deployment Tool it copies even my website files which are on the Default Web Site (No Virtual Directory).
I see you've tagged your question with IIS5. I've used the metabase import export tool before with some success, although it is targetted for IIS6 so I don't know if it would work for you. Perhaps worth looking at though:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/637e4ec0-d9ef-4115-935b-47087870e01a.mspx?mfr=true

Resources