473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

THE Server Threw an Exception

Hello Experts,

I am having a problem in VB.net. I am using Multithreaded application. but
due to some reason I am getting this error message
"The Server Threw an Exception".
I can't understand from where that error message is coming.
Could anybody please why and from where ??

TIA

Rik
Nov 21 '05 #1
3 3848
On 2004-12-21, itsupport1 <it**********@wells.co.nz> wrote:
Hello Experts,

I am having a problem in VB.net. I am using Multithreaded application. but
due to some reason I am getting this error message
"The Server Threw an Exception".
I can't understand from where that error message is coming.
Could anybody please why and from where ??

TIA

Rik


By any chance are you using any COM objects on those other threads? If
you are, try setting the threads ApartmentState property to
ApartmentState.STA...

Dim t As New Thread (AddressOf YourThreadProc)
t.ApartmentState = ApartmentState.STA
t.Start ()

HTH
--
Tom Shelton [MVP]
Nov 21 '05 #2
Thanks for your Prompt reply.
I am obviously using third party COM Object.

As I am executing the COM object in every thread concurrently from every
thread, so if I made it Single Thread, then is it not going to Create
problem for rest of threads who are executing it??

TIA

Rik
"Tom Shelton" <to*@YOUKNOWTHEDRILLmtogden.com> wrote in message
news:Of****************@TK2MSFTNGP14.phx.gbl...
On 2004-12-21, itsupport1 <it**********@wells.co.nz> wrote:
Hello Experts,

I am having a problem in VB.net. I am using Multithreaded application.
but
due to some reason I am getting this error message
"The Server Threw an Exception".
I can't understand from where that error message is coming.
Could anybody please why and from where ??

TIA

Rik


By any chance are you using any COM objects on those other threads? If
you are, try setting the threads ApartmentState property to
ApartmentState.STA...

Dim t As New Thread (AddressOf YourThreadProc)
t.ApartmentState = ApartmentState.STA
t.Start ()

HTH
--
Tom Shelton [MVP]

Nov 21 '05 #3
On 2004-12-21, itsupport1 <it**********@wells.co.nz> wrote:
Thanks for your Prompt reply.
I am obviously using third party COM Object.

As I am executing the COM object in every thread concurrently from every
thread, so if I made it Single Thread, then is it not going to Create
problem for rest of threads who are executing it??

TIA

Rik


Rik,

I'm just guessing - based on similar experience :) - that the COM object
your are using is written as an STA component. It sounds like you are
creating the object on one thread and accessing it from multiple others,
try setting the thread the object is created on to STA.

--
Tom Shelton [MVP]
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Monica Ferrero | last post by:
Hi! I'm not sure if this is the most adequate mySQL list for this post. If not, please indicat me which one I should use... I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the...
2
by: Jinsu Park | last post by:
I am getting this error in the Server Explorer when I click on "Servers" icon: The type initializer for "System.Net.Dns" threw an exception. The type initializer for "System.Net.Sockets.Socket"...
0
by: Jason James | last post by:
Hi all, I have VS.Net professional installer, along with MSDE. I am having severe difficulty browsing the server explorer window. I can see the Data connections node in the tree and the...
0
by: ruca | last post by:
Hi, It's that... It gives me an error "The server threw an exception" when my WebApplication try's to interop with a Dll, calling a function of this dll. The WebApllication is running under...
6
by: Aero | last post by:
Hi, My window application written in C# is throwing following exception while connecting to one FTP location The type initializer for System.Net.Sockets.Socket threw an exception This exe is...
4
by: =?Utf-8?B?YmlqYXk=?= | last post by:
We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application work fine with some tweaking. But when the setup project is migrated to 2.0 the installation gives...
1
by: bg_ie | last post by:
Hi, I like to develope an application which uses a MsSQL database. I believe that C# works really well with MsSQL. To start with, I'd like to host the sql server locally on my machine as I...
2
madhoriya22
by: madhoriya22 | last post by:
Hi, while deploying applicatin tomcat server is throwing these exceptions :-- SEVERE: Servlet.service() for servlet RequestHandler threw exception java.lang.NumberFormatException: null ...
0
by: silviu | last post by:
Hello I'm trying to install Microsoft SQL 2005 Server Express Edition but I'm getting the following error: SQL Server Setup unexpectedly failed... Then it says something about a log file. Here's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.