locked
Why does my program try to connect a wrong path? RRS feed

  • Question

  • User-2027652359 posted

    Hi,

    I'm trying to include some fonts files in my project and set the path to be:

    src: url("/fonts/fa-regular-400.eot");
    src: url("/fonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("/fonts/fa-regular-400.woff2") format("woff2"), url("/fonts/fa-regular-400.woff") format("woff"), url("/fonts/fa-regular-400.ttf") format("truetype"), url("/fonts/fa-regular-400.svg#fontawesome") format("svg");

    However, when I run my program and check the "Network" tab in the devTools (f12), it shows that the path it tries to connect is:

    http://localhost:29093/webfonts/fa-regular-400.woff2
    

    The location of my "fa-regular-400.woff2" file is in a folder named "fonts" in my project, and also when I tried to look for the word "webfonts" in my project it showed there is no such a word there, so how did it come that my file considered to be taken from a "webfonts" folder?

    I'll be thankful to get possible solutions from you!

    Friday, October 11, 2019 10:49 AM

All replies

  • User753101303 posted

    Hi,

    And it ends up with which status code? You see only a direct query to this location or do you see some http redirection ? Maybe just using still an outdated stylesheet and/or not being triggered with the rule/script you think ? If I really can't find any furhter info I would perhaps changhe the first name to see if it has spme effect or not...

    Friday, October 11, 2019 11:32 AM
  • User-2027652359 posted

    Hi, Patrice, Thanks for your reply!

    The status code is 404 (not found). Actually, I've no previous experiences with ASP.NET and devTools so I couldn't understand everything you write.

    In case you don't mind- would you like to add more detailed instructions, please? I think I'll be able to understand you better.

    Here are some details from the "headers" subtab if it can help: 

      1. Request URL:  http://localhost:29093/webfonts/fa-regular-400.woff2
      2. Request Method: GET
      3. Status Code:  404 Not Found
        <slot></slot>
      4. Remote Address: [::1]:29093
      5. Referrer Policy: no-referrer-when-downgrade
    1. Response Headersview source
      1. Cache-Control: private
      2. Content-Length: 5070
      3. Content-Type: text/html; charset=utf-8
      4. Date: Tue, 08 Oct 2019 01:35:04 GMT
      5. Server: Microsoft-IIS/10.0
      6. X-Powered-By: ASP.NET
      7. X-SourceFiles: =?UTF-8?B?RDpc5aSn5a2mXNep16DXlCDXklzXodeZ157XodeY16gg15DXnNeV15xc157Xl9ep15XXkSDXoteg159cQXBwc1xJY2VjcmVhbVzXlNek16jXldeZ16fXmCDXqdei15XXkdeTXEljZUNyZWFtUHJvamVjdFxJY2VDcmVhbVByb2plY3Rcd2ViZm9udHNcZmEtcmVndWxhci00MDAud29mZjI=?=
    2. Request Headersview source
      1. Accept: */*
      2. Accept-Encoding: gzip, deflate, br
      3. Accept-Language: eo,he;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6
      4. Connection: keep-alive
      5. DNT: 1
      6. Host: localhost:29093
      7. Origin: http://localhost:29093
      8. Referer: http://localhost:29093/Content/all.css
      9. Sec-Fetch-Mode: cors
      10. Sec-Fetch-Site: same-origin
      11. User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36

    Thanks!

    Friday, October 11, 2019 12:46 PM
  • User-474980206 posted

    you should use the browser tools to search for the reference. chrome will give a reference to line that made the network call.

    Friday, October 11, 2019 7:55 PM
  • User665608656 posted

    Hi Idit,

    The status code is 404 (not found). Actually, I've no previous experiences with ASP.NET and devTools so I couldn't understand everything you write.

    The 404 error indicates that the page you are currently accessing does not exist.  It’s called a 404 error because that’s the HTTP status code that the web server uses to describe that kind of error. Different websites might show you different kinds of custom pages when you get this error.

    You can try following ways to solve your issue:

    1. Refresh the Page
    2. Double Check the Address
    3. Perform a Search
    4. Clear Your Browser Cache

    For more details, you could refer to this link : How to Fix a 404 Not Found Error

    Best Regards,

    YongQing.

    Monday, October 14, 2019 3:30 AM
  • User-2027652359 posted

    Hi YongQing,

    Thank you for your kindness and the efforts you made to help me,

    I really appreciate that!

    I know what 404 error means, and I tried again the options you offered but the problem wasn't solved.

    Finally, when I opened the project again, a few days later, the issue was solved by itself(!),

    I don't know how, but this is not the first time that such a thing happened to me while using the ASP.NET platform. 

    Thanks again,

    Idit.

    Monday, October 21, 2019 5:17 PM
  • User753101303 posted

    Looks like you used an outdated CSS stylesheet because of browser caching...

    Tuesday, October 22, 2019 7:52 AM