Asked by:
Default Document not working

Question
-
User-2055576114 posted
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?
Tuesday, April 27, 2021 3:18 AM
All replies
-
User1065476709 posted
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.configThere 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?
Best regards,
Sam
Tuesday, April 27, 2021 9:33 AM -
User-2055576114 posted
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?
Tuesday, April 27, 2021 12:38 PM -
User-2055576114 posted
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?
Tuesday, April 27, 2021 11:32 PM -
User1065476709 posted
Hi Jon,
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.
Best regards,
Sam
Wednesday, April 28, 2021 9:34 AM -
User-2055576114 posted
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.
Wednesday, April 28, 2021 2:27 PM