0

I have a MVC 6 application which is hosted in Azure as web app. It is running fine on local by iisexpress but when I hosted it in Azure using publish option in Visual Studio, it is not working. It is just waiting to load website. After 4-5 minutes wait, it displays nothing.

I also tested it with static file. I uploaded a static html file in wwwroot folder but it is also not working.

I am not getting how can I see the actual error. Anybody can help me?

1
  • 1
    Do you get any errors? What happens if you try to start the app manually (App Services > Your App Service > Tools > Console > cd \home\site\approot and run the web.cmd in there)? Commented Apr 24, 2016 at 14:19

1 Answer 1

1

Since you've provided almost no information I gonna have to guess, since I had a similar error this weekend when deploying an ASP.NET Core 1.0 WebApp to an Azure App Service.

The issue I was facing was, that the main application wouldn't start. After a couple of hours trying to figure it out I got an error message with the method mentioned in the comments (running web.cmd manually) which returned an Microsoft.AspNet.Server.Kestrel.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported exception.

I couldn't find anything directly related to it, but was a hint about an IPv6 problem. A few other SO posts hinted that setting http://*:12345 as port binds to both, IPv4 and IPv6. So after I changed the url to http://0.0.0.0:12345 in the hosting.json, it started without issues.

I filled an issue on Kestrel GitHub and this seems to be a bug in Kestrel.

Edit: In response to the comment:

I used to have

{
  "server": "Microsoft.AspNet.Server.Kestrel",
  "server.urls": "http://*:8081"
}

and changed it to

{
  "server": "Microsoft.AspNet.Server.Kestrel",
  "server.urls": "http://0.0.0.0:8081"
}

The difference seems to be that http://*:8081 also binds to both IPv4 and IPv6 on the same port, whereas http://0.0.0.0:8081 only binds on IPv4 and not on IPv6.

Sign up to request clarification or add additional context in comments.

2 Comments

What is the setting you added to hosting.json? Or what does your hosting.json file look like?
@Stephen: Updated my answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.