Base solution for your next web application

Activities of "bsolutions"

The solution: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1413">https://github.com/aspnetboilerplate/as ... ssues/1413</a>

Add script like that:

<script src="~/AbpServiceProxies/GetAll?type=jquery&v=@(Clock.Now.Ticks)" type="text/javascript"></script>

Hi everyone,

I have a problem with the dynamic proxies. I included the dynamic proxies in my layout page:

<script src="~/AbpServiceProxies/GetAll?v=@(AppTimes.StartupTime.Ticks)" type="text/javascript"></script>

But if I start my application and call <a class="postlink" href="http://localhost/AbpServiceProxies/GetAll?v=636322742374719274">http://localhost/AbpServiceProxies/GetA ... 2374719274</a> I get the following error:

An unhandled exception occurred while processing the request.

ArgumentNullException: Value cannot be null. Parameter name: key

The exception occurs in the ApiProxyScriptManager in the following method:

public string GetScript(ApiProxyGenerationOptions options)
{
    if (options.UseCache)
    {
        // On this line the error occurs. It looks like the CreateCacheKey(options) returns null
        return _cache.GetOrAdd(CreateCacheKey(options), (key) => CreateScript(options));
    }

     return _cache[CreateCacheKey(options)] = CreateScript(options);
}

Please help me to solve this problem. Thanks!

Thanks @Fengol! That is the best solution!

For the sake of completeness here the new *.csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
    <RootNamespace>CompanyName.ProductName</RootNamespace>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" />
  </ItemGroup>
</Project>

I found a Solution!

With the new .NET Core 1.1 template you can use the Package Manager Console within Visual Studio to add migrations or update the database:

  1. Set the Web.Mvc project as start-up project
  2. Open Package Manager Console and set the EntityFrameworkCore project as default project. 3a. Use Add-Migration <NAME> to add a new migration. 3b. Use Update-Database to update the database with the latest migration.

I hope the boilerplate crew updates the documentation as fast as can be ;)

Hi everyone!

I'm trying to use the new .NET Core 1.1 template of ASP.NET Boilerplate but I have problems with migrations.

I compiled the complete solution, set the Web.Mvc project as startup project and then I opened a command prompt with administration rights. I went to the EntityFrameworkCore directory and executed the following command:

"dotnet ef database update"

I got this result:

No executable found matching command "dotnet-ef"

When I changed to the Web.Mvc directory and tried to execute the command here, the result was:

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:10.05
No DbContext was found in assembly 'BSolutions.BreconsShop.Web.Mvc'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.

So the "dotnet ef" possibly exists, but don't run in the EntityFrameworkCore directory. Do anyone have a solution for that problem?

Answer

This is duplicate with this post: #2690

Hi everyone,

I downloaded a current version of the ASP.NET Boilerplate (ASP.NET Core) template with module zero and opened it in Visual Studio 2017. The solution successfully migrates to the new Visual Studio project format. But when I try to compile the solution I get the following error in the web project (AuthenticationManagerExtensions):

The type or namespace name 'Claims' does not exist in the namespace 'System.IdentityModel' (are you missing an assembly reference?)

What I have to consider when I will open the ASP.NET Boilerplate solution in Visual Studio 2017? Is that framework even compatible with Visual Studio 2017?

Thanks for help!

Showing 1 to 7 of 7 entries