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

Activities of "kythor"

in the meantime a have fixed it, it was a mixup of appconfig.json and IIS DNS config

I updated both the angular and host to the latest version.

Now I get "An error occured while starting the application" for the host app...

and now after changing nothing but restarting IIS, i get the loading screen and after a while the message "an error has occured". In the F12 network screen there is even nothing, no GetAll or anything...

it gets weirder and weirder.

but the public mvc site loads without a problem... so is this an angular issue?

however it does kind of work if I add the tenant url to my IIS (host name) bindings. but i guess that beats the purpose of auto tenant creation?

and If I login successfully, I get an error on the Angular app, but not on the public mvc site...

doesnt work:

Accept:/ Accept-Encoding:gzip, deflate Accept-Language:nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4 Access-Control-Request-Headers:.aspnetcore.culture,abp.tenantid,authorization,content-type,x-requested-with Access-Control-Request-Method:GET Connection:keep-alive Host:lanista..eu: Origin:http://lanista..eu Referer:http://lanista..eu/ User-Agent:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Hostname</h2>
<hr><p>HTTP Error 400. The request hostname is invalid.</p>
</BODY></HTML>

Angular appconfig.json:

{
  "remoteServiceBaseUrl": "http://{TENANCY_NAME}.mydomain.eu:8080",
  "appBaseUrl": "http://{TENANCY_NAME}.mydomain.eu"
}

Host appconfig.json:

{
  "ConnectionStrings": {
    "Default": "Data Source=**;Initial Catalog=**;Persist Security Info=True;User ID=**;Password=**;MultipleActiveResultSets=True"
  },

  "Abp": {
    "RedisCache": {
      "ConnectionString": "localhost",
      "DatabaseId": -1
    }
  },

  "App": {
    "ServerRootAddress": "http://www.mydomain.eu:8080",
    "ClientRootAddress": "http://www.mydomain.eu",
    "CorsOrigins": "http://www.mydomain.eu,http://www.mydomain.eu:8080"
  },

  "Authentication": {
    "Facebook": {
      "IsEnabled": "false",
      "AppId": "",
      "AppSecret": ""
    },
    "Google": {
      "IsEnabled": "false",
      "ClientId": "",
      "ClientSecret": ""
    },
    "Microsoft": {
      "IsEnabled": "false",
      "ConsumerKey": "",
      "ConsumerSecret": ""
    },
    "JwtBearer": {
      "IsEnabled": "true",
      "SecurityKey": "**",
      "Issuer": "OPTA",
      "Audience": "OPTA"
    }
  },

  "Recaptcha": {
    "SiteKey": "**-**-",
    "SecretKey": "**-**"
  },

  "IdentityServer": {
    "IsEnabled": "true",
    "Clients": [
      {
        "ClientId": "client",
        "AllowedGrantTypes": [ "password" ],
        "ClientSecrets": [
          {
            "Value": "**"
          }
        ],
        "AllowedScopes": [ "default-api" ]
      },
      {
        "ClientId": "demo",
        "ClientName": "MVC Client Demo",
        "AllowedGrantTypes": [ "hybrid", "client_credentials" ],
        "RequireConsent": "true",
        "ClientSecrets": [
          {
            "Value": "**"
          }
        ],
        "RedirectUris": [ "http://openidclientdemo.com:8001/signin-oidc" ],
        "PostLogoutRedirectUris": [ "http://openidclientdemo.com:8001/signout-callback-oidc" ],
        "AllowedScopes": [ "openid", "profile", "default-api" ],
        "AllowOfflineAccess": "true"
      }
    ]
  },

  "Payment": {
    "PayPal": {
      "Environment": "sandbox",
      "BaseUrl": "https://api.sandbox.paypal.com/v1",
      "ClientId": "",
      "ClientSecret": "",
      "DemoUsername": "",
      "DemoPassword": ""
    }
  }
}

now however, when I added a tenant and try to go to the tenant url (eg <a class="postlink" href="http://tenant.domain.com">http://tenant.domain.com</a>) i get an error stating "CORS-header ‘Access-Control-Allow-Origin’ missing

its looking for <a class="postlink" href="http://tenant.domain.com:8080/AbpUserConfiguration/GetAll">http://tenant.domain.com:8080/AbpUserCo ... ion/GetAll</a>

since my RemoteServiceBaseUrl points to http://{tenancy_name}.domain.com:8080

adding <a class="postlink" href="http://tenant.domain.com">http://tenant.domain.com</a> into CorsOrigins field of the host appsettings.json does not fix it

found this post: #4018@5c502c01-b478-4bea-b9c7-320840d7c879

its part of the solution, since my appconfig.json on the host application was not correct, need to add client and host url to "CorsOrigins"

errors again, this is frustrating, because I have not yet changed a line of code...

i get a connection time out error now from just loading the site: :8080/AbpUserConfiguration/GetAll net::ERR_CONNECTION_TIMED_OUT

yes I'm using this web.config. But now it works again...

I'm new with Angular, so excuse my limited knowledge.

Showing 31 to 40 of 93 entries