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

Activities of "moustafa"

Hello i have a small problem in ui-grid - v4.0.2 as you can see in the attached image in Users Page there is only one record and in the grid footer ui-grid tells me that it's showing from record 1-2 so it's always increasing records per page by one but i don't know why

any ideas?

Hello everyone i have a small issue hope you can help me with my application contains four different languages, in the public website i have for example News Page so i can write single news (item) with the four languages and then user can select the language he wants to read news in the frontend but suppose that user wants to share news item url in social media like Facebook so he want to be sure that he shared the url with the language he understand like Spain not English so i tried to do this , so when the user copy and past url in Facebook feed the news page will show up with the default language (English) of the application and the same if the user navigate to that url he will see the news page with the default language of the application and he was expected as the user who shared the news url he will see page with Spain not English so he probably get confused so i think if we can pass current language in the query string it will be more convenient how can we achieve that?

Thank you

Question

I'm using SQL Server Session mode in my web application that depends on aspnetboilerplate templates only (asp.net zero not involved) i set timeout to 720 minutes but unfortunately it still expires after 20 minutes i created database for creating sessions web.config

<system.web>
	<sessionState allowCustomSqlDatabase="true" cookieName="myCookies" mode="SQLServer" sqlCommandTimeout="180" sqlConnectionString="Data Source=ServerName;Initial Catalog=mcsorgsa_sessionstate;User ID=DatabaseName; Password=xxxxxxx;" timeout="720" cookieless="false" />
  </system.web>

Startup.cs

public void Configuration(IAppBuilder app)
        {
            app.UseAbp();

            app.UseOAuthBearerAuthentication(AccountController.OAuthBearerOptions);

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login"),
                ExpireTimeSpan = TimeSpan.FromMinutes(720),
                SlidingExpiration = true,
                Provider = new CookieAuthenticationProvider
                {
                    OnResponseSignIn = signInContext =>
                    {
                        signInContext.Properties.IssuedUtc = DateTime.UtcNow;
                        signInContext.Properties.ExpiresUtc = DateTime.UtcNow.Add(TimeSpan.FromMinutes(720));
                    }
                }
            });

            app.MapSignalR();
        }

after cookiea are been expired when trying to access web api service i got this error Empty or invalid anti forgery header token then when i refresh the page i detect i'm not be signed on anymore , and i'm very sure the session stored in database not expired yet what's is going on ? any ideas? regards,

Question

Hello everyone before i type this post i searched the entire forum for related posts and i wondering why no one had been noticed this problem before , maybe i failed to search properly and i will do again ;)

to follow me throw this issue i prefer to use the original template of ASP.NET Zero without doing any changes so we can easily identify the cause of problem make sure that you run the application in release mode so css and js files got bundled and minificated actually nothing is wrong with bundling but the real problem is Minification process if you try to open the link of all ccs & js bundles in separated page you will see the following error Minification failed. Returning unminified contents. :shock: did anyone face this problem except me ? so i tried to figure out why , for css bundles its easy to detect the errors and fix the problem but it's not easy at all to do the same for js bundles i notices that for the bundle named "libs" it throw many errors like run-time error JS1019: Can't have 'break' outside of loop: break a after many tries when i remove the angular.min.js file the error is gone but as you know your application will not work again :D

so who can help us to solve these problems as this issue affect application performance badly

Hello everyone,

i have a serious situation here , for your record i use MVC with Angular 1.x template

when i started my project i never use migrations so i just make changes to my classes then use command update-database -force in PMC to reflect the changes to database , even if i had problems during this process i easily delete the old database because i'm in the middle of development mode , but what about publishing and production what i do if i have to make changes , can anyone advice me what to do before get forward to the next step , is it possible to make migration class with all the changes been made during the development i hope that my question is clear enough

thank you in advance

Hello everyone Recently i downloaded the latest version of ASP.NET CORE & Angular 2.x and successfully run it on my machine but still confused about the changes made i hope i can understand what's really is going on :D but i have to admit that great job and efforts done and i really thank you for that , actually no words can describe how really i admire your brains and i wish you more success

As you know one of the main changes is using Jtable instead of ui-grid which i like so much 1- is there any chance to use ui-grid with ng2 ? to be honest Jtable is great and had many options but from the first look i noticed some issues related to ui need to be fixed i'll mention it later in different topics and i'm sure you can upgrade it to be much better than ui-grid

2- Where is Frontend website ? i suppose it will be separated from all other projects if so it'll be awesome as i have a requirement to use the same project for server & client projects for all tenants but use different frontend website for each one of them , i hope you got the idea

3- I'm currently use ASP.NET & Angular 1.x and i'll wait some time till i upgrade my project to ASP.NET CORE & Angular 2.x so is it save for me to do that i meant you still support ASP.NET & Angular 1.x Project as it suitable for many users ? thanks in advance regards

Hello, how can i change all primary keys from long to Guid that including all tables such as user,role,permissions,..etc

Hello i need to implement validation messages in spa forms because most of fields are different in validation some is required some has max-length some has min-length , some use regex and so on any suggestions i know about ng-messages in angular but i think i have to write a lot of code to handle all validation messages on my project is there any way to make validation messages shared between of my views thanks in advance

Hello, in my service i have condition that if true then must make some changes to database, but because i'm using UserFriendlyException it rollback all changes made, so i tried unitOfWork.Complete() but unfortunately the same behaviour

///////////////////////////////////
/////////// rest of code  /////////
///////////////////////////////////
                      if (condition)
                        {
                            
                            using (var unitOfWork = _unitOfWorkManager.Begin())
                            {
                               patient.IsActive = false;
                             _patientRepository.Update(patient);
                                unitOfWork.Complete();

                            }
                            throw new UserFriendlyException(18, L("CannotBookAppointmentIsAgeRestriction"), "");
                        }

/////////// another conditions /////////
///////////////////////////////////
/////////// rest of code  /////////
///////////////////////////////////

hello i have a problem in seed method that it doesn't run all code inside from the first time so i have to run update-database -verbose several times to get all code executed

protected override void Seed(EntityFramework.UmbrellaDbContext context)
        {
            context.DisableAllFilters();

            context.Database.ExecuteSqlCommand("DBCC CHECKIDENT('AbpUsers', RESEED, 101)");
            context.Database.ExecuteSqlCommand("DBCC CHECKIDENT('HmPatients', RESEED, 10001)");
            context.Database.ExecuteSqlCommand("DBCC CHECKIDENT('HmDoctors', RESEED, 201)");

            if (Tenant == null)
            {
                //Host seed
                new InitialHostDbBuilder(context).Create();

                //Default tenant seed (in host database).
                new DefaultTenantBuilder(context).Create();
                new TenantRoleAndUserBuilder(context, 1).Create();
            }
            else
            {
                //You can add seed for tenant databases using Tenant property...
            }

            new InitialRelationshipCreator(context).Create();
            new InitialClinicCreator(context).Create();
            new InitialAppointmentCreator(context).Create();
            context.SaveChanges();
        }
Showing 11 to 20 of 35 entries