Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fguo"

Question

I am trying 'ASP.NET Core & Angular 2+' v3.3.0, and found my Host settings page looks a little different with described on Development Guide. I have an "Appearance" tab, but missing "General" tab, so I can't find the "Timezone" setting. There is a similar topic on forum #10969 (Jan 10, 2017). It states "İt will be fixed in the next release". Is it still missed? :?:

I want to give users an ability to change timezone and language on their own page individually. Is it possible? :?:

As default, the user cannot change the language on his page. If he select another language, an error massage pops up: "Required permissions are not granted. At least one of these permissions must be granted: Users". As my test, the administrator must grant permissions by checking off "Users/Changing permissions". I just wonder/concern what else affected :?: , because the words "Changing permissions" may cover more changing beside language.

Thanks,

Answer

Never mind. I am reading the development guide and got the answer about multi-tenancy. This topic can be closed now.

Thanks again for your support! :D

Answer

Understand. I just tried disabling multi-tenancy by following the documents: "Configuration.MultiTenancy.IsEnabled = false;". Now, I can click "Create Account" to pop up the "Sign Up" window. It's good! :D

Just for curious, if a new tenant wants to register, how do I handle?

Answer

When I reopen my project in VS and redo the migration command, it went through, although the warnings are still there. Now, I can run the template on localhost! :D Thank you for your support! :D

The problem is that, I don't know how to register a user. :?: The "Login" popup can only accept "admin". I entered a new username and clicked "Email Activation". It responded "Invalid email".

Usually, there should be a "Sign In" and a "Sign up" options. The "Sign In" for registered users, and the "Sign up" for requesting/registering a new user account. Do you include this option on the template? Or we need to build this kind screen by myself?

Thanks again!

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,

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

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.

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.

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,

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,

Showing 241 to 250 of 254 entries