Hi ryancyq.
This is the full error stack trace:
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Boolean.Parse (System.String value) [0x0002a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/boolean.cs:167
at COREAJDemo.Web.Startup.AuthConfigurer.Configure (Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration) [0x00015] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/AuthConfigurer.cs:20
at COREAJDemo.Web.Startup.Startup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x0006e] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Startup.cs:101
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x00028] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices () [0x0000e] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () [0x0002f] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () [0x00150] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at COREAJDemo.Web.Startup.Program.Main (System.String[] args) [0x00001] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Program.cs:10
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Boolean.Parse (System.String value) [0x0002a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/boolean.cs:167
at COREAJDemo.Web.Startup.AuthConfigurer.Configure (Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration) [0x00015] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/AuthConfigurer.cs:20
at COREAJDemo.Web.Startup.Startup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x0006e] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Startup.cs:101
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x00028] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices () [0x0000e] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () [0x0002f] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () [0x00150] in <0de102f58bb64e9397f452cd5d2fc76c>:0
at COREAJDemo.Web.Startup.Program.Main (System.String[] args) [0x00001] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Program.cs:10
Thanks. /Tommy
Hi ryancyq,
Thanks for the explanation.
Thanks. /Tommy
Hi ismcagdas,
This problem is solved, sorry that forgot to update here.
Due to the answer here: ORA-08177: can't serialize access for this transaction
So I just added Sql("COMMIT")
at the last line of the codes at both migrations. (Sorry that didn't mention about I was running 2 migrations)
The answer of why the second migration class is working is because I only ran 1 migration at a time.
For the first migration class that I showed above is getting exceptions is because I ran 2 migrations at a time. Therefore, the first migration class is not committing (I have no idead why is it not committing) then I added Sql("COMMIT")
and it's working fine now.
Question Why it is not committing even though I added:
Configuration.UnitOfWork.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
Thanks. /Tommy
Hi ismcagdas,
Thank you for the answers.
Thanks. /Tommy
Hi ismcagdas,
There is no problem, please read carefully, I was asking questions :)
Thanks. /Tommy
<cite>ismcagdas: </cite> Hi,
We also realized the existing codes reference to 2FA cookies. Shall we be concerned about this?
Why do you think this could create a problem ? I can't think of a problem.
@ismcagdas we took the 2FA for the web client and made it work with mobile client. Cookies only used by web browser from understanding. Perhaps, I wrongly understood this.
Through the conversation, glad to know 2FA is supported for mobile for aspnetzero core template.
We didn’t use the aspnetzero core template that already shipped with xamarin due to learning curve on .net core and angular, the new development approach. Hope we r able to make the transition next year.
Thanks. /tommy
<cite>ismcagdas: </cite> I'm not sure how this is related to AspNet Zero ?
@ismcagdas Just the our practice to try specific functionality using standard template and then only apply to anz template. Mainly to skip the DI first.
I don’t think this is directly related to aspnetzero. However, for some reason the warning didn’t appear when we tried using standard MVC project template from VS2017. But the warning appeared when applied the same codes in ANZ project template.
It was for a requiement where we had to implement ExternalAuthentication (adopting LDAP approach) with external System via WSDL.
Understand this is a grey area in term of support.
Thanks. /tommy
<cite>ismcagdas: </cite> @smartlayer "npm run create-bunles" is for ASP.NET Core, you don't have to run that. If you are running MVC 5.x, it should work out of the box. Is your published website accessible via internet ? If so, could you share it's url to <a href="mailto:[email protected]">[email protected]</a> ? Because it is hard to understand which files failed to load from the screenshot you have shared.
@ismcagdas from personal experience and observation, quite often it was presumed the issue was related to asp.net zero “core” template but it was not. Hopefully there is a way to improve such communication. Thanks.
/tommy
<cite>alper: </cite> Try
In the Solution Explorer, under the Service References folder, right-click the service reference name with the issue and select 'Configure Service Reference'.
The Service Reference Settings window will appear. Uncheck the box labeled 'Reuse types in referenced assemblies' and click the OK button.
Rebuild the project.
After rebuilding, the warning should disappear.
Hi,
I have already followed the steps that you suggested but the warning is still appear.
Thanks.
<cite>alper: </cite> Hi,
How will you implement the 2 factor authentication with OAuth Token based ?
@alper need to retract my previous comment that 2FA was not needed. We ended up having to implement 2FA adopting the approach implemented in ANZ (non-core) under WebApi project.
Just something that we discovered was the 2FA token digit is hard coded to 6 and expiry time to 3 mins.
We have to build custom table to handle expiration.
We also realized the existing codes reference to 2FA cookies. Shall we be concerned about this?
Thanks /tommy