What Is The Default Connection Limit Of .Net Remoting Http Channel
Jun 13, 2010
When using .net remoting, does the server limit incoming client remoting calls?
I find a particular remoting call (during ASP.NET page rendering) to take from 200ms to 1500ms. While the underlying data call is only 50ms. Factoring in remoting overhead of 150ms per call, the only difference between the two cases is that the latter scenario has about a dozen more parallel remoting calls in progress. So my guess is that when too many remoting calls are happening, some will get queued up? I also doubt system resource is the cause of the delay because it is not nearly saturated.
Searching MSDN, I find the below:
http://msdn.microsoft.com/en-us/library/ms973907.aspx
clientConnectionLimit: specifies how
many connections can be simultaneously
opened to a given server. The default
is 2. This is exactly the same as the
connection limit on ServicePoint in
the net classes.
That seems awfully low to me and if were the case, my app's performance would have been much worse. Can someone confirm if there is indeed a connection limit or some other throttling in .net remoting?
I am testing out a few different public RESTful APIs each differing in http argument value name, but in concept all work similarly. However none of the companies are connected so it must be something on my end.
Within .NET I get the following error when trying to obtain the HttpWebResponse: Message: "The server committed a protocol violation. Section=ResponseStatusLine" Status: ServerProtocolViolation {11} Using Fiddler, I am finding that the headers coming back are non-existent and this is the cause of the issue (not even present and improperly formatted): HTTP/1.0 200 This buggy server did not return headers The parameter I am sending in is a lengthy text news article. I have stripped ALL puntuation, characters, etc just to make sure nothing wans interferring. I build the text out using a StringBuilder and then create the URI like below: Dim sb As New StringBuilder sb.Append("&apiKey=" + HttpUtility.UrlEncode("123456789")) sb.Append("&inputText=" + HttpUtility.UrlEncode(Me.MyTestText)) Dim ApiHttpWebRequest As HttpWebRequest = CType(WebRequest.Create(New Uri(BaseRequestURL + sb.ToString.Trim())), HttpWebRequest) Dim ApiHttpWebResponse As HttpWebResponse = CType(ApiHttpWebRequest.GetResponse(), HttpWebResponse)
This code DOES work with most text I send it. The interesting thing I am finding is that if I shorten the text I am sending then it works! I can't figure out exactly the threashold or breaking point. The stringbuilders values expand after the HttpUtility.UrlEncode function is run against it. However the text in size is only about 5-8 kilobytes in size and well below any size limitations set forth by the 'httpWebRequest' .config settings as laid out in the MSDN or by that of any of the APIs I am using (for example 1 limit is 150 kilobytes of text). I even tried setting all of those values to "-1" in the web.config which means: "A value of -1 indicates that no size limit will be imposed on the response headers."
I would like to limit the number of connections to one of my website.What I want to do specifically is show the visitors a simple custom page warning them that the site is too busy and they should come back later.I know if I limit the nbr of connections in IIS it'll work but It doesn't show an elegant page.
I have created a server product that is connecting to some social network servers and sending to data which status update etc. The server already authenticated to necessary social networks servers by users who is using this solution.
Actually, I have no problem at this time, but I think I will.
My server will be open a thousands of concurrent request to neccessary servers via Http with C# HttpWebRequest instance. I already know that It's possible to change concurrent request limits with below propery.
ServicePointManager.DefaultConnectionLimit AFAIK, this limit is max 100 evet you set more than 100. So, I will be faced with bottleneck problem with HttpWebRequest even change the DefaultConnectionLimit property of ServicePointManager.
I have got ssl security for my website.I have written onLoad that [URL] ... Should redirect on [URL] ... it redirects but first the [URL] ....pages loads full and then after a sec it redirects...I want to solve this
Our site was under Slow HTTP POST DOS attack recently. It's when your server receives a lot of incoming connections and keep them for long time because the sender sends information very slow and server cant serve real users' request - denial of service.
The problem is that I can't drop the HTTP connection in asp.net:
Response.End(), throw new Exception(), even Thread.CurrentThread.Abort()
don't close the connection. It waits while sender sends all the fake data, then answer to it with '500 server error' or something. The slow POST attack still will be successful in this case.
I need to connect to a WebService provided by someone else. This WS (all https) has three methods that are accessible without having logged on:
login, logoff, getVersion . All other methods require that the login-method has been called before. Nothing special unto this point. However, the docs state that I have to make sure that (quote):
"All method calls between login and logoff are to be carried out by means of the same persistent http-connection (key word: http persistent connections or http connection reuse"
I seem to be unable to figure out how that would work - all WS'es I ever utilized were either taking user/pwd combinations in each method call or the login-method returned something like a SessionID which was then used for each subsequent call to a given method (i.e. passed as a parameter). If I call the login-method and subsequently call any method that requires authentication, the call will fail with an exception telling me that I need to log in first.
I'm looking into building an ASP.NET MVC application that exposes (other than the usual HTML pages) JSON and XML REST services, as well as Web Sockets. In a perfect world, I would be able to use the same URLs for the Web Sockets interface as I do for the other services (and determine which data to return by what the user agent requests) but, knowing that IIS wasn't built for persistent connections, I need to know if there's a way that I can accept (and possibly even handshake) the Web Sockets connection and then pass the connection off to another service running on the server. I do have a workaround in mind if this isn't possible that basically involves using ASP.NET to check for the Web Sockets connection upgrade headers, and responding with a HTTP/1.1 302 Found that points to a different host that has my Web Sockets service configured to directly listen to the appopriate endpoint(s).
On an ASP.NET Web Application I have an upload file functionality. I'm restricting the file size up to 10 MB by configuring the inside web.config the maxAllowedContentLength attribute. (I'm using IIs 7.0 BTW).
It get the desired HTTP Error when I access the application from the local machine:
HTTP Error 404.13 - Not Found The request filtering module is configured to deny a request that exceeds the request content length.
When I access the application from another machine I get
The connection was reset The connection to the server was reset while the page was loading.
How can I get a more descriptive error when my application is accessed remotely?
I made a site www.hediyelikdukkani.com and I added the site to goole from web masters tools. But google doesn't index my web site. When I test my site how the google see from Test like a Google bot from web masters tools it says that
I was on the MyApplication/Submit.aspx but after a wait of 30 minutes when I hit the submit button it got redirected to the above page with that long string.
I did not have any session variables in my application. Then why this redirection.
Also I could not find any error log from Application_Error method.
I have set Private Memory limit of 200mb in IIS 7 for an application pool. The Private Working Set memory(Task Manager) for the application is always below 125mb but the number of page faults have increased a lot and application cache is getting cleared frequently after setting the limit.
I haven't set any limit on Virtual Memory.why the cache is getting cleared even when the Private memory used is below the allocated memory?
For example when a user enters www.homeforhire.com they should be redirected to default.aspx (for operational reasons the user is then redirected to www.homeforhire.com/home.aspx).
Instead an error is caught in the Rewrite module (which should not be activated). I am using an http module to perform URL rewriting.
It appears as if the default document setup is not working correctly, and the requested page ~/ is being sent to the Rewrite module, causing an error (which is then caught by my error handler and the user is redirected to the home page).
Entering www.homeforhire.com/default.aspx works correctly.
Can anyone tell me why the default document settings in the web.config do not appear to be working?
I have a shared object through net remoting. The problem is that this object has some EntitySet and EntityRef attributes. When I try to run the program I get an exception telling me that EntitySet is not marked as Serializable. If I mark it as Serializable everything seems to be ok, but when I try to access from outsied to the attribute represented by the EntitySet, I am not able to use it.
BTW, Does anyone know how change the default binary serialization of tcp channel?
In order to have two-way communication from the server to the client, the client activates a ServerObject, then passes in its own ClientObject (which is also a MarshalByRefObject) the server uses the ClientObject to talk back to the client:
var lsClient = new ClientObject(); var lsServer = (ServerObject)Activator.GetObject(typeof(ServerObject), url); lsServer.attach(lsClient);
When the attach method is called, the server takes the ClientObject and stores it in a List:
public void attach(ClientObject client) { clientList.Add(client); }
The server can then call a method on the ClientObject called "SendMessage" to communicate to each client in its list:
foreach(var c in clientList) { c.SendMessage("Hello"); }
This works great until a client is encountered that has disconnected. In this case, an error is thrown about the client refusing the connection. I can catch the error, but the problem is I cannot remove the reference to the ClientObject from the server's List. The following re-throws the "connection refused" exception anytime a client has been disconnected:
clientList.Remove(badClient);
So a couple of questions:
1- Is there a way to detect the connection state of a client without having to catch an error?
2- When I do detect a client that has disconnected, why does the attempt to remove the object from the server's list appear to "communicate" with the client (thus causing the exception to be thrown again?)
EDIT
As Patrick pointed out below, doing a Remove from a list causes the List to iterate my objects and do a comparison on them (calling .Equals) - this is what caused my ClientObject to attempt to communicate again and thus throw the exception. To resolve it, I instead changed the List to a dictionary keyed off a unique ID supplied by my Client at the time of attaching to the server. Then I used that unique ID to remove the client. I never did find a direct way for determining if a client had disconnected other than catching the error.
I'm building a Remoting Demo, and here's my scenario:
There are 4 projects:
ServicedCOM: This project I've built a ServicedComponent, this component using for access data from database.
RemoteLoader: I using this to load ServicedCOM to RemotingServer.
RemotingServer: This is an console application, and this application can be running from another computer.
WebApp: Client, this is inteface using for End User.
and my results: I can access and retrieve data with function is called SpeakHello (test function), but I cannot do the same thing to get sectors using this model, I think I'm doing something wrong. and here's my code snippet:
1. I have a ServicedCOM and a function to get Sectors is called GetSectors (I test OK)
I installed windows 7 recently & I am new to ASP.NET. I installed visual studio 2008 for developing ASP.NET application. I created my web application on visual web developer 2008 & when I run my aplication, ASP.NET development server runs & my defualt browser opens automatically but it cannot show my web page. Connection error ocurrs. But when I open this web page with visual studio's internal browser, it works fine for me. So tell me whats the problem with my default browser(IE8, Flock2.6), Any configuration setting or what, I don't know exactly.
I'm so excited about the webmatrix, because it makes all the works to be easier than ever before, so I make a try, but I met a problem when I deployed the project membership db to remoting host (I chose the cytanium.com), and I had deployed the project files and another database sucessfully, only the membership related database failed, the error message is below:
[Code]....
I thought that the problem source is about the collation of the database, so I change my database collation from "Chinese_PRC_CI_AS" to "SQL_Latin1_General_CP1_CI_AS", but the problem is the same, I had search a lot of articles, but I didn't find a way to resolve this issue.
I have a named instance of sql 2008 developer edition installed. I have changed the Server name but the query string will still not work. I want to be able to use the default db "aspnetdb.mdf". I use Windows authentication to connect. How can i change the connection string to get this to work?
there are thousand of websites on the internet that have live coverage of the channels ,cricket matches.how does they do that? from where does they pick the coverage?
I had YouTube Channel and I Had Web Page on my web site which display this video ,I diplay the viedo in ModalPopupExtender ,and I had problem when I finsihed from displaying this video and close ModalPopupExtender the sound of viedo still displaying. ' id="Image" runat="server" width="96" height="86" alt="Video" /> '> ' type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="320">