IIS 7 and Above
Default Document not working
Last post Apr 28, 2021 02:27 PM by Jon Dragt
Apr 27, 2021 03:18 AM|Jon Dragt|LINK
Using IIS 10, pretty vanilla setup except we're using a mix of Classic ASP and Asp.net webforms. The default document at wwwroot is to be default.asp, and the site works if I use localhost/default.asp, but if I just use localhost, or hit the root folder
from a remote connection without specifying /default.asp I get a .Net configuration error: Sever Error in '/' Application in the source file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config. I've checked that default documents is enabled,
and the rest of the setup if pretty much "out of the box". I'm sure, I'm missing something really basic, but what?
Apr 27, 2021 09:33 AM|samwu|LINK
Hi Jon Dragt,
I get a .Net configuration error: Sever Error in '/' Application in the source file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
There are many reasons for this error, It may be caused by the web.config file.
Can you post a screenshot of your error page and the content of web.config file?
Apr 27, 2021 12:38 PM|Jon Dragt|LINK
Thanks Sam, but the web.config file referenced is the unmodified config file that gets installed with v4.0.40419 of .net and the error occurs on line 111 within the assemblies section on the <add assembly="*" /> line. I'm confused that making a call to the
root of the website is even getting to .Net since the default document is default.asp. Shouldn't that only happen when I make a call to a .aspx page within the site?
Apr 27, 2021 11:32 PM|Jon Dragt|LINK
More information, or rather the question has changed: I've discovered in the root folder, a subfolder named "bin" (and as a software developer, I understand the significance of that), and it was a dll in the folder that was causing the error. My question
now is, why was IIS even looking in that folder when I navigated to localhost and was expecting to get a response from Default.asp (classic asp, not asp.net)? Is there a setting somewhere, or a convention that it looks for a bin folder?
Apr 28, 2021 09:34 AM|samwu|LINK
and it was a dll in the folder that was causing the error. My question now is, why was IIS even looking in that folder when I navigated to localhost and was expecting to get a response from Default.asp (classic asp, not asp.net)? Is there a setting somewhere,
or a convention that it looks for a bin folder?
How do you know that this error is caused by the dll file? Did you try to delete it and try again?
Since I don’t know the configuration of your server, I can’t know the problem. I may need to check your web.config file.
Apr 28, 2021 02:27 PM|Jon Dragt|LINK
Yes, simply removing that file from the bin subfolder removed the error and the site functions. I replaced the file later with a 64 bit version and it still functions, but my question isn't why it was erroring out on that particular dll, my question is why
that bin folder was even being looked at when a classic asp file is supposed to be the default document.