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

Activities of "carelearning"

Hello,

Thank you for your reply. This issue was caused by a number of factors:

  1. We had development databases with the simpleStringCipher issue here:https://github.com/aspnetboilerplate/aspnetboilerplate/pull/2071/commits/7cf02f9362f9067052f83a30d81490758659d76c. So to easily correct this, we deleted and recreated our host database.
  2. We forgot to add the friendships and appchatmessages tables from this issue https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=3892&p=8739#p8739
  3. When that error happens and we are running in debug mode but with "start without debugging" (also known as ctrl-F5 instead of just F5 in visual studio) then we do not see the error from #2 above, but get the signalR error in javascript.

This is not a problem with the upgrade. If it is possible to add better error handling for this situation, we would be be very grateful.

Thank you.

Hello,

I apologize for the confusion, but yes. To be precise, we updated to the latest version of the "dev" branch in ASPNetZero here: https://github.com/aspnetzero/aspnet-zero/commit/683de0612490f512be79af464ec87e6f5e1bf3b6

Thank you for your help.

We have been successfully using signalR in our application. We recently upgraded to version 4 .0 here: 683de.... After that we are getting this javascript error:

VM41:1 GET http://localhost:5000/signalr/start?transport=webSockets&clientProtocol=1.5…22abpcommonhub%22%7D%2C%7B%22name%22%3A%22chathub%22%7D%5D&_=1493234804063 500 (Internal Server Error)

Are there any known issues with using signalR with the latest version?

Thank you so much. This works!

We sent FTP credential information to <a href="mailto:[email protected]">[email protected]</a> this morning, Monday, March 6th, 2017 to access the project.

Hello, Sure as long as your email servers can accept a 20mb zip file or larger. Otherwise we may need somewhere to upload this project for you. Let us know if the email does not arrive. Thanks

Thanks for the quick reply.

When we encountered the issue we created a sample project to replicate using the latest version from the dev branch of aspnetzero/aspnet-zero (commit sha1 is bb2c66009d859afc5b466dbee228ba9e32bac9fb).

Hello,

We have a service that is inserting a record like this:

// GroupAppService
  public GroupDto Add(GroupAddDto dto)
        {
            if (String.IsNullOrWhiteSpace(dto.Name))
                return GroupDto.NullInstance();

	    var group = dto.ToGroup();
            var id = _groupRepository.InsertAndGetId(group);
 
            group.Id = id;//id is always zero

            return dto.FromGroup(group);
        }

We are calling this service from our controller like this:

// GroupController
        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Add(GroupAddViewModel viewModel) 
        { 
            if (!ModelState.IsValid)
                return View(viewModel);
 
	   var dto = new GroupAddDto(viewModel.Name);
            var returnedDto = _groupAppService.Add(dto);
 
            if (returnedDto.Id == 0)
                return Content($"Group with name {returnedDto.Name} returned id is 0.");//this is hit every time and data is inserted
 
            return RedirectToAction("Index");
        }

The information is saved to our table (see attached). But the id returned is always zero. We tried to follow the advice from [https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1387]). Do you know how we can get the ID back of the group inserted?

Thank you for your time and effort.

Hello,

We are trying to get the tenant.Id in the Seed(AbpZeroTemplateTenantDbContext context) method. We are currently doing it as below:

protected override void Seed(AbpZeroTemplateTenantDbContext context)
{
//Data Source=(localdb)\projectsv13; Initial Catalog=abp_tenant_name;
var tenancyName = new SqlConnectionStringBuilder(context.Database.Connection.ConnectionString)
.InitialCatalog.TrimStart(CustomConsts.DatabasePrefix.ToCharArray());

// prefix: abp_ so tenant name is tenant_name
var hostContext = new AbpZeroTemplateDbContext();
var tenant = hostContext.Tenants.SingleOrDefault(t => t.TenancyName == tenancyName);

        var tenantId = 0;
        if (tenant != null)
            tenantId = tenant.Id;

        var initialTenantDbBuilder = new InitialTenantDbBuilder(context);
        initialTenantDbBuilder.Create(tenantId);

        context.SaveChanges();
    }

Is there a better or more simple way to do this?

Thank you for your time and effort.

Answer

That works! Thank you.

Showing 71 to 80 of 108 entries