Open Closed

We can't access the application with https #9277


0
InfoCentre created

Our ASPNetZero application is loaded on our domain https://LifeHistory.app Since we activated SSL on our site it won't load up.

As you can see below, we cannot load our application with https. It just goes round and round forever. We can load html using http.

PLEASE help us know what we need to do to make it work.

We completely deleted the site and replaced it with a simple HTML site. That site worked perfectly under the SSL https scenario. When we reload our ASPNetZero application code it won't load.

We are tearing our hair out on this one. PLEASE HELP.

We have also tried the same thing with demo code in a different folder on a related domain at https://MyLifeHistoryApp.com and it seems to load. What is different?

Would it help for us to send you source code?

Skip Weeks


9 Answer(s)
  • 0
    maliming created
    Support Team

    hi

    This url does not return a json file. https://lifehistory.app/assets/appconfig.production.json

    If you are using iis, please use web.config in angular project

  • 0
    InfoCentre created

    I have used web.config also. It's working for http urls without issues using web.config. For your reference working test environments (http://mylifehistorymatters.com, http://mylifestorymatters.org)

    When i try using https(https://mylifehistoryapp.com, https://lifehistory.app), then only i am getting the below error in the client side console.

    main.cc0f591fb65b72b5ada5.js:1 ERROR SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.i.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (main.cc0f591fb65b72b5ada5.js:1) at XMLHttpRequest.I (polyfills.f43a07710c5461fd2ff1.js:1) at t.invokeTask (polyfills.f43a07710c5461fd2ff1.js:1) at Object.onInvokeTask (main.cc0f591fb65b72b5ada5.js:1) at t.invokeTask (polyfills.f43a07710c5461fd2ff1.js:1) at e.runTask (polyfills.f43a07710c5461fd2ff1.js:1) at e.invokeTask [as invoke] (polyfills.f43a07710c5461fd2ff1.js:1) at b (polyfills.f43a07710c5461fd2ff1.js:1) at XMLHttpRequest.m (polyfills.f43a07710c5461fd2ff1.js:1)

    Thanks & Regards, Dhamodharan

  • 0
    maliming created
    Support Team

    hi @InfoCentre

    Can you share the web.config of https://lifehistory.app website?

    I think the problem is web.config. appconfig.production.json is static file but your website does't return a json file.https://lifehistory.app/assets/appconfig.production.json

    eg http://mylifestorymatters.org/assets/appconfig.production.json

  • 0
    InfoCentre created

    Here's a link to the web.config file

    https://www.dropbox.com/s/lj1gkfumvfw0lh6/web.config?dl=0

  • 0
    maliming created
    Support Team

    web.config seems incomplete, is this the cause of the problem?

  • 0
    InfoCentre created

    I had cut and pasted the incomplete contents. Here it is again:


    <?xml version="1.0" encoding="utf-8"?>

    <configuration>   <system.webServer>     <staticContent>       <remove fileExtension=".json" />       <mimeMap fileExtension=".json" mimeType="application/json" />   <mimeMap fileExtension="woff" mimeType="application/font-woff" />       <mimeMap fileExtension="woff2" mimeType="application/font-woff" />     </staticContent>     <!-- IIS URL Rewrite for Angular routes -->     <rewrite>       <rules>         <rule name="Angular Routes" stopProcessing="true">           <match url=".*" />           <conditions logicalGrouping="MatchAll">             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />             <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />           </conditions>           <action type="Rewrite" url="/index.html" />         </rule>       </rules>     </rewrite>   </system.webServer>

    </configuration>


    Am I missing something still?

  • 0
    InfoCentre created

    Dear Maliming:

    Were you able to take a look at our complete web.config?

    We are anxious to be able to get our ASPNetZero app working on https.

    Thanks - Skip Weeks

  • 0
    smry created

    your app looks never hits the API from what the network is showing, can you check contents of: assets/appconfig.production.json make sure remoteServiceBaseUrl and appBaseUrl are pointing to the right URLs

    Also, your app looks like it returns Content-Type: text/html for a JSON file instead of content-type: application/json

    On IIS, did you convert the API as an Application?

  • 0
    ismcagdas created
    Support Team

    Hi @InfoCentre

    1. Do you host ASP.NET Core app and Angular app on the same website ?
    2. If they are hosted separately, could you try using this web.config for your angular app.

    If those don't work, please send an email to info@aspnetzero.com and we will help you solve this problem.