Base solution for your next web application

Activities of "majid"

Answer

Thanks @maliming Solved

Thanks @maliming Solved

Question

Hi For some resons we have decided to use raw sql inside server code. But it does not work : Context.Databse.ExecuteRawSql(...); it has no errors but it does Nothing .

I want to use the language that user has selected at login time how can i find it on the server code ? where is it located ?

Hi @ismcagdas This problem does not exist when we are in the program. But when we close the program and reopen it, the value of ApiUrlConfig is the same as the one we set on the server.

I store information in serverInformation.ServerRootAddress and ApiUrlConfig.BaseUrl at the same time(According to the above post) . As you can see in the image below, the serverInformation.ServerRootAddress value is correct, but the ApiUrlConfig.BaseUrl value returns to the previous settings(Server Side Settings).

Hello I have a problem with the Xamarin section of the program I want the default IP address set by the server to be changed on the Xamarin program, so that the default IP address on the Xamarin program does not depend on the server. This means that users can enter their IP and be able to connect to the server with different IPs and ports

To do this, I use the following source code:

To get the Server Root Address And Tenant:

ServerRootAddress = ApiUrlConfig.BaseUrl; TenantName = _applicationContext.CurrentTenant != null ? _applicationContext.CurrentTenant.TenancyName : "";

To set the address and Tenant:

     await Task.Run(() =>
        {
            _applicationContext.ClearLoginInfo();
            Task<TS.Main.Authorization.Accounts.Dto.IsTenantAvailableOutput>
            isTenantAvailableOutput;
            isTenantAvailableOutput = _accountAppService.IsTenantAvailable
            (new IsTenantAvailableInput() { TenancyName = TenantName });
            if (isTenantAvailableOutput.Result.TenantId != null)
            {
                _applicationContext.SetAsTenant(TenantName,
                                        (int)isTenantAvailableOutput.Result.TenantId);
                _applicationContext.SetServerInfo(new
                    ServerInformation(ServerRootAddress));
                UserDialogs.Instance.AlertAsync(L.Localize("ConfigConnection_Saved"),
                   L.Localize("ConfigConnection"), L.Localize("Ok"));
                ServerInformation serv =   _applicationContext.ServerInfo;
                _dataStorageService.StoreTenantInfoAsync(
                                _applicationContext.CurrentTenant);
                _dataStorageService.StoreServerInformationAsync(serv);
                ApiUrlConfig.ChangeBaseUrl(ServerRootAddress);
            }
        });
        

When I set up the IP and port, it is stored correctly and I can even receive information from within the program with the new address. But when you exit the program (logout), the information is reset and returns to the default settings set on the server side.

Hi @alper We only use IIS and we don't use NGINX.

Please guide, where do we check that "Abp.TenantId" comes as "Abp-TenantId" (Function name or method to check)? I don't think there is a problem with this. Because in debug mode, TenantId is fetched from the server immediately by entering TenantName

More explanation: No errors are written to the log file server when calling "IsTenantAvailable" . But when the Xamarin program receives the TenantId , the program falls into the following code

More explanation that we turn off all vpn and proxy .

The web and swagger programs run correctly. This problem is only in the xamarin program.

This problem only occurs once in the beginning of the program and in the explanation given

Hi @ismcagdas I made a great effort to solve the problem. But the problem was not solved. At the top of the page I put my problem in the movie format.

can you show the issue with a video?

@alper See the problem as a movie: https://youtu.be/kaBEontsvf0

My problem is not connecting to the service , Because after importing TenantName, I get TenantId from server. My problem is when I first log in and the tenant is empty. When I open the application and the tenant is empty, I can't even log in with the correct data (In this situation, the Tenant and Username and Password are not empty). I enter the tenant and the username and password and click the login button several times, but each time it gives the following error: I need to close and reopen the app so that I can login successfully. Please follow the same steps in the Xamarin program and announce the result.

I tested on Samsung j7 and Asus fonepad . Application version 7.2.0.0 Thanks

Showing 1 to 10 of 18 entries