Can anyone suggest the best way of moving websites on server1 with IIS7 to server2 with IIS 7.5 on it? I've read some articles which suggest copying the applicationHost.config file while preserving the configProtectedData node, but I'm concerned there may be settings in the IIS 7.5 config that don't exist in the current IIS7 config which would be lost.
I've also seen suggestions of moving each site individually by using a command like this:
AppCmd.exe LIST SITE "My Site" /config /XML > mysite.xml
This method just takes too long to do this for dozens of sites. There must be a better way of moving all the sites at once to the new platform.
I think I found the solution that worked best for me. You need to export the shared configuration from BOTH 7.0 and 7.5 servers. Copy the exported 7.0 files to a temp directory on the 7.5 server. On the 7.5 server, copy the exported 7.5 administration.config file over the top of the 7.0 file, thereby replacing it. In IIS 7.5, point your shared configuration to the temporary directory. The point here is to use the administration.config from the new server and not from the 7.0 server. Been working great for me since. The problem seems to stem from the node moduleProviders in this file. They are all version 7.0.0.0 in the file from IIS 7, which IIS 7.5 does not like.
Using Web Deploy is probably one of the simplest ways, you can do that directly to the live server, or you could do it to an offline package (zip file) and then apply at any time.
Download at: http://www.iis.net/download/WebDeploy
Simple command line like:
msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server2 -whatif
-whatif tells it to just tell the differences that it would create, and If you remove it, it will apply all the changes to sync (if it does not exist it will create it).
Sample: http://learn.iis.net/page.aspx/446/synchronize-iis-7/
this is cool because it can bring also content files, COM objects, Assemblies in the GAC, registry keys, certificates, ssl bindings and more.
You can actually copy paste the complete appHost.config file except the <configProtectedData> section. Use windiff to compare the two appHost.config and then move the ones that are missing...Hope this helps.
Related
I'm trying to expose my WCF service as part of my main site URL on a server. I have it working on the server (Windows Server 2012 R2 Standard) on IIS 8.5, but can only reach it locally with localhost, or using the machine name, as follows:
http://localhost/TeeSvc/Service1.svc
http://<<machinename>>.mysite.net/TeeSvc/Service1.svc
I have an existing site set up as follows:
http://mystaging.mysite.net
I need to be able to reach the service using:
http://mystaging.mysite.net/TeeSvc/Service1.svc
I saw an article here dealing with this but it relates to an earlier version of IIS and I cannot get the cscript.exe console window to remain open long enough to issue any commands.
How can I go about this?
I was able to get this working by following the same approach in how to construct things in IIS, as outlined here:
Configure URL in IIS
My situation was further complicated by the fact that this was a migration of an older DNN site to version 9.2. There were a lot of unnecessary entries in the DNN web.config file; after I removed the httpHandlers and httpModules sections, I finally got it to work.
Using Windows server 2012 R2 with IIS 8.5.9600.16384
I wanted to change some config options for the IIS because i have a slow first load issue.
All documents i can find tell me that i should edit " C:\Windows\System32\inetsrv\config\applicationHost.config ". But i'm fairly certain that this isn't the config file used by the IIS. The file still contains older application pools/websites and is missing newer ones. Also when i make a change in the IIS interface this doens't change the config file.
Any thoughts on what might be happening here ?
Exact same problem here, but finally found the answer: Applicationhost.config not showing changes! Unbelievable but true answer: Notepad++ does not open the actual version of applicationHost.config. Restart IIS Manager, download and install Notepad2 x64 and everything should work as expected.
Can I safely delete the contents of this folder
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root
on a Windows 2003 R2 standard system, given that I am not using IIS (6/7) on it?
If that is the case, could you please point me to the relevant documentation about ASP.NET's runtime and maintenance tasks such as this?
Yes, it's safe to delete these, although it may force a dynamic recompilation of any .NET applications you run on the server.
For background, see the Understanding ASP.NET dynamic compilation article on MSDN.
Just an update on more current OS's (Vista, Win7, etc.) - the temp file path has changed may be different based on several variables. The items below are not definitive, however, they are a few I have encountered:
"temp" environment variable setting - then it would be:
%temp%\Temporary ASP.NET Files
Permissions and what application/process (VS, IIS, IIS Express) is running the .Net compiler. Accessing the C:\WINDOWS\Microsoft.NET\Framework folders requires elevated permissions and if you are not developing under an account with sufficient permissions then this folder might be used:
c:\Users\[youruserid]\AppData\Local\Temp\Temporary ASP.NET Files
There are also cases where the temp folder can be set via config for a machine or site specific using this:
<compilation tempDirectory="d:\MyTempPlace" />
I even have a funky setup at work where we don't run Admin by default, plus the IT guys have login scripts that set %temp% and I get temp files in 3 different locations depending on what is compiling things! And I'm still not certain about how these paths get picked....sigh.
Still, dthrasher is correct, you can just delete these and VS and IIS will just recompile them as needed.
I've never actually used IIS, and I'm pretty new to the whole ASP.net thing too.
Basically, I've created a RESTful service using a VS2010 ASP.net project.
I'm not sure how you get that ASP.net application (which runs great on Visual Studio) to run on an IIS server.
It's pretty easy with a Java dynamic web project and Tomcat, but here I'm not sure how to begin.
Do I simply deploy the binaries to a directory?
Thanks!
ther are some possibilities
the easy one
create under c:\inetpub\wwwroot\ a new directory for your app
in the iis manager, configure this directory (create an application, set the right .net version, ... ). than everything you need is to copy all your files into that directory and thats it.
but you can also create a msi file, if you don't have the direct access to the server.
hth
For best testing you application use IIS 7.5 express on you development machine and set this:
project->Properties->Web->Use Local IIS Web Server
After testing under local IIS you can deploy you project to real IIS by using Build->Publish 'Your project'
Simplest way is deploying to File System in some folder and copy its content to created site folder, associated with IIS Virtual directory. To create Sites and virtual directories, see this:
http://www.bloggingdeveloper.com/post/Creating-IIS7-sites-applications-and-virtual-directories-using-Internet-Information-Services-Manager.aspx
http://mvolo.com/blogs/serverside/archive/2007/07/12/Creating-IIS7-sites_2C00_-applications_2C00_-and-virtual-directories.aspx
I am trying to set up a web farm where IIS configuration settings are replicated between the 2 servers. I do not want to use a shared configuration as this presents another point of failure. I have both machines (WWW1 and WWW2) set up to use a configuration file on D:\IISConfig. With this done I manually copy the configruation files from WWW1 to WWW2 and WWW2 works just fine. I then took it one step further and added file replication to automatically push any changes on WWW1 to WWW2. Then I added an App Pool to WWW1. At this point I can also browse my website with no issues on WWW1. When I went to IIS7 on WWW2 , I could see the new app pool . . .- GREAT. I tried to browse the website on WWW2 and I get an error that shuts down the DefaultAppPool:
The Module DLL c:\Windows\System32\inetsrv\authsspi.dll failed to load. The data in this error . . .
Any ideas why this might be occuing and how to get arround it?
Thanks
Belongs on Serverfault.com?
I think that when you use the configuation file and path, it is pretty much the same as using a shared configuration.
I would check that you have exactly the same modules loaded as it sounds to me like you have a security module on one web server that is not on the other, the config file is telling it to load which is causing the server to fail.
I would use the shared configuration instead.
In my Windows 2008 cluster, I have IIS set to use the shared configuration where the configuration folder is set to a folder on the local server. Then I have that folder set up as a DFS share. That way the IIS changes are automatically replicated in the cluster and the server's don't have to talk to a remote server to get the config files. This has been working great for years.
I know this is an old question, but the actual issue here is that it failed to load an authentication module.
authsspi.dll is provided by adding 'Basic Authentication' as part of the Web Server role in Windows Server. I can see this being an issue if (like me) you're accidentally using Shared Configuration across 2 or more servers that don't have an identical Role configuration for IIS.