• January 27, 2023, 10:58:44 pm

Author Topic: Help  (Read 1785 times)

NouN

  • NouN
  • Addict
  • *****
  • Posts: 170
Help
« on: November 24, 2010, 01:15:59 pm »
System.InvalidOperationException was unhandled
  Message=An error occurred creating the form. See Exception.InnerException for details.  The error is: The type initializer for 'WindowsApplication4.Main' threw an exception.
  Source=Chat-Server
  StackTrace:
       at WindowsApplication4.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
       at WindowsApplication4.My.MyProject.MyForms.get_Main()
       at WindowsApplication4.My.MyApplication.OnCreateMainForm() in c:\users\grant\documents\visual studio 2010\Projects\WindowsApplication4\WindowsApplication4\My Project\Application.Designer.vb:line 35
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsAppli cationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsAppli cationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsAppli cationBase.Run(String[] commandLine)
       at WindowsApplication4.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAsse mbly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.TypeInitializationException
       Message=The type initializer for 'WindowsApplication4.Main' threw an exception.
       Source=Chat-Server
       TypeName=WindowsApplication4.Main
       StackTrace:
            at WindowsApplication4.Main..ctor()
       InnerException: System.InvalidOperationException
            Message=The operation is not allowed on non-connected sockets.
            Source=System
            StackTrace:
                 at System.Net.Sockets.TcpClient.GetStream()
                 at WindowsApplication4.Main..cctor() in C:\Users\Grant\documents\visual studio 2010\Projects\WindowsApplication4\WindowsApplication4\Main.vb:line 8
            InnerException:


Mike

  • Asgard Developer
  • Addict
  • *****
  • Posts: 140
    • mikeownage.com
Re: Help
« Reply #1 on: November 24, 2010, 02:42:22 pm »
Seems you that since the socket isn't connected you cannot get a socket stream from said TcpClient.

 

newBalance by DzinerStudio