SignalR Fails with more than 2 connections - websocket

I have written a fairly simple chat application in SignalR.
It seems if i connect with more than 2 tabs/browsers/devices the third will hang and never connect and eventually cause problems.
Why can I only connect with 2 users?
The third request goes through as soon as I disconnect one of the other 2.
Doesn't matter if I use the same user or different users.
I am using IIS on Windows 10, Asp.Net MVC5 with SignalR 2.2
It never calls the hub code, if I try to connect with a fourth client while that tab is open the fourth tab won't even return the view.
$.connection.hub.start().done(function () {
//add all existing messages when we start the connection
//chat.server.addExistingMessages();
console.log('Now connected, connection ID=' + $.connection.hub.id);
console.log is never hit for the third connection.
$.connection.hub.start()
Is hit, and the connection and hub have values that aren't null.
public override Task OnConnected()
{
Is never hit on the third connection unless I terminate one of the other two. So sharing the internals of these methods/functions would only add confusion I feel.
$.connection.hub.starting(function () {
console.log('starting')
});
$.connection.hub.received(function () {
console.log('connection received')
});
On the third client, starting his put in the console but received isn't.

I believe I was able to discover the answer to this after much hair pulling out and frustration.
Because desktop IIS only allows 10 concurrent connections and websocket connections are so dynamic I think that it was acting as 10 connections with only 2 actual connections.
http://www.asp.net/signalr/overview/getting-started/supported-platforms
"full versions of IIS or Cassini should not be used, since there will
be a limit of 10 simultaneous connections imposed, which will be
reached very quickly since connections are transient, frequently
re-established, and are not disposed immediately upon no longer being
used. IIS Express should be used on client operating systems."
If that is not the case then someone please correct me!
As a work around I am going to use IIS Express, my reasoning behind not wanting to was becauase I wanted my site exposed so my co-workers could connect and sanity test. I figured out how to expose IIS to the web and run it from a command prompt so I can develop while the server is up.
This is how to expose IIS Express
Go to
c:\Users[YourName]\Documents\IISExpress\config\applicationhost.config
Add(replacing IP address and port appropriately):
<binding protocol="http" bindingInformation="*:58938:192.168.1.42" />
To the relevant site.
Running IIS from command line
Open a command prompt.
You do not need Administrator user rights to run the commands in this
walkthrough. However, you must have Administrator user rights if you
want to run IIS Express on ports numbered 1024 or less. Run the
following command to navigate to the IIS Express installation folder:
cd \Program Files\IIS Express
or if you are using a 64-bit OS, run the
following command: cd \Program Files (x86)\IIS Express Run the
following command to view the IIS Express usage string:
iisexpress /site:site-name
and of course don't forget about port forwarding and firewall pass through.

Related

VS 2015 Remote debugging (msvsmon.exe) how to know which w3wp process attaches to which iis service

I am trying to remote debug web application by using Remote debugger (msvsmon.exe)
I am connecting ok and can see processes problem is server is running multiple applications and I am not sure which one to attach debugger to. One that I am trying to debug is not listed in IIS APPPOOL\... (should it be?) which I have hidden from screencap.
How can I tell which process to attach to?
1. If you have RDC (Remote Desktop Connection) to the server machine, then in IIS Manager (Internet Information Services Manager) you can see which ones are Network Services and which ones are Local Services.
I was lucky to get one that was Local Services which I had only one running on that server...
2. user friendly way
On the server go to IIS Manager -> Worker Procesess -> then you can match IDs to the IDs in attach to debugger window in Visual Studio...
3. Another way that can give you some insight is to use IDs of processes - IDs in your VS attach to process window can be matched to remote machine IDs (they are also in Task Manager on the server...)
To match ID to application pools on server run Command Prompt - As Administrator and run from %windir%\system32\intesrv\ folder command - appcmd list wp to get process ID to application pool mapping, this might help to narrow it down....
When you know which app pool which process is running, you can map them to applications that are running on that app pool in IIS Manager and pray that they will be one-to-one application to pool...
I know this is old but I ran into this because I was researching something relative.
Although you should be able to identify the process by the UserName column. You should go onto the server and identify the app pool your app is running under. Then you can look for that App Pool name in the UserName column.
On the other hand, you can go onto your server and follow the instructions below to get a full list.
Go to C:\Windows\System32\inetsrv\ in your windows explorer. Enter the command “appcmd.exe list wp”. It will list all the process associated with the Application Pools.

Subversion installation troubles on Windows 8

After successfully running subversion for years on a Windows 2008 server, I recently moved to Windows 8.1, mainly because the machine does also serve videos to my home network (works fine) and because Windows 8 provides better energy saving on my platform than Windows 2008 server did. So far, so good.
Then I tried to re-install Subversion. I intend to use the built-in server application svnserve.exe. I downloaded the latest windows package, installed it (success), and configured a service (svnserve --service ...) which I can successfully start using the Windows Service Management Console. Port 80 is already taken by a different application, so I let subversion pick 3690, which is fine for me. I used netstat to confirm that svnserve.exe is bound to port TCP:3690, which is listed OK. Just to clear one potential roadblock I also disabled the Windows firewall.
Then I created a sample repository named "test" using svnadmin locally, success as well, a subversion file structure appeared on the harddisk.
Problems arise when I try to access the repository using my local browser (Firefox), an attempt to connect to URLs
http://127.0.0.1:3690[/svn|/svn/test]
all three give me the same cryptical response:
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops atomic-revprops partial-replay inherited-props ephemeral-txnprops file-revs-reverse ) ) )
Somehow I have expected a subversion GUI instead.
Connecting from a remote machine via browser reveals the same useless line of text.
Connecting from a remote machine using my usual Tortoise client gives the message:
Unable to connect to a repository at URL 'http://xxx.xxx.xxx.xxx:3690/svn/test
Error running context: The server unexpectedly closed the connection
I tried to add the --log-file option to svnserve, and indeed a log file appears once I start the service, but it is empty and it remains empty.
Trying to use svnserve -X instead of running it as a service reveals the exact same behavior.
Seems I am stuck. Anyone who has an idea what I can do to get that thing working?
Just to help out another beginner running into the same problem ... I finally found the problem: I simply used the wrong client, svnserve does not support web browsers. Using the Tortoise client, and providing the correct prefix (svn:127.0.0.1/...) was all I had to do.
The long version:
If one wants to work with the simple, reliable, fast, but plain-text and proprietary protocol based) svnserve service, he needs to use a proprietary client, like Tortoise, and the svn: prefix instead of http/https:, and no port, like
svn://mysvnserver/testrepo
If needed, one may even reconfigure svnservice to use authentication and encryption later. svnserve isn't supporting web browsers, if one tries to access svnserve using a web browser like I did he gehts the internals of the svn protocol dumped to the screen.
If one wants to use his web browser, http/https protocol, and niceties, like a user friendly browser based interface and some remote administration capabilities, he must not use svnserve, but install a web server service (like apache) and configure if for use with subversion.
So in the end my problem had nothing to do with Windows 8. It just has slipped from my mind that years ago I went the apache path, while now I decided that the built-in svnserve service was good enough for my needs.
Armin.

How to change SharePoint Windows Authentication prompt times for login?

In my environment, my SharePoint 2010 is running on Windows Server 2008 R2 with IIS7. The expected behavior after adding SPNs was that the user was prompted 3 times by default. How to configure the prompt times? maybe 2 or 5 times?
It is decided in the browser, not in the server. Server returns HTTP401 status code in all of these requests, browser decides if the user should retry or not.
Anyway, when you have SPNs set up, passwords should work from the first time. It is worth rebooting the server after SPN setup.

Unable to run Firebird

I am installing Firebird (v1.5.5 - I know it's old but it works) on a new computer which is running Windows 7. I have installed the classic server version as a service. According to documentation at the Firebird site, I modified the firebird.conf file so that IPCName would be global\FirebirdIPI; I did this while the service was not running.
Despite all my efforts, I have been unable to access any of the databases which I copied to this new computer via ISQL. FWIW, the EMS SQL 2005 manager program is successful in accessing the databases, but this program apparently has a direct method which does not require fbclient.dll.
What else should I be checking?
Update from a few days later. After wasting a great deal of time with Windows 7, we decided to downgrade the computer and run XP. After installing the superserver version of FB 1.5.5, I can run my programs and access the databases which are stored on this computer. Attempts to access the databases from other computers connected on the network failed with a variety of error messages, but normally something like 'i/o error for file !firebird!\db\q400.fdb'.
In order to allow people on the network to continue to access the databases, I revived the NT server and started the Firebird service - and all the programs can access these databases successfully from remote computers!
To simplify matters, there are three computers on the network:
the NT server ('zorcomp'), which is running the Firebird service; the fdb files reside on this computer in a directory called 'db' which sits under a shared directory called 'firebird'
a computer running XP, called 'kivserver', which also has a shared directory called 'firebird' and underneath that a directory called 'programs'. Copies of all the fdb files reside in a directory called 'db'.
a computer running XP, which maps \zorcomp\firebird to disk L: and \kivserver\firebird to disk T. From this computer, I can run a program sitting in T:\programs and get it to access successfully a file sitting in L:\db. If I stop the FB service on zorcomp and start the same service on kivserver, the same program cannot access files sitting in T:\db.
I hope this is clear enough. For the life of me, I can't see any difference between all the files which are residing in \kivserver\firebird to those which are sitting in \zorcomp\firebird - but somehow there is a difference!
Obviously, I don't want this arrangement to continue - the NT server has to be retired honourably.
Further edit. I now have the firebird server running on 'kivserver' (NT). I can access the database files locally.
Computers running Win7 can now access these database files using a connection string \\kivserver\firebird\db\database.fdb.
Computers running XP cannot access these database files, although IIRC wisql did succeed with \\kivserver\firebird\db\database.db.
The NT server has been disconnected from the network.
TIA,
No'am
AFAIK EMS SQL uses fbclient.dll (or a wraper around it).
If the only thing you want is to access the databases, I suggest you to do so using TCP protocol instead of the local protocol. To do it connect like this:
c:\>isql localhost:c:\path\to\db.fdb -u sysdba -p masterkey
Unless you're avoiding TCP or the machine have no local interface enabled, it will do the work for you.
Try using this to connect to your database:
hostname:drive:\complete path\filename.fdb
or
\hostname\drive\complete path\filename.fdb
May I know the component you're using?
If your clients are Windows 7 then you might try to use \\hostname\sharename\filename.fdb instead of drive:\filename.fdb connection string.
Several months later, the NT server was somewhat abruptly retired when it displayed 'MBR error' on rebooting after someone unlugged it by accident. Thus I was left with no option but to start running the Firebird server program on 'kivserver'. The connection problems returned.
Eventually I was able to solve the problem with the following connection string
10.0.0.202:e:\firebird\db\manager.fdb
where 10.0.0.202 is the ip address of the server, and e:\firebird\db the directory in which the database sits, relative to the server itself.
I hope that someone else, some time, will find this information useful.

Cannot Access http://<tfs-server>:8080

I've installed TFS 2008, but I can't seem to access the server. When I try to connect to it in Visual Studio, I can't. If I try by browser on a remote PC, I get a generic page cannot be displayed. On the server, I get a 403. Nothing was touched in IIS and the service is running as a Network Service. Any ideas?
try:
http://localhost:8080/Services/V1.0/ServerStatus.asmx. This will tell you if TFS is up and running. If you are getting anything else you need to look into IIS issues.
I wrote a blog post on diagnosing these types of TFS connections.
http://blogs.msdn.com/granth/archive/2008/06/26/troubleshooting-connections-to-tfs.aspx
The very first thing I do is confirm that it works for a known-good configuration – usually my workstation.
Providing that works and the server appears to be functioning, the next thing I do is ask the user to call the CheckAuthentication web service using Internet Explorer.
The URL for this is: http://TFSSERVER:8080/services/v1.0/ServerStatus.asmx?op=CheckAuthentication
By doing this check, I am doing four things:
Eliminating Team Explorer from the picture
Eliminating the .NET networking stack from the picture
Ensuring that Windows Authentication is working correctly (that’s why I say IE)
Ensuring that proxy settings are set correctly
In most cases I’ve seen, the TFS connection issues are because the proxy settings have changed or are incorrect. Because .NET and Visual Studio use the proxy settings from Internet Explorer, it’s important to have them set correctly.
In rare cases it’s beyond this. That’s when I start looking at things like:
Can you resolve the server name?
Can you connect using the IP address?
Are there HOSTS file entries? (see: c:\windows\system32\drivers\etc\hosts)
Can you ping the server?
Can you telnet to port 8080?
Does the user actually have access? Run TfsSecurity.exe /server:servername /im n:DOMAIN\User to check their group memberships
Have you changed your domain password lately? In some cases they’ll need to logoff the workstation and log back on again to get a new security token.
Is the computer's domain certificate valid? update the certificate: gpupdate /force
Hope this helps.
Turns out the time and date on my computer was not "close enough" to the time and date on the tfs server. Changed my system clock setting and problem went away.
What happens if you send a simple HTTP request to the server directly?
ie:
telnet 8080 [enter]
GET / HTTP/1.1[enter]
[enter]
[enter]
That might give a hint about whether IIS is actually serving anything. If you can do that on the server, what about from a different machine? If the results are different a good guess is there are some security/firewall issues somewhere. HTH a little.
I went through everything on a similar problem.
I logged onto my tfs server and connected directly there.
I also used a TFS admin tool I downloaded some time ago from Microsoft, and made sure I was in all the right groups and projects.
I then went back to the client PC with the problem, tried the services/1.0/serverstatus.asmx?op=CheckAuthentication Url again, and it worked this time.
AFter that full service was restored to my PC.
So I don't have the exact answer, but I would go through the checklists presented by Grant Holliday in his answer.
Add this to the cases for future users, as i had this issue on server 2016...
if your firewall allow only Domain and Private Network, it may not work on client. make sure you give public permission, if server network is set to public...
The error you may face:
ERR_CONNECTION_TIMED_OUT
for
http://fserver:8080/tfs

Resources