0

I'm following this tutorial.

Sadly i can only access the site from my local machine either under localhost or my ip adress. I changed every instance of 'localhost' to http://*:Port.

I also changed the applicationhost.config in my IIS Express to:

          <site name="JavascriptClient(1)" id="13">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="H:\Downloads\SignalR Self-Host Sample\C#\JavascriptClient" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:31072:*" />
            </bindings>

Also i'm running Visual Studio as Administrator. If i'm trying to access the server from another machine i get a timeout. How can i connect from another PC?

I just want to run the Server-Part of a Websocket so that my Cobol-Client can access an external Windows-Host to communicate.

7
  • What's the actual issue?
    – Jamie Rees
    Dec 2, 2015 at 14:00
  • can your "other pc" ping the IP of your server?
    – Zaki
    Dec 2, 2015 at 14:01
  • that only my local machine can access the service. No other machine can access the website under [my-ip:31072/Default.html]. Every other machine trying to access 10.1.4.1:31072/Default.html get a ERR_CONNECTION_TIMED_OUT
    – Uke
    Dec 2, 2015 at 14:02
  • @Zaki - yes with <1ms response 100% of the time
    – Uke
    Dec 2, 2015 at 14:03
  • Does that port allow incoming connections in Windows Firewall? Dec 3, 2015 at 0:38

2 Answers 2

0

Disabling the Firewall was the key to problem. Huge thanks to Stafford Williams!

Also the browser caching the default.html seems to be the problem with the page. changing the url to "http://*:8080" worked fine for the signalR host-side. I also changed the SignalR hubs url in the default.html java-script part

<script src="http://10.1.4.1:8080/signalr/hubs"></script>
<!--Add script to update the page and send messages.-->
<script type="text/javascript">
    $(function () {
        //Set the hubs URL for the connection
        $.connection.hub.url = "http://10.1.4.1:8080/signalr";

My IP here was needed. Also refreshing in chrome (control + f5) the page after recompiling was needed to actually change the URL in the default.html.

0

If you have you app in Windows Server just enable the "WebSocket Protocol".

"Add or Remove Programs">"Turn Windows features on or off" > "Web Server(IIS)">"Web Server">"Application Development">"WebSocket Protocol".

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 8, 2022 at 22:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.