Base solution for your next web application
Open Closed

An error occurred while starting the application #2164


User avatar
0
fguo created

I followed the tutorial and created an ASP.NET Core 1.0 project, and built it in my Visual Studio 2015. I also updated all Abp packages in NuGet and built it again with success. When I run it in Visual Studio, I got errors around Web.Startup.Startup.ConfigureServices(IServiceCollection services) in Startup.cs Line 36: return services.AddAbp<SNet3WebModule>(options => as below:

Here is the error page:

An error occurred while starting the application. MethodAccessException: Attempt by method 'Castle.MicroKernel.SubSystems.Configuration.DefaultConfigurationStore..ctor()' to access method 'System.Collections.Generic.Dictionary2<System.__Canon,System.__Canon>..ctor()' failed. Castle.MicroKernel.SubSystems.Configuration.DefaultConfigurationStore..ctor() TypeInitializationException: The type initializer for 'Abp.Dependency.IocManager' threw an exception. Abp.Dependency.IocManager.get_Instance() MethodAccessException: Attempt by method 'Castle.MicroKernel.SubSystems.Configuration.DefaultConfigurationStore..ctor()' to access method 'System.Collections.Generic.Dictionary2<System.__Canon,System.__Canon>..ctor()' failed.

Please advise. Thank you very much!


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Is there any innerException of this exception ?

  • User Avatar
    0
    fguo created

    That is all I get. Please see the attachment for the error page.

    I downloaded the template (.NET core version), built it in VS 2015, updated all packages in Nuget, built it again, run it in VS by clicking Ctrl+F5, and got the error page.

    Did I miss any steps (e.g. Migration)?

    Thank you for your advice!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Did you updated nuget packages or instaled nuget packages ? If you updated nuget packages, it might be a problem.

    Can you try to download same template again and just run it ? By the way, do you have the latest .Net core ? <a class="postlink" href="https://www.microsoft.com/net/core#windowsvs2015">https://www.microsoft.com/net/core#windowsvs2015</a>

  • User Avatar
    0
    fguo created

    I did updated nuget to ABP current version with a few other packages. Do you mean that I need to remove all of ABP packages from nuget?

    I remembered I ran the template once before nuget updating. It gave me more errors about authentication, such as the user name has no permission to access the database. Unfortunately, I didn't keep the copy of the error page. I thought that's because I didn't migration the database yet.

    Anyway, I will redo everything from scratch. Thanks!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    It might be related to not applied migrations as well. I suggest you to run project before updating nuget packages, and see if it works or not.

    Then you can update ABP nuget packages.

    Thanks.

  • User Avatar
    0
    joshboilered created

    <cite>ismcagdas: </cite> Hi,

    It might be related to not applied migrations as well. I suggest you to run project before updating nuget packages, and see if it works or not.

    Then you can update ABP nuget packages.

    Thanks.

    I'm in the same boat, only with the paid version. I have VS2015, Update 3, etc. I can create a new .net core mvc project from scratch targeting both .net core and .net framework 4.6. But when I download from your site / and from zero site, when I build the project out of the box, I get 100+ errors relating to the project.json dependencies.

    Has something changed recently to cause the project to not build?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you try to install latest Typescript to your machine and try again ? If it does not work, we can remotly connect to your computer and try to help you via TeamViewer. You can send your Team Viewer credentials to <a href="mailto:[email protected]">[email protected]</a> if installing Typescript does not work for you.

    By the way, you can write all of your questions to premium forum section.