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 / .NET Framework / General / December 2005

Tip: Looking for answers? Try searching our database.

Internet Explorer exception with Embedded Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon M - 02 Dec 2005 14:56 GMT
Hi,

I'm not sure where to post this as it's about windows forms, web forms,
socket communication and embedded objects.

I am developing a smart client which is embedded in a webform. This client
software communicates with a third party windows service over sockets.
However I have a weird exception being raised in the AppDomain that I can't
handle. When I finish the socket communication (all asyncronous) I popup a
modal winform, which when closed causes the following exception;

System.InvalidOperationException was unhandled
Message="The Undo operation encountered a context that is different from
what was applied in the corresponding Set operation.
    The possible cause is that a context was Set on the thread and not
reverted(undone)."
Source="mscorlib"
StackTrace:
  at System.Threading.SynchronizationContextSwitcher.Undo()
  at System.Threading.ExecutionContextSwitcher.Undo()
  at System.Threading.ExecutionContext.runFinallyCode(Object userData,
Boolean exceptionThrown)
  at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteBackoutCodeHelper(Object backoutCode, Object userData, Boolean exceptionThrown)
  at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
  at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
  at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
  at System.Net.ContextAwareResult.Complete(IntPtr userToken)
  at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result,
IntPtr userToken)
  at
System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
  at
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

The wierd thing is that, if I don't open the message window I don't get the
exception. The message window is just a form with a label and a button, so I
am assuming there is something lower level that is causing the above
exception?!?!

Any help would be appreciated as I have spent two days trying to figure this
one out.

Thanks,

Simon
pjondevelopment@gmail.com - 31 Dec 2005 05:04 GMT
Hi Simon...

Are you using Framework v2.0?

If so I believe it's a bug on the Framework as it can be seen on MSDN
forum.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=173873&SiteID=1

Regards,

PJ

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.