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

Activities of "lalande1988"

Hi @ismcagdas,

Excellent, this one worked, thank you very much!

Kind regards,

Hi @ismcagdas,

thank you!

Yes, Postman, please see the headers below. I can share the real link (via mail?) to you if you would like to see for yourself?

body:

Hi,

Thank you!

CORS has been enabled in the startup.cs file. If this is not the case, the error will be different. I.e. in that case the error will be in the chrome developer console correctly stating that CORS has not been enabled. Without CORS the case of the empty (call without ajax data) would not be working as well.

It looks like there is a kind of pre-validation before the validation of my data.

Maybe you have one more idea?

Thank you and kind regards!

Startup:

    services.AddCors(options =>
    {
        options.AddPolicy(name: _corsPolicy, policy =>
        {
            policy
            .AllowAnyOrigin()
            .AllowAnyHeader()
            .AllowAnyMethod()
            ;
        });
    });
    .....
    app.UseCors(_corsPolicy);  // Note: must be after UseRouting and before UseAuthorization

Thank you for you r feedback!

Your suggestion works fine, as expected. Find the code and console response below.

To avoid misunderstandings: the Web API will be utilized by a customer, i.e. from any web page making an ajax call. They could even use a different technology. My test setup is a web page making the call as in the example at the top.

So: making the call from a view on my page works fine, so does Swagger and Postman. Only another page making a cross origin call fails.

js Code:

    console.log("starting premium test");
    let formData = {
        "premiumInput": {
            "territory": 1,
            "postcode": "B37 7HQ",
            "eircode": "",
            "address_1": "",
            "address_2": "",
            "occupancy": 0,
            "buildingType": 0,
            "yearBuilt": 2000,
            "sumInsuredBuilding": 100000,
            "sumInsuredContents": 200000,
            "sumInsuredBi": 300000,
            "deductibleFlood": 111,   // only this will be evaluated to know we have reached the service
            "deductibleFreeze": 250,
            "deductibleStormSurge": 250,
            "deductibleSubsidence": 250,
            "deductibleTheft": 250,
            "deductibleWindstorm": 250,
            "percentageRiskShare": 80
        }
    };
    let premiumService = abp.services.app.premium;
    premiumService
        .getCalcPremiums(formData.premiumInput)
        .done(function (result) {
            console.log("done premium test", JSON.stringify(result));
        })
        .fail(function (result) {
            console.log("failes premium test", JSON.stringify(result));
        });

The only dummy calculation is flood = 3 * deductibleFlood (3 * 111 = 333). The other values are constant.

Thank you and kind regards!

Hi,

excellent, this is perfect. Thank you!

@ismcagdas, we are in the same situation as 4Matrix. Would be help to have at least a rough estimation, rather 3months, 1 year... So we might wait a bit - or not. Thanks!

I set stdoutLogEnabled to true and now I can see the log file which indicates the permission error for tempkey.rsa in the project root folder location.

The file was missing from that location. I also found the root folder of the project had no write persmission to IIS User, so I set it too. Performing this task I could see the tempkey.rsa file created in the project root folder. But now the server is giving Error 500:

This page isn’t working 1XX.XXX.XXX.XXX is currently unable to handle this request. HTTP ERROR 500

I checked the log file again this time and it is empty.

NB: .NET core 3.1 IIS Hosting bundle was installed from the begining.

What steps I should take now?

Hi there,

is july-1st, 2020 still realistic? We are in the process of starting and we would be able to wait for 2 weeks.

If not, would you have a means for us to view Metronic 6? The code is not compatible and we would need to check how M6 looked like / copy code snippets.

Thank you and kind regards,

Reiner

Showing 1 to 8 of 8 entries