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

Activities of "thor"

I should add that all the fonts are being loaded as if they were located in the root:

<a class="postlink" href="http://myAngularWebsite.com/poppins-v5-devanagari_latin-ext_latin-regular.76e766753becb2b7da20.woff2">http://myAngularWebsite.com/poppins-v5- ... da20.woff2</a>

Hi,

I have been trying to set up one App Service for Angular and one for ASP.NET Core. It now appears to be working and both services are being built and deployed via VSTS (took a while to sort out how to get the Angular site built and deployed).

However, I have two annoying issues remaining:

  1. Fonts are not being loaded properly. See below from the Chrome Dev tool:
21:50:35.144 fontawesome-webfont.af7ae505a9eed503f8b8.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)

21:50:35.144 poppins-v5-devanagari_latin-ext_latin-300.01860d964547bc9d93cf.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)

21:50:35.601 poppins-v5-devanagari_latin-ext_latin-regular.76e766753becb2b7da20.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)

21:50:35.611 poppins-v5-devanagari_latin-ext_latin-600.0d49524ae3304f2876fb.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)

21:50:35.622 roboto-v18-vietnamese_latin-ext_latin_greek_cyrillic-ext_greek-ext_cyrillic-500.90d1676003d9c28c0499.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)

...
  1. When a link is hit directly there is a problem with routing and the response is "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

I have followed the advice and amended startup.cs and deleted the Home controller. Unfortunately this didn't fix it and I have spent a lot of time experimented with many different approaches including various rewrite rules in web.config, but nothing seems to fix this and some seem to make things worse.

Any ideas?

Thor

Answer

Looking in github line 53 in WebClientInfoProvider:

foreach (var hostAddress in Dns.GetHostAddresses(clientIp))

I suspect clientIp could be null because that is called using

var clientIp = httpContext.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] ??  httpContext.Request.ServerVariables["REMOTE_ADDR"];

and this method is mentioned here:

[https://stackoverflow.com/questions/46515568/how-to-get-clients-ip-address-on-an-azure-web-app-developed-in-asp-net])

See comment:

I tried System.Web.HttpContext.Current.Request.ServerVariables["REMO‌​TE_ADDR"]; but it returns null so does ["HTTP_X_FORWARDED_FOR"] – EidolonMK Oct 1 '17 at 18:35

Question

Hi,

Have downloaded and installed MVC5 and Angular. Everything is working fine locally.

The system is deployed to Azure.

I get "An error has occurred! - Error detail not sent by server." when I log in to the angular app. The username in the top right corner is showing {{vm.getShownUserName()}}. All appears to be working fine using a mobile instead of a desktop browser.

The error message in app_data/logs is showing:

DEBUG 2018-01-01 03:59:44,447 [13 ] Abp.Auditing.WebClientInfoProvider - System.Net.Sockets.SocketException (0x80004005): No such host is known at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Abp.Auditing.WebClientInfoProvider.GetClientIpAddress() in D:\Github\aspnetboilerplate\src\Abp.Web\Auditing\WebClientInfoProvider.cs:line 53

"Help me Obi Wan..." ;)

Showing 21 to 24 of 24 entries