Base solution for your next web application

Activities of "soulmate"

ok, what is your recommendation? Remove the IMustHaveTenant from my base entity? Or would it be possible to assign a default tenant for the user?

That sounds great to me! Thank you once again for your great work

ah sorry. I left it blank while logging in (the application has just a default tenant by now)

No, the entity is created from the UI. I am logged in as a "normal" user. Do you have any other ideas?

I created with /mpa a new edition and yes, the creatorid is saved

Sorry my mistake. The name of the entity class is SalesEntityBase and Offer inherits from it. I corrected the original post.

Of cause, it is based on the kendo upload control. It is strange, the code worked perfectly before. The method I describe above is never hit, so I think there is a new filter or something that blocks the request

@(Html.Kendo().Upload()
          .Name("files").TemplateId("fileTemplate")

          .Async(a => a
              .Save("UploadFiles", "OfferFile", new { offerId = Model.OfferId })
              .Remove("RemoveFiles", "OfferFile", new { offerId = Model.OfferId })
              .AutoUpload(true)
          )
          .Files(files =>
          {
              foreach (var f in Model.Files)
              {
                  files.Add().Name(f.Name).Extension(f.FileType);
              }
          })
    )

Hi, Thank you. I registered it like that and the module works. HOWEVER: After one minute I receive an exception in MethodInvocationValidator and my local website (IIS) crashes:

Exception information: Exception type: HttpException Exception message: The client disconnected. at System.Web.Hosting.IIS7WorkerRequest.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) at System.Web.HttpBufferlessInputStream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state) at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state) at System.Threading.Tasks.TaskFactory1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func5 beginMethod, Func`3 endMethod) at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at Microsoft.Owin.Host.SystemWeb.CallStreams.DelegatingStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count) at System.IO.StreamReader.

Here is the code of the module:

[DependsOn(typeof(MyAppDataModule))]
    [DependsOn(typeof(MyAppApplicationModule))]
    [DependsOn(typeof(MyAppCoreModule))]
    [DependsOn(typeof(AbpHangfireModule))]
    public class TestModule : AbpModule
    {
        public ILogger Logger { get; set; }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

            Configuration.Settings.Providers.Add&lt;TestProxySettingProvider&gt;();
            Configuration.Settings.Providers.Add&lt;QutationServicesSettingProvider&gt;();

            if (System.Diagnostics.Debugger.IsAttached)
            {
                Configuration.Auditing.IsEnabled = false;

            }
            
        }


        public override void PostInitialize()
        {
            base.PostInitialize();

            try
            {
                JobDefinition jobDefinition = new JobDefinition(IocManager);



                RecurringJob.AddOrUpdate("Provider Reminder offer 24 hours", () => jobDefinition.OfferReminderJobDefinition(24), Cron.Hourly(0));
              

            }
            catch (Exception ex)
            {
                Logger.ErrorFormat("Error in Test Module: {0}", ex);
            }
         
        }
    }

I also published the version to Azure and after 1 minute the application pool crashes.

the module worked without any troubles in the previsous version. Do you have any idea why this happen?

0.9.3

Yes, here is the code. However, the code is not hit at any time, so I think where is a filter or something like that before that prevents the execution:

[DisableAuditing]
        public ActionResult UploadFiles(IEnumerable<HttpPostedFileBase> files, int offerId)
        {
            // The Name of the Upload component is "files"
            if (files != null)
            {
                foreach (var file in files)
                {
                    var offerFile = new OfferFile();
                    var fileName = Path.GetFileName(file.FileName);

                    //Check if file exist
                    offerFile = _offerFileService.GetByNameAndOfferId(fileName, offerId) ?? new OfferFile();

                    offerFile.Name = fileName;
                    offerFile.FileType = file.ContentType;
                    offerFile.OfferId = offerId;
                    using (var binaryReader = new BinaryReader(file.InputStream))
                    {
                        offerFile.File = binaryReader.ReadBytes(file.ContentLength);
                    }

                    //Save
                    _offerFileService.Save(offerFile);
                }
            }

            // Return an empty string to signify success
            return Content("");
        }
Showing 1 to 10 of 23 entries