The maximum number of connections for this site has been exceeded - asp.net-mvc-4

When trying to publish my site using a web deploy I am getting following error:
Error 1 Web deployment task failed. (The maximum number of connections for this site has been exceeded.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEEDED_MAX_SITE_CONNECTIONS.)
My website is hosted over a shared host. I already raised this issue to the hosting provider and asked them to restart "Web Management Services" in reply of which they said that they have "restarted publishing service on server". But this error is still not resolved.
What else should I do? Is there something I should check on my side or is it totally a server/hosting provider’s issue?

Error was caused by a 10054 socket error (basically host dropped connection). you publishing a lot of files and it appears that host had a connection time out.. watching publish and if you see the first socket error cancel the publish so that it doesn't hit the max site connections error. Then start publishing again and it picks right up where it left off.

You either have a ton of traffic on this site or the hoster is oversubscribing the box. An IIS restart may fix it temporarily.

Related

net.tcp not working since upgrading to windows 10

After upgrading from windows 8.1 to windows 10,
None of the projects that have a WCF service available through net.tcp connections are able to connect.
The exception i get is:
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '19:59:59.9769910'
the inner exception code is: 10054
But the exception happens right away. So it's not a time-out.
I checked IIS and everything is still configured right. (still have the right binding on the site, enabled protocols http,net.tcp)
I checked my services if net.tcp listener adapter was running and it was.
I checked windows features and saw that windows communication foundation non-http activation was turned off. so i turned it on and restarted my PC and still get that same exception.
I've waisted a total of 4 hours so far trying to get the net.tcp connection to work but i'm kind of losing hope here.
here are the windows features i've turned on:
and here are the windows services i have running:
Did anyone else run into this issue when upgrading to windows 10?
I finally got it working after hours of trial and error. I am not 100% sure if this is what actually solved my problem in the end, but give it a try:
Open "Turn Windows features on or off"
Uncheck "WCF Services" and all underlying boxes
Reboot computer
Recheck "TCP Activation", "TCP Port Sharing" under "WCF Services" (and any other activation methods you need)
Reboot computer
We've managed to resolve this issue.
We were using a certificate in IIS with an old encryption method that was no longer being supported. (it was using MD5-RSA)
Now this was stil working in windows 8/8.1 but the certificate was no longer valid in windows 10, causing this behavior.
The solution was to get new certificates with better and supported encryption algorithms and set them up in IIS on my machine.
I'd also like to apologize for answering so late!
Our services don't use IIS . We have self hosted WCF services. After checking
Named Pipe
Tcp Activation
they finally worked.

Charles Error Report: How to over come it?

I have recently switched from mac development environment to windows development environment. I was used Chrles proxy extensively to capture network traffic, requests and response details. Right now I have installed Charles proxy version 3.7 in windows 8. How ever I have observed that the website on which I am working is not opening at all with Charles proxy ON. It is showing below exception message. And it is working perfectly for all other websites.
Charles Error Report
Failed to connect to remote host
Charles failed to connect to the remote host. Check that your Internet
connection is ok and that the remote host is accessible. Maybe your
network uses a proxy server to access the Internet? You can configure
Charles to use an external proxy server in the External Proxy
Settings.
The actual exception reported was:
java.net.ConnectException: Connection timed out: connect Charles
Proxy, http://www.charlesproxy.com/
Research that I have done before coming to SE:
I have searched in google with the keyword "Charles Error Report-Failed to connect to remote host". I got couple of links which are related to the above issue.
First link says to check for external proxy setting. I have checked, there are no external proxy settings in my computer.
Second link says open the url in browser and close charles proxy and reopen it. I did that. Still no luck.
How to overcome this issue?
Do you get the same problem with other proxies like Fiddler? If so, it's probably not related to Charles but either a network problem or inability of your application to work with a proxy.
Other causes may be using HTTPS (which can cause certificate errors) or using the loopback address (localhost or 127.0.0.1) which may or may not be ignored by the proxy.
UPDATE
In IE10+ Enhanced Protection Mode prevents untrusted applications from accessing local resources. Pages and sites that are not in the Trusted Zone are considered unstrusted, so they can't connect to any local proxy. Fiddler includes a configuration button to configure Windows 8 to bypass this. You can find a very good explanation of what happens and why here.
In Windows 8, EPM is enabled only for Metro IE. In 8.1 it is enabled by default even for Desktop IE.
You may be able to make Charles work again simply by adding your site's address to the Trusted Zone in IE's security settings, or you can download the EnableLoopBackUtility mentioned in Configure Fiddler for Windows 8 Metro-style applications to allow IE to connect to your site through the local proxy
I have experienced this as a timing or caching related gremlin. For me, in most cases, this is resolved by doing force-reload a few times in the browser. Doing so is slightly different on each platform. In Mac/Chrome, holding down Command + Shift + R for a couple of seconds does the trick. In Win/IE, holding Shift and clicking the reload icon in the address bar a couple of times does it - in theory, Shift + F5 should do the same thing, but it does not work as well.

Intermittent WCF Connection (There was no endpoint .. ) error

I have a WCF service hosted in the IIS (IIS 8). The service is in a Per Call Mode and the concurrency mode is set to Multiple. I have around 600 clients connecting to it. It has a HTTPS end point. It also has a net.tcp endpoint but that is not used. Not all but some of my clients face a very weird problem. The client stops working after using for a while. I have error logging and at the client side I see the error which says
There was no end point listening at ...
There are no errors on the server, or the service. The service seems to be working fine. I can browse to the service page from a browser and other clients are still able to use the service. Running a trace is also not helping. I have spent enough time trying to figure it out but with no luck. Further more, on the same computer just restarting the client seems to work and connect to the same service. The client is a WinForms Application.
I performed a DNS flush on my machine and even that does not help.
What could be the possible issue? The things that hit my mind are that maybe the client is unable to resolve the name, but that is contradictory to it connecting in the first place.
The service maybe down, but my other clients are still using the same and they do not face problems.
It might be a problem with the client machine as it Uses Win XP but I am not sure if that would cause a problem.
Or it might be a problem because of intermittent internet connection.
Has anyone ever faced such a problem before? Some insight would be really helpful
IIS can only serve a limited number of clients at a time. It will then place additional requests onto a queue. That queue is also limited. When that queue fills up then IIS returns a 500 error, which is interpreted as "There was no end point listening at ..."
You should try this piece of code.
public void Main()
{
while(thereIsStillThisProblem)
{
var pc = new Pc();
pc.OS = new Windows2012();
pc.Start();
pc.Software.Add(new ServiceHost());
}
}
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/iis/64e30660-d2f0-4e90-98cc-1652214a2b93.mspx
Edit: Just remembered that there is one more thing you can do, if you are using .net 4.5. I will let Jon Skeet explain.

Showing error message from Project server 2010 wcf service

I implemented a web application that connects to a ProjectServer.svc web service. The application works on a project environment server, but returns an error in the production server. Unluckly, due to security settings the text and code of the exception taking place on the server is not shown, instead I get this message:
The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs
I modified the wcf settings in the web config of project server to make the web service return the error...but nothing happened, because probably Project server overrides the web config wcf settings.
How can I get the error message, so I can understand what is wrong with the server configuration?
Sometimes ULS log may help - when Project server process accepted your call and error somewhere inside of the process.
I touched the configs only once to create Proxy assembly and that time it worked... maybe the same approach will help you to find proper config. Here is a link http://msdn.microsoft.com/en-us/library/office/ff621594(v=office.14).aspx
Don't forget iisreset after you change the config

How does System.Net.Sockets perform its DNS lookups in the context of finding a WCF service?

I have a Web application and a WCF service hosted on the same Windows 2003 development server. They each have their own IIS website node responding to drs.displayscreen.web and drs.displayscreen.service host headers respectively. The hosts file contains entries for both headers pointing back to 127.0.0.1. The web site has a service reference to drs.displayscreen.service.
Both applications work perfectly when their application pool uses the 'Network Service' account.
I need to perform some COM processing under the hood on the service so I want to run the applications under a customised identity. Both sites run on a new application pool.
When I change the application pool identity to use a new windows account created for the purpose, I get the following (inner) exception:
[EndpointNotFoundException: Could not connect to http://drs.displayscreen.service/Handler.svc. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.98.2:8080. ]
192.168.98.2:8080 is the address of a DNS server that is no longer in use. It is not referenced anywhere in the solution. It is not referenced by ipconfig at all.
I have made sure that the new account is a member of IIS_WPG and I have run aspnet_regiis -ga . I have also given the account explicit permission to read the hosts file.
Why does the application attempt to use the defunct DNS server to resolve the temporary url (drs.displayscreen.service) instead of the hosts file entry? It has to be a permission of some sort because it does not have this problem when running under the network service account. Help!!
Well, it appears that the answer might involve a bug in the .Net framework. I found a blog posting that clued me in to the fact that the MS .Net implementation of SocketCache.GetSocket might cache invalid sockets and another one that suggests a workaround/hack in the form of an explicit don't-use-proxies configuration setting.
We don't actually use a proxy server in the environment where this problem cropped up but it appears that SocketCache.GetSocket is overridden or behaves differently when the don't-use-proxies setting is in place. Strangely, removing the setting causes the problem to come back so obviously the SocketCache is not repaired when a valid ip/hostname is discovered and successfully used. According to the author of the first post mentioned above, the bug does not exist in Mono. :)