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

Activities of "joe704la"

I am trying to force users to use https in the angular app in production. I added the below rule in the web.config but it seemed to kind of break things

<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
            <match url="(.*)" />
                <conditions logicalGrouping="MatchAny">
                        <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
             <action type="Redirect" url="https://{HTTP_HOST}" redirectType="SeeOther" />
        </rule>
        <rule name="Angular Routes" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
          </conditions>
          <action type="Rewrite" url="/" />
        </rule>

I added the Redirect HTTP to HTTPS rule.

Any help would be appreciated.

I saw how I can call the loading indicator for a data table (this.primengDatatableHelper.showLoadingIndicator();). But I was wondering how I can show a component loader while its loading the template view?

Oh yes I should have thought of that. Thanks for the help.

Yes. None of them are required.

Sure. Its two methods. One for the actual service and the other to create the query.

public async Task<PagedResultDto<EmployeeListDto>> OpenEmployeeDirectory(GetEmployeePagedInput input)
        {
            var query = CreateEmployeeDirectoryQuery(input);

            var employeeList = await query
                .OrderBy(input.Sorting)
                .PageBy(input)
                .ToListAsync();

            var employeeCount = await query.CountAsync();

            return new PagedResultDto<EmployeeListDto>
                (employeeCount, ObjectMapper.Map<List<EmployeeListDto>>(employeeList));
        }

        private IQueryable<Employee> CreateEmployeeDirectoryQuery(GetEmployeePagedInput input)
        {
            var query = _employeeRepository.GetAll()
                .Select(e => new Employee
            {
                Id = e.Id,
                ProId = e.ProId,
                FirstName = e.FirstName,
                LastName = e.LastName,
                WorkPhone = e.WorkPhone,
                WorkExtension = e.WorkExtension,
                EmployeeEmail = e.EmployeeEmail,
                Department = e.Department,
                Division = e.Division,
                SupervisorName = e.SupervisorName
            });

            query = query
                .WhereIf(!input.Filter.IsNullOrWhiteSpace(), pc => pc.FirstName.Contains(input.Filter) ||
                                                                   pc.LastName.Contains(input.Filter) ||
                                                                   pc.EmployeeStatus.Contains(input.Filter) ||
                                                                   pc.EmployeeEmail.Contains(input.Filter));

            return query;
        }

I haven't had this issue before today. I created a new service. Very basic one. It returns a PagedResultDto. It works just fine when not using a search parameter. But as soon as I add a search parameter I get the below error.

My input looks like this. Any help would be greatly appreciated.

public class GetEmployeePagedInput : PagedAndSortedInputDto, IShouldNormalize
    {
        [StringLength(120)]
        public string Filter { get; set; }

        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "FirstName";
            }
        }
    }

ERROR 2017-12-05 18:09:40,996 [23 ] Mvc.ExceptionHandling.AbpExceptionFilter - Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at lambda_method(Closure , ValueBuffer ) at System.Linq.AsyncEnumerable.WhereEnumerableAsyncIterator1.<MoveNextCore>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.AsyncIterator1.<MoveNext>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.TakeAsyncIterator1.<MoveNextCore>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.AsyncIterator1.<MoveNext>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator2.<MoveNextCore>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.AsyncIterator1.<MoveNext>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.EntityFrameworkCore.Query.Internal.AsyncLinqOperatorProvider.ExceptionInterceptor1.EnumeratorExceptionInterceptor.<MoveNext>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Linq.AsyncEnumerable.<Aggregate_>d__63.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at PHS.EmployeeDirectory.EmployeeDirectoryService.

Have you figured the build issue yet? I am having the same issues.

Question

I would like to add some extra properties to the Abp session? I looked at <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Abp-Session?searchKey=session">https://aspnetboilerplate.com/Pages/Doc ... ey=session</a> but didn't go in-depth enough to help. Has anyone else extended the Abp Session yet?

After updating to 4.5.1 and doing a ng build I am now getting the following error when I try to visit our site. Does anyone have any ideas?

Uncaught Error: Cannot enable prod mode after platform setup. at ce (vendor.de69c82deb44e6b6e7ea.bundle.js:1) at Object.cDNt (main.f5488ece5fd3a5a2f463.bundle.js:1) at n (inline.81d87e40e2b3ec0c3391.bundle.js:1) at Object.0 (main.f5488ece5fd3a5a2f463.bundle.js:1) at n (inline.81d87e40e2b3ec0c3391.bundle.js:1) at window.webpackJsonp (inline.81d87e40e2b3ec0c3391.bundle.js:1) at main.f5488ece5fd3a5a2f463.bundle.js:1

@ismcagdas just created one here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/349">https://github.com/aspnetzero/aspnet-ze ... issues/349</a>

Thank you

Showing 101 to 110 of 246 entries