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

Activities of "tjackadams"

Hello,

Is it possible to switch off the Identity Column for the provided Entities such as Tenants? We are looking to pre-populate the Tenants table with Id, TenancyName and Name from another table within our database but we would like to retain the existing Id's if possible.

I have tried editing the OnModelCreating method, which seems to work fine for Entities i have created myself, but not for the Tenant Entity.

If you can let me know if this is possible or just point me in the right direction that would be great. Thanks

Github issue raised

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/997">https://github.com/aspnetboilerplate/as ... issues/997</a>

Many Thanks!

Yes it is, here is Controller

[HttpPost]
        public async Task<JsonResult> UpdateCloudRepositoryContract(SplaVeeamCloudRepositoryContractUpdateViewModel model)
        {
            CheckModelState();

            DoStuf();

            return Json(new {ContractId = model.Id});
        }

Thanks

Hello,

i am currently trying to post a form in a partial view using abp.ajax. The actual form posting works fine, and when the form is filled out correct, the success event fires as expected. The problem arises when there is an error in the form, the InclusiveUnits field has a range applied to it (via Data Annotations). When a value is outside of this range the CheckModelState(); throws an exception as expected, however this doesn't get returned wrapped, it gets returned as html.

Here is the javascript

var form = $("#UpdateForm");

       abp.ajax({
                url: form.attr("action"),
                data: JSON.stringify({
                    accountId: $("#AccountId").val(),
                    accountName: $("#AccountName").val(),
                    contractName: $("#ContractName").val(),
                    serviceName: $("#ServiceName").val(),
                    repositoryId: $("RepositoryId").val(),
                    inclusiveUnits: $("#InclusiveUnits").val(),
                    autoTaskUnits: $("#AutoTaskUnits").val()
               
                })
            })
            .done(function(response) {
                abp.message.success("success");
            })
            .fail(function (response) {
                abp.ajax.showError(response);
                abp.ajax.logError(response);
            });
    });

When the call is successful i receive this response

{
  "success": true,
  "result": {
    "contractId": 39
  },
  "error": null,
  "unAuthorizedRequest": false
}

however when it fails i get a html page that starts with the following

Form is not valid. Please check and fix errors.

I have checked and i am running the latest version of ABP v8.4.0. Is there an issue with the way i am trying to display the validation errors or could this be a bug?

Any help is much appreciated. Tom

Hello!

Is it possible to update the sample Console Application <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/AbpEfConsoleApp">https://github.com/aspnetboilerplate/as ... ConsoleApp</a> for version 0.8.1?

When i try and run my console application i receive the following error

Message: No component for supporting the service Abp.Threading.BackgroundWorkers.IBackgroundWorkerManager was found Inner Exception: Stack Trace: at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelIn ternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments) at Castle.Windsor.WindsorContainer.ResolveT at Abp.Dependency.IocManager.ResolveT at Abp.AbpKernelModule.Shutdown() at Abp.Modules.AbpModuleManager.<ShutdownModules>b__6(AbpModuleInfo sm) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.ShutdownModules() at Abp.AbpBootstrapper.Dispose() at Portal.ConsoleApplication.Program.Main(String[] args) in C:\Users\admin.tom.adams.CTL-PORTAL\Documents\Visual Studio 2015\Projects\Portal\Portal.ConsoleApplication\Program.cs:line 129

It errors on this line bootstrapper.Initialize();

using (AbpBootstrapper bootstrapper = new AbpBootstrapper())
                {
                    // Load logging configuration
                    bootstrapper.IocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig("log4net.config"));
                    bootstrapper.Initialize();
}

Many Thanks

Answer

Apologies, i just misread the documentation! Its working now, just injected it into the class. Many Thanks

Question

Hello,

i am trying to use the SettingManager in one of my ApplicationService classes. From what i am reading in the documentation, because my class is derived from "ApplicationService" class, there is no need to inject the SettingManager and i just access it like a property. However, whenever i try and access the SettingManager its set to null and therefore it throws and exception whenever i try and access anything.

public class AutoTaskAppService : PortalAppServiceBase , IAutoTaskAppService
    {

        public AutoTaskAppService()
        {

        }

        public ATWSSoapClient AutoTaskConnection()
        {

        // Access the SettingManager
       string test = SettingManager.GetSettingValue(PortalSettingNames.AutoTaskApiUserName);

}
}

Is there a step that i'm missing? Cheers

Showing 11 to 17 of 17 entries