We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Default Document not workingRSS

5 replies

Last post Apr 28, 2021 02:27 PM by Jon Dragt

‹ Previous Thread|Next Thread ›
  • Default Document not working

    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?

  • Re: Default Document not working

    Apr 27, 2021 09:33 AM|samwu|LINK

    Hi Jon Dragt,

    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?

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Default Document not working

    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?

  • Re: Default Document not working

    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? 

  • Re: Default Document not working

    Apr 28, 2021 09:34 AM|samwu|LINK

    Hi Jon,

    Jon Dragt

    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

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Default Document not working

    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.

‹ Previous Thread|Next Thread ›