none
ASP.NET 4.0 ArgumentNullException: Collection cannot be null. Parameter name: c RRS feed

  • Question

  • Hi all,

    I have a customer with a very old ASP.NET 4.0 application running on Windows Server 2008 where everything just works fine.
    Now they asked me to move this website to their new server running Windows Server 2016 on it. I used webdeploy to transfer the website but something is not working, this will be explained below. Then i tried to start it with Visual Studio on my laptop to test run it, and it just gives me the same problem. So i hope anyone of you can give me some explanation or solution what is happening here.

    So what is happening, on every page not only this one, is that when i press the New (Nieuw) button and i just press Save (Bewaren) with test data, or i go to another page of this table, i got the error that you see in the last image. I think it has something to do with the DetailsView.DataBind when the DetailsViewMode is on DetailsViewMode.Insert. Because when i select a row, and i choose Edit (Wijzigen) and i do the same actions i do not get the error.

    What has changed in .Net that can cause this error because on Windows Server 2008 this error does not occur?

    And what i also tried is to return to .Net Framework 4.0 but that is not possible on a Windows Server 2016.

    Overview

    New

    Exception

    • Moved by CoolDadTx Wednesday, October 17, 2018 1:49 PM ASP.NET related
    Wednesday, October 17, 2018 9:26 AM

All replies

  • Hi,

    looks like your are trying to add a null reference collection to another. Maybe there goes something wrong by initializing the server. Is the server config correct? Are there some dependencies not working? Can you show us your code?

    Greetings, Chris

    PS: This should be moved to asp.net...

    Wednesday, October 17, 2018 12:22 PM
  • Please post questions related to ASP.NET in the ASP.NET forums. The issue appears to be an empty field set but the folks over there can better explain why it would have started happening just by moving servers.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, October 17, 2018 1:49 PM
  • @DerChris88

    Hi,

    Yes i know what the exception is, but i do not know where it comes from because Windows Server 2008 works, Windows Server 2016 not, and i just completely copied IIS with all his settings trough webdeploy. (great tool btw)

    So IIS is correct, that i'm sure, windows features i compared, i do not find one that could be related to this issue or maybe i just don't know that one is related to this issue.

    All the dependencies are working as well. So i probably follow best @CoolDadTx directions and maybe can they tell me to what this issue is related.

    Thanks!

    Wednesday, October 17, 2018 4:00 PM