Site only works on server but not remotelyRSS

10 replies

Last post Dec 28, 2020 04:20 PM by BackBencher

‹ Previous Thread|Next Thread ›
  • Site only works on server but not remotely

    Sep 15, 2020 05:57 PM|hampdentech|LINK

    I have a site that works fine on the server itself. I can browse to the site from within IIS or by launching a browser.

    I have tested DNS and that is not the issue. I was able to create another site with a single, simple HTML page and the site was then accessible outside of the server. I believe it is either a configuration issue with IIS or maybe a problem with the application itself. It is an ASP.NET 4.6 application.

    The error when I try to navigate to the site externally is "404 - not found".

    Any help would be greatly appreciated.

  • Re: Site only works on server but not remotely

    Sep 16, 2020 07:31 AM|Brucz|LINK

    Hi hampdentech,

    You can use command prompt to ping your remote server to see whether you can get reply.

    Also, enable the remote management services.

    If you can access the site from the server itself but not remotely, it is likely that the firewall is blocking external access to this port. 
    Windows Firewall blocks the World Wide Web Services port by default. With this port blocked, other machines cannot connected to web server. This severely limits the scope of potential web site viewers. So, in order to show your web site and server to the outside world you must add an exception to the windows Firewall.

    1.Click Start and type firewall into the Search bar and press enter. (Note: Make sure you select Windows Firewall and not Windows Firewall with Advanced Security) 


    2.Click Advanced settings

    3.Click inbound rules and new rule. Check port

    4.Enter your site’s port

    5.Then check allow the connection and rule

    6.Fill in name and description.

    Best regards,
    Burcz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: Site only works on server but not remotely

    Sep 16, 2020 12:57 PM|hampdentech|LINK

    Hi Brucz,

    Thanks for the reply. I don't believe this is a problem pinging the server or a port issue. I think in my original post I mentioned that by setting up a simple HTML page on a new site in IIS and binding it to the same web address, the page loaded fine, so it is getting to the server by the web address. The issue is when I try to bind the web address (www.phanetworktest.com) to the ASP.NET application.

    I should also note that there is another version of this application under ASP.NET 3.5, some ASP.NET MVC applications, classic ASP application and a few arbitrary sites running on this same server, so I also don't believe this is an IIS setup issue.


    I do appreciate your input.

    Bob

  • Re: Site only works on server but not remotely

    Sep 17, 2020 01:37 AM|lextm|LINK

    hampdentech

    I have a site that works fine on the server itself.

    What kind of site? If you don't show a detailed report like the one generated by Binding Diagnostics, https://docs.jexusmanager.com/tutorials/binding-diagnostics.html#background I don't think you have a proper site set up.

    hampdentech

    I have tested DNS and that is not the issue.

    On which machine did you test DNS? What command did you use? Something like "nslookup somesite.com"? What's the command line output?

    Lex Li
    Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Site only works on server but not remotely

    Sep 17, 2020 08:29 AM|Brucz|LINK

    Hi hampdentech,

    Could you tell me what kind of site you deployed? .net mvc, web form, .net core or any other application. What kind of version of this application you delpoyed?

    I have encountered similar problems in the past. The reason was that the request did not enter the corresponding processing module after entering the iis, and it needs to be set in the webconfig of the application to solve it.

    Best regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: Site only works on server but not remotely

    Sep 17, 2020 12:56 PM|hampdentech|LINK

    Hi Brucz,

    The site in question is an ASP.NET web application using .NET version 4.6. I also have a version of this application currently in production using .NET version 3.5.

    In addition, there are two .NET MVC applications deployed on this server, and another ASP.NET web application using .NET version 4.6.

    What type of change did you have to make to the web.config file?

  • Re: Site only works on server but not remotely

    Sep 21, 2020 01:44 PM|hampdentech|LINK

    The domain is www.phanetworktest.com, so if you do a name-server lookup you will see the information on the site. As I mentioned earlier, I had created a simple site with a single HTML page (index.html) and bound the domain www.phanetworktest.com to that site and it came up fine remotely, so I think the issue is with the ASP.NET configuration for the site. I just can't figure out where the problem lies.

  • Re: Site only works on server but not remotely

    Sep 25, 2020 08:11 AM|Brucz|LINK

    Hi hampdentech,

    If the request can access the static html but not the asp.net application, and you have ruled out the firewall and DNS, then it is very likely that the request did not enter the asp.net routing processing module after reaching the server.

    Try adding the following content in webconfig.

    <system.webServer>
        .....
        <modules runAllManagedModulesForAllRequests="true" />
        .....
    </system.webServer>

    Best regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: Site only works on server but not remotely

    Sep 29, 2020 01:41 PM|hampdentech|LINK

    Thanks for the suggestion Brucz. I tried that but I'm still getting a 404 error remotely. Not sure what else could be going on here.

  • Re: Site only works on server but not remotely

    Sep 30, 2020 07:24 AM|Brucz|LINK

    Hi hampdentech,

    Have you tried to create a new site with this application? You can try this way to  see that whether it can be accessed.

    If it still not work, you can get support here.

    Best regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: Site only works on server but not remotely

    Dec 28, 2020 04:20 PM|BackBencher|LINK

    Brucz

    Hi hampdentech,

    You can use command prompt to ping your remote server to see whether you can get reply.

    Also, enable the remote management services.

    If you can access the site from the server itself but not remotely, it is likely that the firewall is blocking external access to this port. 
    Windows Firewall blocks the World Wide rebirth manga Web Services port by default. With this port blocked, other machines cannot connected to web server. This severely limits the scope of potential web site viewers. So, in order to show your web site and server to the outside world you must add an exception to the windows Firewall.

    1.Click Start and type firewall into the Search bar and press enter. (Note: Make sure you select Windows Firewall and not Windows Firewall with Advanced Security) 


    2.Click Advanced settings

    3.Click inbound rules and new rule. Check port

    4.Enter your site’s port

    5.Then check allow the connection and rule

    6.Fill in name and description.

    Best regards,
    Burcz

    what kind of site that he is asking?

‹ Previous Thread|Next Thread ›