|
I have an application developed by .net framework 1.0 , the application works fine on my development machine , but on the non-development machine (the customer machine) the application sometime crashes
giving this error message , note that i handeled the unhandled exceptions in my application and that also there is no a particualr scenario that produces this exception.
So does anyone have any ideas about what could be the reason for this exception , please help me because am stuck in this problem for more than a month now.
I would Like to add that the application runs and that this exception appears while using the application.
Thanks for the help in advance
|
|
|
|
|
|
Not too familiar with the 1.0 framework so this may not be available but try adding a handler for the AppDomain.CurrentDomain.UnhandledException.
This may at least give you some information about where the exception is occuring.
hth,
Alan.
|
|
|
|
|
Hi,
I have been trying to figure out, is it possible to use .NET-classes with massive C-program in restricted cases?
The program is compiled with Visual C++ - compiler.
Converting the whole program to C# is out of question, so is it possible to use .NET only occasionally?
|
|
|
|
|
No, unfortunately C compiles to native code, wheras .NET compiles into MSIL before being run.
This means that .NET classes are completely unaccessable by C.
What are you looking to do? is there no native method to do the same operation?
|
|
|
|
|
That is not completly true C# and C++ can talk, in COM language. You can compile one site into COM and then share it as components.
Greetings,
Felipe
|
|
|
|
|
Thanks for advice, I guess I'll have to try some other approach.
It's just that .NET has some neat features, I'd like to use..
|
|
|
|
|
C# syntax is very similar to other languages, if you could just object-orient your C code, even very crudely it may be worth the swap... - and you can access WinAPI calls from .NET languages.
|
|
|
|
|
As the others have posted, you can use COM interop, but you may get better results using the .NET Hosting APIs.
For information, see "Hosting Interfaces.doc" under the .NET Framework SDK directory (typically C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Tool Developers Guide).
See also What Is CLR Hosting[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm writing an application that hosts plugins, and the plugins are executed in a worker thread.
Now in the plugins I would like to be able to show forms modal to the main application form.
If I just do this in a plugin:
databasedialog.ShowDialog();
it will not be modal to the main window. So my first thought was to give the plugins access to the IWin32Window of the main application form through a parameter sent to the plugin. And then I could do this:
<br />
IWin32Window win = context.MainForm;<br />
databasedialog.ShowDialog(win);<br />
But this will give me a crossthread access error.
Could anyone help me solve this?
thanks
/luddet
|
|
|
|
|
You have to show the form on the main form's thread. You can do this via Form.BeginInvoke[^].
private delegate void ShowModalDialogHandler(Form dialog);
private void ShowModalDialog(Form dialog)
{
if (context.MainForm.InvokeRequired)
{
context.MainForm.BeginInvoke(new ShowModalDialogHandler(ShowModalDialog), new object[] {dialog});
return;
}
dialog.ShowDialog();
}
|
|
|
|
|
Hi,
Yes, I was thinking it would be somthing along the lines of some Invoke method. But would really BeginInvoke be a good choice? That's an asynchronous call and I need the user settings from the dialog right after showing it. Would I get myself into trouble if I used the blocking Invoke instead?
thanks
gasoltub
|
|
|
|
|
I've only used BeginInvoke/Invoke to quickly update controls on a form. So, I really don't know. But I don't forsee any issues.
I agree with you. I'm thinking Invoke will probably be better in this case. Of course, you should still watch out if your modal dialog changes any data belonging to the worker thread, even when using a blocking Invoke() call. As a general rule, any calls used to manipulate data belonging to another thread should always be make thread safe to help prevent possible race conditions.
|
|
|
|
|
It wouldn't modify any data in the worker thread. It would only modify it's own member fields which would then be accessed from the worker thread after the user has closed the dialog. So I don't think race conditions would be an issue here.
|
|
|
|
|
Hi,
I have a VS2003 application project (not webproject) which I have converted to a VS2005 project.
In VS2003 the project works perfect but in VS2005 I get this error.
Error:
System.ObjectDisposedException was unhandled
Message="Safe handle has been closed"
Source="System"
ObjectName=""
StackTrace:
at System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at ᐂ.Finalize()
This error occurs when trying to open a MySqlConnection.
I use the .Net Connector 1.0.7.
I have tried both 1.1 and 2.0 versions of the connector. It doesn't work with either of them.
Any suggestions?
// regards Patrik
|
|
|
|
|
Using VS 2003 to create Window Applications
I would like to do something simulary to the TabControl has, but with the Tabs as buttons inside the center of the panel and not on top.
The parent class called frmMain which has some buttons on the panel and when a button is clicked calls the class frmButtonPushed1 and places that panel onto the parent panel exactly. If frmButtonPushed2 is pressed then that class info would be placed on teh parent panel exactly ect.
Would like to get all the infomation in frmButtonPushed class and placed in
frmMain panel. So when frmMain panel is moved so will the new
displayed info from frmButtonPushed class. Do not want another window poping up.
For example on the frmMain Class panel has the following buttons to click:
--------------------
ButtonClick1
ButtonClick2
ButtonClick3
--------------------
By clicking ButtonClick1 will then bring up a new panel over
the frmMain panel.
frmButtonClicked Class panel:
--------------------
This is a test 1
Cancel
---------------------
Click on Cancel will bring back the orginal frmMain Class panel.
I been looking at User Control but can not figure out how to to do
this.
Is there a simple sample code somewhere like this. I search but could
not find anything.
Hope this is clear. If not please let me know.
Any ideas would be helpful
Thanks Marty
-- modified at 10:00 Thursday 23rd February, 2006
|
|
|
|
|
I am interested in hearing how the .NET Dataset / Java serialization/deserialization is handled in the increasing number of .NET UI/Java mid-tier architectures.
I'm working on numerous applications for such an architecture and would prefer to retain the advantages of the DS at the client without impacting the "back-office" architecture. I'm very concerned regarding Datasets with multiple tables and relationships than a simple 1 table instance.
I'd especially like to know packages used, custom work performed, gotcha's, performance, bandwidth, etc.
if the many experts here don't have an answer, then it doesn't exist yet.
Nothing is impossible, we just don't know the way of it yet.
|
|
|
|
|
I don't think the dataset was really designed to do that. .NET 2.0 datasets are greatly improved over the .NET 1.1 ones, however. You might want to look into the Open Source DB4O which works with .NET or Java. Go to: http://www.db4o.com[^]
|
|
|
|
|
I've looked at db4o and other OO/ORB's - but they involve substantial work.
The DS is basically a relational architecture and Java is purely Object Oriented - inherently antagonistic paradigms (d**n - I said the P word!).- and predictably they don't mix well – like Chocolate Herring pie. The focus of my original question is to identify how others in my position have managed to get these things to work together in a nice, efficient manner.
So far that leaves me with three things to consider …
Replacing the DS completely means refactoring the code to use pure objects rather than the DS, adding custom binding code, adding all the object management logic (collections, relationships, database operations, matching the current behaviors exactly INCLUDING the errors, and tripling the project time with x thousand hours of regression tests, and possibly (probably) writing conversion test tools, enduser conversion tools, conversion backout tools, etc., etc., etc., etc., etc., etc., etc …… I wouldn’t want to do this for a simple standalone app let alone a multitier! it is far easier to just rewrite the whole thing.
Alternatively, supplementing the DS with a layer of pure object classes means more objects to design, code and maintain, DS to Object/Object to DS translation logic with increased potential for data logic/transcription errors, more complex change management processes (which would really endear me to the CM team), and god knows how much time to rewrite the developer documentation, utility classes, etc. I don’t know that this isn’t as messy as the other option.
The only reasonable option I've seen so far is to build specialized custom serializer/deserializer logic in both .NET and Java. While that brings its own issues with it, it is at least workable (subject to my continued research).
Last point ...
Eventually, we developers are going to have to force some integration standards on Microsoft, Sun, and IBM regarding the standardization between .NET and Java structures rather than trying to do it ourselves and being beaten bloody in the process.
Nothing is impossible, we just don't know the way of it yet.
|
|
|
|
|
If you have a database and you want to display relational data or do data processing via datasets, then datasets are a good choice. If your application is on the web, most of the time, you have to repopulate the datatsets to match the database each time you do a postback. With a Windows application, you don't have this problem but you run into the problem of keeping the data up-to-date. Datasets are great and have a lot of nice features but they do pose a resource hit when they grow beyond a certain size. As I said earlier, .NET 2.0 has improved performance and handles large datasets well. .NET 1.x datasets are slow.
I use a combination of datasets, business objects and XML in my projects. Since I can store and query XML on MS SQL and Oracle, I have been using that option more and more in my projects due to their hierarchical nature. Neverthess, using the XML DOM to process large documents is not recommended, IMHO. Business objects do require more work! Nevertheless, you have more control of the process to tweak for performance and to reduce resource overhead.
-- modified at 6:44 Wednesday 22nd February, 2006
|
|
|
|
|
|
Hi,
I have project written in .NET 1.1. It uses also some libraries of third parties (Firebird .Net provider and TAO - OpenGL library).
I want to transfer it to .NET 2.0.
I want to ask if there is 100% backwards binary compatibility in .NET 2.0. I mean, if I use for example TAO library compiled under .NET 1.1 in my .NET 2.0 app.. Will it correctly work under .NET 2.0?
And case, when I have only .NET 2.0 installed on system and 1.1. not.
Will be working everything compiled under 1.1 correctly. ??
For first I have tried to compile entire my project (except firebird provider and TAO) and it seems to work after a few tests.
I have tried to found something online on MSDN but without the results
Peter
|
|
|
|
|
Well in theory most of the code should work.
But in practise you will not know until you actually try;)
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
CWIZO wrote: Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
Your derived class is talking in the first person plural!
|
|
|
|
|
Don't you know the "All your base are belong to us!" joke?
http://en.wikipedia.org/wiki/All_your_base_are_belong_to_us
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|