.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

WCF Exception when 50 clients concurrently make a call. Bug?

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :WCF
 

We've ran into a rather strange issue in WCF, that has to do with concurrently making a call to a WCF service.    We first thought we were hitting a throttle limit, however we have all the throttles maxed.  Furthermore, when we run a verbose trace there isn't anything indicating an issue with a throttle, all we get is the rather unhelpful exception (which must be a bucket in WCF).

 

"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 '00:00:59.4383964'."

 

I have a reproducable app that can make this happen, is anyone at Microsoft interested?  If so, where should I send it.




View Complete Post


More Related Resource Links

Interop: Get Seamless .NET Exception Logging From COM Clients Without Modifying Your Code

  

Using .NET objects from ASP can help you gain experience with the .NET Framework before migrating to ASP.NET. Your ASP pages will make use of the new .NET components through COM-callable wrappers (CCW). But how will you handle exceptions? This article fills you in.

Matt Adamson

MSDN Magazine January 2005


make json call to send an email

  

the aspx:

<div class="contactSubmit">
                <asp:ImageButton ID="ibSubmit" runat="server" ValidationGroup="vgContact" /></div>


 

the jquery :

$(document).ready(function () {
            // Add the page method call as an onclick handler for the div.
            $(".contactSubmit").click(function () {
                $.ajax({
                    type: "POST",
                    url: "Home.aspx/GetDate",
                    data: "{}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        // Replace the div's content with the page method's return.
                        $(".contactSubmit").text(msg.d);
                    }
                });
            });
        });


The problem is that I need to use the text in a text box in my webmethod, and I can't because it's static, this results in a compilation error:

[WebMethod]
    public static string SendContactForm()
    {
        Mail.SendMailMessage(NameTextBox.Text);
    }

<

WCF - First call to Callback instance from Server takes considerable time to make it to the client.

  
Hello. There's a performance problem we are facing that we are unable to fix using DuplexChannels. The first call made by the client to the server reaches the server instantly. The first call made by the server to the first client using a Callback proxy will take several seconds to reach the client. All subsequent calls to the client (as well as other clients) will reach and execute instantly. The client connects to the Server using a proxy to IServiceProvision, supplies an instance to an implementation of IClientCallback and calls IServiceProvision.Start(). The server instantly processes the call and makes an asynchronous call to IClientCallback.DoWork(), which takes several seconds to enter the client's DoWork() implementation. The remainder of the execution then runs smoothly. Also, the server will experience such a slowdown only for the very first call of the first client that connects to it. Is it normal for the Callback interface to take so much time to warmup, only on the first call to the first client? Below is the full source code. Thanks for any information you may provide. Cheers Mike Shared Class Library using System.ServiceModel; namespace Test { [ServiceContract(Namespace = "http://test/IService", CallbackContract = typeof(IClientCallback))] public interface IServiceProvision { [OperationContract] void Start(); [OperationContract] void

Need help in Webservices.How to make external Web Services method call in case of proxy in Asp.net 2

  

How to make external Web Services method call in case of proxy in Asp.net 2.0? 

 

The scenario is I have webservice Client dll.Now when  i Invoke the One of the Method in Client.dll,its not sending the request to server bcz the system is blocked with Proxy settings.I need to know call this method by bypassing the Proxy settings.

@Note:The client.dll is in different location.we are trying to contact the server with this dll.but its not contacting

pls help .its deeply appreciated .

 

Thanks

 

 


Using SIP make a connection and call in Asterisk Server using c#

  
Hi all,

       I am new to Telecommunication but now my situation is want to use the SIP(Session Initiation Protocol) with Asterisk Server. So some one pls help me that is how i connect with Asterisk server and make a call using the SIP and c#.
Aelvakumar.a

Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.

  

I have two small programs that I wrote in C# that are basically just executing calls to cuteFTP Pro 8 (a scriptable FTP client). 

Program #1: needs to connect to a remote server using standard FTP protocol.  This program works fine whether I run it or schedule it through the Windows Task Scheduler (Server 2003 Standard). 

Program #2:  needs to connect to a remote server using FTPS_IMPLICIT or FTPS, I've tried using either of these two protocols and the same result is produced.

If I run Program #2 on my user account while logged in to the server it works correctly, however if I schedule it through Windows Task Scheduler (in exactly the same fashion as Program #1) I get the COM error that I put in the thread title.  A stack trace shows that it happens

 

at ftpteLib.TEConnectionClass.Connect()

which is one of the cuteFTP methods.  For the sake of isolating the problem I removed most of the functional code in Program#1 and Program #2 so taht they are identical other than the fact that one connects to a remote server needing FTP and the other to one needing FTPS or FTPS_IMPLICIT.

Is there anything I can do to correct this?


Exception thrown on client proxy call to open

  
Exception thrown System.InvalidOperationException: The communication object cannot be modified while it is in the Opened state.


The following code throws this exception:

            try
            {
                if (dataAcesssProxy == null)
                {
                    dataAcesssProxy = new CompetellaDataAccessService.CompetellaDataAccessClient();
                    dataAcesssProxy.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("someuser", "password", "domain");

                    dataAcesssProxy.InnerChannel.Faulted += new EventHandler(InnerChannel_Faulted);
                    da

Exception Handling: StackFrame Capture not capturing last level method call in release mode

  

I am trying print the exception details frame by frame along with other debug info (code below). In the code as you can see the DummyCall3 throws and ApplicationException and the expectation is that the stack trace will have information regarding DummyCall3. Below are the behavior I am getting with .NET 4.

  • Using the "Debug" build, when I run it, I get expected results (DummyCall3 > DummyCall2 > DummyCall > RunTest)
  • Using the "Release" build however, the DummyCall3 method is somehow missing from the stack trace. Now I only get (DummyCall2 > DummyCall > RunTest)
  • I add a dummy statement in the DummCall3 method before I throw the exception, and rerun using "Release" mode and now it works as expected with strack trace info (DummyCall3 > DummyCall2 > DummyCall > RunTest)
  • If I switch the framework version to .NET 3.5 it works as expected in both Release and Debug modes?

I would like to know if this behavior is by design or a bug? if it is by design, what was the reasoning behind it. Appreciate any input on this.

 

  class StackFrameTest
  {
    public void RunTest()
    {
      

Make a C# WinForm Call a JS code in a Data server??!!

  
Hi... 
I have a situation as follows:
My company has its Customers Data stored in a server, and we as employees use Internet Explorer to find the data needed through a page that contains some textboxes to supply info to the server and some other textboxes that shows Data retrieved from server. So fro example I put the customerID in a textbox, press the search button near this textbox, and I get the customerName and customerAge and so on in another textboxes in the same webpage. I konw this is done via JavaScripts.

I hope the scene is clear, Now when I need to print a report about certain customer I have to copy/paste every single textbox content to Word individually.

So I know how to export from C# to Word or at least to Excel .., But is it possible to make a C# WinForms App that can read the contents of these textboxes OR call the JS function that is executed when I press the (Search) button shown in the IE WebPage.

I dont know if my question is clear enough but I hope you can help me. Any help would be appreciated.
Thanks in advance

how to make VS Intellisense show complex object's properties for result of Ajax call?

  

Hello,

I've create a WCF webservice and created a proxy to the service using ScriptManager.

I can see the created a proxy class, and intellisense pops up the methods of the webservice (great!!). But, I can't see the properties of the method params, return types.

The webservice method:

searchResponse DBSearch.Search(searchRequest)

have comlex types as a parameter (searchRequest) and a return type (searchResponse).

Intellisense does recognize these types, but I can not see the properties (javacript does);

i.e.

var _searchRequest = new DBSearch.SearchRequest; (intellisense knows type SearchRequest)

_searchRequest.query = "liver lacerations"; (intellisense doesn't know it's property 'query')

_searchRequest.searchOptions = "modality=mri";


Obviously, with javascript, var _searchRequest is not typed, but is there a way to hint intellisense into the properties of the class?


thanks

sepehr



Exception while making a one-way call using WCF

  

Hi,

I am facing a problem while invoking a one-way web service from a WCF client.

When I am defining something like this in my proxy

[System.ServiceModel.OperationContractAttribute(IsOneWay = true, Action = "http://xyz.abc.com:8080/GetService")]

void MyOneWayService (int myint)

There is an exception thrown "The one-way operation returned a non-null message with Action='' "

 

Surprisingly, when I change the proxy to something like this

[System.ServiceModel.OperationContractAttribute(IsOneWay = false)]

void MyOneWayService (int myint)

I find no exception and it works perfectly.

 

The response I get back from the service is same for both the cases

HTTP /1.1 200 OK

X-Backside-Transport: OK OK

Connection: Keep-Alive

Transfer-Encoding: chunked

X-Client-IP: 10.24.32.34

Content-Type: text/xml

0

 

Two links that I refered

http://blogs.msdn.com/drnick/archive/2006/08/18/705470.aspx

http://msdn.microsoft.com/en-us/magazine/cc163537.aspx

 

Still not able to explain myself why it works with IsOneWay = false.


A for apple, B for boy, C for c++

first SSL request is failing for some clients, but the second SSL call works

  

I've got a WinForms client (using ASMX generated proxies) calling an SSL secured WCF service. Without SSL, everything works. With an SSL certificate on the server, some clients fail, but only the 1st web service request. If that same client sends the exact same request a 2nd time, it will work. This happens repeatedly for the same clients.

The client exception will be System.Net.WebException. Unable to connect to the remote server. System.Net.Sockets.SocketException: An invalid argument was supplied

My assumption is the SSL cert is setup incorrectly, but I'm not sure why it only fails for a few clients (although repeatedly), and why it will work the 2nd request? 

EDIT Also, if I turn on Fiddler to try and see the messages across the wire, then the exception does not happen.

Thanks, casey


2 WCFs and "A call to SSPI failed, see inner exception"

  

I have 2 WCFs. One is hosted on my local IIS, and another is self-hosted on a Windows service. It was all running great, until I made some modifications. Of course, probably my first problem is that I don't know how to "see the inner exception". But I'm betting it's in one of my app.config files. Here they are:

Client web.config:

 

<system.serviceModel>

<bindings>

<netTcpBinding>

<binding name="NetTcpBinding_IService1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="565536" maxConnections="10" maxReceivedMessageSize="565536"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="516384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />

<reliableSession

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

EXCEPTION HANDLING IN C#

  
Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend