I have an IIS 6 instance with a web site that has a few virtual directories. One of those was re-assigned to a new path but the webserver still serves from the old path.
I've restarted IIS. Is there some other setting that might cause IIS to hold on to the old reference?
I found a fix by editing the metabase.xml file to remove the old virtual directory entry:
Stop IIS
Edit metabase.xml
Start IIS
Related
I deployed a brand new site on IIS. It is in .Net 6. I am getting a 500.19 error that it cannot read the configuration file due to insufficient permissions.
\\?\D\Sites\SiteDirectory\wwwroot\web.config
The problem is this web.config file that it is pointing to is not the one for my website. It is looking for a web.config in the wwwroot directory for some reason. As a matter of fact there is no web.config that even exists at that location.
The correct web.config file exists in
D:\Sites\SiteDirectory\wwwroot\SiteName\web.config
Why is IIS looking at wwwroot? How can I fix this behavior? My other .Net Framework 4.7 sites work fine without this web.config at the root directory.
I solved it by installing this component:
Windows Hosting Bundle
"https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.6-windows-hosting-bundle-installer"
I have developed and published (via the "publish" feature in VS 2013) a simple WCF web service on IIS on my local machine.
The physical deploy path is the folder : c:\inetpub\wwwroot\MyWCF_Service_On_IIS\
I saw on IIS that the virtual folder has been created under "default Web site" (with the same name : MyWCF_Service_On_IIS). The default web site listens on port 80.
Why there is no way to access the service ? whatever combination of paths and urls fails.
I tried :
localhost/MyWCF_Service_On_IIS/Service1.svc (Service1.svc is the .svc file hosting the only endpoint);
localhost/Service1.svc
127.0.0.1/MyWCF_Service_On_IIS/Service1.svc
127.0.0.1/Service1.svc
localhost
127.0.0.1
Even if I don't expose metadata endpoints I expect to see a least a help page about the service and how to get the metadata themselves.
But I only get errors
Whatever attempt I do fails miserably.
I would like to know, once and for all, what is the rule IIS uses to map virtual folders to physical folders.
We are supposed to directly deploy all related files/file directories to the root folder of the website by using FileSystem mode.
C:\inetpub\wwwroot
Moreover, we need to enable windows features to handle the SVC extension for supporting WCF service.
There is no need to use a virtual folder in that case.
Here is the content of the wwwroot folder on my side.
bin folder
PrecompiledApp.config
Service.svc
Web.config
The service URL is http://localhost/service.svc
If we specify the URL by using a virtual path. We should convert the virtual path to the application.
Then the service URL is http://localhost/MyWCF/Service1.svc.
Feel free to let me know if the problem still exists.
I have attempted to migrate sites from an old IIS 7 server onto a new IIS 10 server by using the following appcmd's:
Commands ran to export from IIS 7
appcmd list site /config /xml > "h:\temp\iis export\sites.xml"
appcmd list apppool /config /xml > "h:\temp\iis export\apppools.xml"
Commands ran to import to IIS 10
appcmd add apppool /in < "h:\temp\iis export\apppools.xml
appcmd add site /in < "h:\temp\iis export\sites.xml"
This ran without errors, and the new IIS 10 listed all of the old sites. The configuration files were also altered to reflect a change in file paths and local IPs which were updated without problems.
The problem is that whenever I select a site within IIS, and go to any of the properties (in the below example logging), it throws an error stating that it cannot find the file path for the web.config.
The file path is correct, but there appears to be a \\?\ prepended to the file path. I don't know if this is the reason why this error is occurring, nor how to correct this.
Any suggestions would be grateful! Thanks, Radderz
In this instance it turned out to be that he URL rewriting module for IIS was not installed.
Annoyingly the error message produced for if a configuration file contains an element that is not installed is simply that it cannot read the config file, rather than which tag was the cause.
I have a site I developed on a WAMP server in house, and is hosted offsite (presumably on an Apache server). The site was created in the root directory of the WAMP server (C:\wamp\www). I'm now trying to move the in house development site onto a Windows Home Server v1 box (essentially a Server 2003 machine running IIS 6). I'm trying to not have two different versions of the site: one for in house (on IIS), and one for hosting offsite (on Apache).
On the WHS machine, I have a virtual directory <sitename> located at:
c:/inetpub/<sitename>
I can access it on the server at:
Localhost/<sitename>
and from anywhere on the LAN at:
<ServerName>/<sitename>
When I initially wrote the site, I used the ../ declaration for almost every file,
path, directory, and PHP include files. This works fine on the WAMP server and on the
offsite host. But, when I moved the site into the virtual directory <sitename>, it
fails on the IIS server.
All such ../ references point to the server root:
<ServerName>/
rather than site home:
<ServerName>/<sitename>
Presumably, I could move the site into the 'root' directory: c:/inetpub/wwwroot, but
Windows Home Server uses this for something else.
I could change every reference from ../ to ../<sitename>/, but that would mean having 2
different sites to maintain, one for in house and one for offsite.
So, my questions are ...
Is there any way to declare that the virtual directory c:/inetpub/<sitename>
is the home or root directory for this single site? Is there a configuration
in IIS that will do this for this one virtual directory, and not upset the other
sites hosted on this server?
If not;
Can someone point me to some other way to rewrite the site in order
to have it run on both Apache and IIS 6 with no/minimal
alterations for the two different servers?
I have been searching for over a week on this. All of the solutions that I have found are specific to either Apache or IIS, but won't work in both.
Thanks!
Ok, here's a -possible- answer ...
I changed every ../ to a PHP include statement, calling a file I named SiteBase.txt.
On the IIS server, SiteBase.txt consists of a single line: http://<ServerName>/<sitename>/.
On the WAMP server, SiteBase.txt consists of a single line: ../
This way, I only have to change this one file when I move the site from my development server to the production server. A bit Brute-Force, but it seems to be working.
Does anyone see a problem with this?
Thanks!
If I type localost in IE, it yields "It works!" but I can't seem to locate where exactly that page is picked from.
In c:\InetPub\wwwroot\ nothing exists that points "It works!" page.
I created a test folder inside wwwroot above. I put an aspx file there, it does not work (no file found), then i created a test.htm file, that can not be accessed through localhost/test/test.htm
Anyone knows what is wrong. I never ran IIS on this particular system. I have Windows XP Pro, and IIS6 is installed.
Please help.
I think it will answer it myself. There were two confusion first of all, IIS 5.1 was installed along with IIS 6 (there was a link in Administrative tools) and Apache server as well. Something was probably messing with it before I came. I uninstalled Apache, IIS 6 link (was not supposed to be there in the first place), and even IIS. Fresh installed fixed everything.
Also if you are running into problem like this, get familiar with IIS, how it works. It runs out of Virtual folders and you have to turn these virtual folders into Applications. It is tricky the way Microsoft do it.
In my case probably both the server were using the default port 80 (I am not sure though). I now have both servers intalled (IIS + Apache), with Apache using port 8080.
To test situation like this, do this: create a virtual folder in IIS 5.1, right click on it and turn that folder into application. Put an aspx file in the "actual" location that this virtual folder points to see and then open it in browser using localhost\virtualfolder\myaspx.file. Note that in many case IIS will not pick the default.aspx file automaticaly unless explicity given.