Base solution for your next web application

Activities of "tteoh"

Dear Support,

I would like to find out what's the proper way to clear ApplicationSettingCahce if AspNetZero application is running on mutiple IIS servers?

Thanks. /Tommy

Hi, I'm using non-core ASP.NET Zero Version 5.6.0 (ASP.NET MVC 5 & AngularJs 1.x) and also published to Azure.

I kept on getting "Your request is invalid!" on DTO custom validation even though I've set the custom validation error message on it. But I can see the custom validation error message on swagger. No matter on local machine or Azure environment and I've set customErrors mode = "RemoteOnly".

Thanks. /Tommy

Hi, I'm using ASPNET CORE & Angular (single solution), .NET Core 2.1, v6.2.0 on MacOSX.

I keep on download this file when I was running the project:

But I can route to http://localhost:5000/swagger/index.html and it's working as expected:

Thanks. /Tommy

Hi, I'm using ASPNET CORE & Angular (single solution) v5.5.2.

I followed the instruction from Getting Started (for MacOSX) to run the project.

But I'm getting this exception when I was trying to run the project in Visual Studio for Mac:

I've found out the root caused, which is when trying to get the configuration from appsettings.json:

Thanks. /Tommy

Hi, I'm using non-core ASP.NET Zero Version 5.6.0 (ASP.NET MVC 5 & AngularJs 1.x). I'm connecting to Oracle database. I'm having this exception when operate Update-Database for the migration codes below:

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-08177: can't serialize access for this transaction ORA-06512: at line 27

public override void Up()
{
    AddColumn("USFA.Visitation", "InitialRecordID", c => c.String(maxLength: 150));

    //AddColumn("USFA.Visitation", "DeviceUserID", c => c.String(nullable: false, maxLength: 256));
    Sql(@"ALTER TABLE ""Visitation"" ADD ""DeviceUserID"" NVARCHAR2(256) DEFAULT 'UserName' NOT NULL");
    Sql(@"UPDATE ""Visitation"" ""v"" SET ""DeviceUserID"" = (SELECT ""UserName"" FROM ""AbpUsers"" ""u"" WHERE ""u"".""Id"" = ""v"".""CreatorUserId"") WHERE ""DeviceUserID"" = 'UserName'");
    Sql(@"ALTER TABLE ""Visitation"" MODIFY(""DeviceUserID"" DEFAULT (null))");
}

public override void Down()
{
    DropColumn("USFA.Visitation", "DeviceUserID");
    DropColumn("USFA.Visitation", "InitialRecordID");
}

But I'm not getting any exception when running the migration codes below:

public override void Up()
{
    //AddColumn("USFA.EntityStatus", "EntityName", c => c.String(nullable: false, maxLength: 50));
    //DropColumn("USFA.EntityStatus", "StatusType");
    Sql(@"ALTER TABLE ""USFA"".""EntityStatus"" RENAME COLUMN ""StatusType"" TO ""EntityName""");
}

public override void Down()
{
    //AddColumn("USFA.EntityStatus", "StatusType", c => c.String(nullable: false, maxLength: 50));
    //DropColumn("USFA.EntityStatus", "EntityName");
    Sql(@"ALTER TABLE ""USFA"".""EntityStatus"" RENAME COLUMN ""EntityName"" TO ""StatusType""");
}

I have already added the codes below to EntityFramework module:

Configuration.UnitOfWork.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;

Should I add this to Web module as well? And I'm using Migrator.exe to run on server, therefore should I add it to Migrator module as well?

Thanks. /Tommy

Question

Hi, I'm using ASP.NET Zero non-core template of ASP.NET MVC5 & Angularjs 1.x with version 5.6.0.

Based on the answer here: GitHub #Issues 630, we know that this is related to EF, are you willing to share some information that we would like to know?

  1. Why Web.config runs smoothly with and without the codes that GitHub mentions about but App.config of .Migrator runs with exception if the codes are not comment out?
  2. Is there any side effect if we comment out the codes?
  3. Is the Migrator.exe under ABP or EF? Based on the DEVELOPMENT GUIDE MVC ANGULARJS mentions about, this should be under ABP but why ismcagdas says that is related to EF?

Thanks. /Tommy

Hi,

I'm using MVC5AJ. I'm trying to added WSDL service into my MVC5AJ1.

But I'm getting exception of my WSDL service class injection when I using swagger to called my App Service.

This is shown how I injected my WSDL service class in my App Service: [attachment=0:2ixby69b]WhatsApp Image 2018-08-13 at 2.27.13 PM.jpeg[/attachment:2ixby69b]

The below code is shown what exception I'm getting:

{
  "message": "An error has occurred.",
  "exceptionMessage": "ComponentActivator: could not proxy Abp.WebApi.Controllers.Dynamic.DynamicApiController`1[[MVC5AJ1Demo.CRMAuthentication.ICrmAuthenticationAppService, MVC5AJ1Demo.Application, Version=5.6.0.0, Culture=neutral, PublicKeyToken=null]]",
  "exceptionType": "Castle.MicroKernel.ComponentActivator.ComponentActivatorException",
  "stackTrace": "   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)\r\n   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)\r\n   at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)\r\n   at Castle.Windsor.WindsorContainer.Resolve(Type service)\r\n   at Abp.Dependency.IocManager.Resolve(Type type)\r\n   at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver, Type type)\r\n   at Abp.WebApi.Controllers.AbpApiControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n   at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()",
  "innerException": {
    "message": "An error has occurred.",
    "exceptionMessage": "ComponentActivator: could not proxy MVC5AJ1Demo.CRMAuthentication.CrmAuthenticationAppService",
    "exceptionType": "Castle.MicroKernel.ComponentActivator.ComponentActivatorException",
    "stackTrace": "   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency)\r\n   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernel(CreationContext context, ComponentModel model, DependencyModel dependency)\r\n   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveCore(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)\r\n   at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)\r\n   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)\r\n   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)\r\n   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)\r\n   at Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)\r\n   at Castle.Core.InterceptorReference.Castle.MicroKernel.IReference<Castle.DynamicProxy.IInterceptor>.Resolve(IKernel kernel, CreationContext context)\r\n   at Castle.Windsor.Proxy.AbstractProxyFactory.ObtainInterceptors(IKernel kernel, ComponentModel model, CreationContext context)\r\n   at Castle.Windsor.Proxy.DefaultProxyFactory.Create(IKernel kernel, Object target, ComponentModel model, CreationContext context, Object[] constructorArguments)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)",
    "innerException": {
      "message": "An error has occurred.",
      "exceptionMessage": "Exception has been thrown by the target of an invocation.",
      "exceptionType": "System.Reflection.TargetInvocationException",
      "stackTrace": "   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)\r\n   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n   at System.Activator.CreateInstance(Type type, Object[] args)\r\n   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxyInstance(Type proxyType, List`1 proxyArguments, Type classToProxy, Object[] constructorArguments)\r\n   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors)\r\n   at Castle.Windsor.Proxy.DefaultProxyFactory.Create(IKernel kernel, Object target, ComponentModel model, CreationContext context, Object[] constructorArguments)\r\n   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)",
      "innerException": {
        "message": "An error has occurred.",
        "exceptionMessage": "Could not find default endpoint element that references contract 'BasicHttpBinding_ICrmUserService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.",
        "exceptionType": "System.InvalidOperationException",
        "stackTrace": "   at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)\r\n   at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration)\r\n   at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)\r\n   at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)\r\n   at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)\r\n   at System.ServiceModel.ConfigurationEndpointTrait`1.CreateSimplexFactory()\r\n   at System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory()\r\n   at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)\r\n   at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()\r\n   at System.ServiceModel.ClientBase`1..ctor()\r\n   at MVC5AJ1Demo.CrmDemoAuthenticationService.CrmUserServiceClient..ctor() in C:\\Users\\FTS01\\Desktop\\Demo Projects\\MVC5AJ1Demo\\src\\MVC5AJ1Demo.Application\\Connected Services\\CrmDemoAuthenticationService\\Reference.cs:line 156\r\n   at MVC5AJ1Demo.CRMAuthentication.CrmAuthenticationAppService..ctor() in C:\\Users\\FTS01\\Desktop\\Demo Projects\\MVC5AJ1Demo\\src\\MVC5AJ1Demo.Application\\CRMAuthentication\\CrmAuthenticationAppService.cs:line 15\r\n   at Castle.Proxies.CrmAuthenticationAppServiceProxy..ctor(IInterceptor[] )"
      }
    }
  }
}

So, what I need to know is how do I call WSDL service class method in my App Service?

Thanks.

Hi, I've downloaded ASP.NET Zero test project of ASP.NET MVC5 & Angularjs 1.x with version 5.6.0.

But I got these errors when I rebuild solution: [attachment=0:23zw4aw1]Error List.PNG[/attachment:23zw4aw1] Thanks. /Tommy

Hi,

I'm wondering how to run the sample project of [https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/OrganizationUnitsDemo])? Since it doesn't has .Application, .Web and .WebApi projects.

And I checked the seed data, it doesn't create any data related to the sample like Product.

Thanks. /Tommy

Hi, I'm using MVC5AJ1.

Now, I'm referencing two articles, which are (<a class="postlink" href="http://www.cnblogs.com/sheng-jie/p/6755187.html#autoid-3-2-0">http://www.cnblogs.com/sheng-jie/p/6755 ... toid-3-2-0</a>) and (<a class="postlink" href="http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/">http://bitoftech.net/2014/06/01/token-b ... -identity/</a>). I'm trying to apply OAuth in abp and use it to receive token. And I'm wondering why the way to receive the current token in ABP and OAuth token are different. And also, I have made a comparison between the current token in ABP and OAuth token as image shown below.

[attachment=1:1br6odl9]Capture.PNG[/attachment:1br6odl9]

  1. Why Abp doesn't has to implement SimpleAuthorizationServerProvider, but OAuth did implemented?
  2. Why the returned results of ABP and OAuth are different?

[attachment=0:1br6odl9]Capture.PNG[/attachment:1br6odl9] 3. I'm wondering what does Protect method does?

return new AjaxResponse(OAuthBearerOptions.AccessTokenFormat.Protect(ticket));
  1. Can OAuth be implemented in ABP and work with existing permission setting in ABP?

Thanks.

Showing 1 to 10 of 39 entries