Base solution for your next web application

Activities of "fguo"

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!

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!

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!

Question

I followed the documentation, and downloaded "ASP.NET Core & Angular 2.x" project.

I merged the files in Client folder into root folder of MyProject.Web.Host project in Server solution by exactly following instruction of "Merge Angular2 Client and Server Project".

I tried to build the solution. It failed. :(

There is a warning under *.Web.Host\Dependencies: npm – not installed. I double checked, the npm is installed on my computer. I verified it by npm --version, and it tell me 3.10.10.

I tried the "Database Migrations". I don't know how to run the "tool" in ".Migrator project", so I tried to use command "dotnet ef database update". It failed too. :( The error message is:

The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.

  • Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  • The following versions are installed: 1.0.1
  • Alternatively, install the framework version '1.1.0'.

I am stuck here. Please advise what should I do! :( :( :(

Thanks,

Question

Since I cannot pass through "Merging Client and Server Solution" (see my another post), I like to try angular-cli. I downloaded a "ASP.NET Core & Angular 2.x" project. It contains two folders: Client and Server. The documentation states "Client folder contains the Angular application which is configured to work with angular-cli", but I cannot find the instruction how to combine the Client folder with angular-cli.

I have installed angular-cli, and created/run a new project successfully. I wonder how to use angular-cli with the existing Client folder. Can you provide a brief instruction?

Thanks,

Answer

I followed your instruction, and installed yarn via Chocolatey in PowerShell.

After I run command "ng serve" in the root of Client folder, it shows some green message and last line is "webpack: Compiled successfully".

I then navigate to <a class="postlink" href="http://localhost:4200/">http://localhost:4200/</a>. It shows a popup with "An error has occurred! Error detail not sent by server". I can click "OK" button to close this popup, but the screen is stuck with an endless spin. :(

Please advise!

Thanks,

Answer

I just followed your link to download and install .NET Core 1.1.1 SDK.

When I start my solution in VS2015, it gives me a popup with error: :(

The following error occurred attempting to run the project model server process (1.0.1). Unable to start the process. No executable found matching command "dotnet-projectmodel-server" The project model server process provides intellisense, build, and reference information to Visual Studio and without it your experience will be very limited. Please try closing and reopening Visual Studio to see if that corrects the problem. Alternatively, check that the .NET Core SDK is properly installed.

I closed this message and tried to unload / reload all projects, and build solution. It gives out an error on each project: :(

Error MSB4019 The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Please advise!

Thanks, p.s. The warning is still there. It is under *.Web.Host\Dependencies: npm – not installed. I double checked, the npm is installed on my computer. I verified it by npm --version, and it tell me 3.10.10.

I posted a couple of topics recently, so I like to search them out by my user name. Is it possible?

Do you have any "advanced search"?

Thanks.

I got it. On the top menu > Search. Thanks.

Answer

Ok. I tried to redo everything from scratch. I uninstalled VS2015 and .NET frameworks. Installed VS 2017 with .NET Core 1.0.0 as your instructed. Download ASP.NET Zero v3.3.0. After unzip it, I assume the folder "angular" and "aspnet-core" are the folder "Client" and "Server" on your documents. Am I correct?

I followed "Merging Angular 2.x Client and Server solution" link in Documents, but realized there is no "project.json" file in "angular" folder, neither in "aspnet-core" folder. Did I miss something?

Then, I tried the "Database Migrations". I changed the connectionstrings in .Web.Host\appsettings.json with "Default": "Server=(localdb)\mssqllocaldb; Database=MyProjectDb; Trusted_Connection=True;" (My other projects use this server name and all works fine). I used Migration Command, but got two warnings and failed with "Login failed for user 'myDomain/myUsername'". I tried to use "Server=localhose" as the instruction in Documents, but got the same result. Here are the message after running the command:

C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework>dotnet ef database update Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C) Microsoft Corporation. All rights reserved. Consider app.config remapping of assembly "System.Security.Cryptography.X509Certificates, Culture=neutral, PublicKeyToken=b03........" from Version "4.0.0.0" [] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.security.cryptography.x509certificates\4.3.0\ref\net461\System.Security.Cryptography.X509Certificates.dll] to solve conflict and get rid of warning. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.Cryptography.X509Certificates" culture="neutral" publicKeyToken="b03…….." /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding> [C:\dev\MyProject\aspnet-core\src\MyProject.Core\MyProject.Core.csproj] MyProject.Core -> C:\dev\MyProject\aspnet-core\src\MyProject.Core\bin\Debug\net461\MyProject.Core.dll Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b0........" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Net.Http.dll] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.net.http\4.3.0\ref\net46\System.Net.Http.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77........" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.IO.Compression.dll] to Version "4.1.2.0" [C:\Users\fguo.nuget\packages\system.io.compression\4.3.0\ref\net46\System.IO.Compression.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "System.Security.Cryptography.X509Certificates, Culture=neutral, PublicKeyToken=b03........" from Version "4.0.0.0" [] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.security.cryptography.x509certificates\4.3.0\ref\net461\System.Security.Cryptography.X509Certificates.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30a........" from Version "6.0.0.0" [] to Version "9.0.0.0" [C:\Users\fguo.nuget\packages\newtonsoft.json\9.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=294190">http://go.microsoft.com/fwlink/?LinkId=294190</a>. [C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\MyProject.EntityFramework.csproj] MyProject.EntityFramework -> C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\bin\Debug\net461\MyProject.EntityFramework.exe Build succeeded. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.Cryptography.X509Certificates" culture="neutral" publicKeyToken="b03........" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding> [C:\dev\MyProject\aspnet-core\src\MyProject.Core\MyProject.Core.csproj] C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=294190">http://go.microsoft.com/fwlink/?LinkId=294190</a>. [C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\MyProject.EntityFramework.csproj] 2 Warning(s) 0 Error(s) Time Elapsed 00:00:01.21

Target migration: latest Login failed for user 'myDomain\myUsername'.

Please advise! Thanks,

Showing 1 to 10 of 254 entries