Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

WSE 2.0 bug in Console Applications

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Wetuski - 17 Nov 2004 16:28 GMT
We've been seeing this exception:

##### Unhandled Exception while running
System.Exception: WSE104: An asynchronous callback raised an exception. --->
System.InvalidOperationException: Queue empty.
  at System.Collections.Queue.Dequeue()
  at
Microsoft.Web.Services2.Messaging.SoapInputChannel.EndReceive(IAsyncResult
result)
  at
Microsoft.Web.Services2.Messaging.SoapReceivers.OnReceiveComplete(IAsyncResult ar)
  at Microsoft.Web.Services2.AsyncResult.Complete(Boolean
completedSynchronously, Exception exception)
  --- End of inner exception stack trace ---

thrown randomly in our nightly automated tests, and I've spent the last week
isolating it.  This small sample program is fairly consistent at reproducing
the bug:

Project Type: Console Application (.NET Framework Runtime Version 1.1.4322)
References:
* Microsoft.Web.Services2 (Version 2.0.1.0, File Version 2.0.4189.0)
* System (Version 1.0.5000.0, File Version 1.1.4322.2032)
* System.Web (Version 1.0.5000.0, File Version 1.1.4322.2032)

--------------------  SimpleWSE.cs  --------------------

using Microsoft.Web.Services2.Messaging;
using System;

namespace WSEReceiversTest
{
    public class SimpleWSE : SoapService
    {
        private Uri _uri;

        public SimpleWSE()
        {
            string url = "soap.tcp://" + System.Net.Dns.GetHostName() + ":" + 5060 +
"/SimpleWSE";
            _uri = new Uri(url);
        }

        public void Initialize()
        {
            SoapReceivers.Add(_uri,this);
        }

        public void Deinitialize()
        {
            SoapReceivers.Remove(_uri);
        }

    }

}

--------------------  SimpleWSETest.cs  --------------------

using System;
using System.Reflection;
using WSEReceiversTest;

namespace WSEReceiversTest
{
    public class SimpleWSETest
    {
        [STAThread]
        public static void Main()
        {
            try
            {
                CauseQueueException();

                Console.WriteLine("No exception.");
                Console.Out.Flush();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception:\r\n" + ex.ToString());
                Console.Out.Flush();
            }

            Console.WriteLine("\r\nPress enter to continue.");
            Console.ReadLine();
        }
       
        public static void CauseQueueException()
        {
            SimpleWSE simpleWSE = new SimpleWSE();
            simpleWSE.Initialize();
            simpleWSE.Deinitialize();
            DateTime endTime = DateTime.Now.AddMinutes(5);
            Console.WriteLine("Beginning work.  Work will be completed at
approximately " + endTime.ToString("t"));
            Console.Out.Flush();
            while (DateTime.Now < endTime)
            {
                //Anything can be done within the loop, but time has to pass.
                Assembly.GetExecutingAssembly().GetExportedTypes();
            }
            simpleWSE.Initialize();
        }

    }

}
Scott Stout - 22 Nov 2004 22:51 GMT
We are seeing the same problem.  We are using NAnt to automate our NUnit
tests.  This whole program is shut down until we find a workaround or fix for
this.  Anyone have any ideas why this is happening?

> We've been seeing this exception:
>
[quoted text clipped - 103 lines]
>
> }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.