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 @ismcagdas it;s seems to br that you didn't read the post very well i know how to get current language of users in both client side and server side that is not problem at all so let me explain the issue with an example

in frontend i have link like that <a class="postlink" href="http://127.0.0.1/news?id=10">http://127.0.0.1/news?id=10</a> because website contains four different language for anonymous users he will see that page in default language of the application and the same will happens if i share this url on Facebook or Google+ Feed but what i need to achieve is to make this url like that <a class="postlink" href="http://127.0.0.1/en/news?id=10">http://127.0.0.1/en/news?id=10</a> for English <a class="postlink" href="http://127.0.0.1/ar/news?id=10">http://127.0.0.1/ar/news?id=10</a> for Arabic <a class="postlink" href="http://127.0.0.1/sp/news?id=10">http://127.0.0.1/sp/news?id=10</a> for Spain and so on

by using this behavior user will get the correct language from the first time he visited my website and everyone be happy :) hope this example is clear enough Thanks

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

Hi I'll try 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,

Hi @ ismcagdas

yes i'm asking about migration because i going to production mode and i didn't create migrations classes to changes i made to database but the migrations done from your side exists and i didn't delete it so i 'll try to add single migration as you said and i'll let you know i have a further questions

thanks

Answer

done [https://github.com/aspnetzero/aspnet-zero/issues/490])

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 actually it was a problem and been fixed in v3.2 please refer to this link [https://github.com/aspnetzero/aspnet-zero/issues/427])

Showing 31 to 40 of 110 entries