locked
Setting up ASP.Net 5.0 Core application on IIS as an application inside the Default Web site RRS feed

  • Question

  • User1738843376 posted

    Hi,

    I've developed my first .net 5.0 core app, and was able to publish it locally to IIS as an application inside the Default Web Site.

    It all runs well, without any issues. 

    Then i attempted to deploy it to a server, so i could make it available to a few other users, but after deploying and testing it using http://localhost/myApplication  without any issues, i attempted to connect from the same computer using http://www.mydomain.com/myApplication, and the connection always times out.

    Following some online recommendations, I've changed my Program.cs class to:

    public class Program
        {
            public static void Main(string[] args)
            {
                CreateHostBuilder(args).Build().Run();
            }
    
            public static IHostBuilder CreateHostBuilder(string[] args) =>
                Host.CreateDefaultBuilder(args)
                    .ConfigureWebHostDefaults(webBuilder =>
                    {
                        //webBuilder.UseKestrel();
                        webBuilder.UseContentRoot(Directory.GetCurrentDirectory());
                        webBuilder.UseUrls("http://localhost:5000", "http://www.mydomain.com/myapplication", "http://192.168.1.2:5000");
                        webBuilder.UseIISIntegration();
                        webBuilder.UseStartup<Startup>();
                    });
        }

    but i still only get the following message when attempting to connect:

    The connection has timed out
    
    The server at www.justuseit.net is taking too long to respond.
    
        The site could be temporarily unavailable or too busy. Try again in a few moments.
        If you are unable to load any pages, check your computer’s network connection.
        If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

    The server in question hosts a number of other apps developed in webforms without issues, only this core 5.0 app is causing these problems.

    I do not want to set it up as a website on the server, since i have no domain for it, so i need it be configured as a IIS application so i can access it from anywhere through the server's installed domain.

    Any idea how to solve this?

    Thanks

    Tuesday, March 30, 2021 10:26 AM

All replies