I have a C# code snippet using thread and delegates which works fine in debug mode i.e. with break points and the same code doesn't work in run mode. I am running this on Windows XP 64 bit OS and .net 2.0. Any help in this regard is appreciated.
I presume by "run mode" what you really mean is "Release"? Or are you taking the debug build and running it outside of Visual Studio?
Also, it helps if you post the snippet so we can see what is going on. Saying it "doesn't work" is somewhat vague and unhelpful.
In Debug some values will be set to default values while in realse it may be assigned with null. Code depending on those may give some error also. Pls check for #if Debug kind of directives in this case the could will only work in debug mode never in release mode
Do you have any threads running ? Are the bugs UI related ? I often find that breakpoints can make code work, because it will force a break which causes things to work where otherwise they face a race condition, or where a paint message gets lost due to too much processing happening for it to occur, that sort of thing.
What is the nature of the bug ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
I am new to this service and would like to know if it is appropriate to post an open job requirement on this discussion board? I have an immediate need for a Senior .Net Architect with experience developing in C# for the Compact Framework. The position is located in Orlando, FL. I can receive resumes at: email@example.com. If this type of posting is not welcomed then just let me know and it will not be repeated. Thanks in advance.
The problem I have seems simple at first:
I have a bunch of data (strings, int etc.) and a XSD file. I need to create an Xml compliant with the XSD and having the data inside.
(The whole thing is command basically parsing and creating custom Xmls based on the command type and parameters.)
"Simple" ends here.
I am currently creating a Web application that uses a master page, a .aspx page and then a couple of user controls. Depending on the choice the user selects, I load the selected control into a placeholder. Everything works when I debug but when the application goes live I get the following error at runtime when trying to load the controls:
System.InvalidCastException: Unable to cast object of type 'ASP.customer_details_ascx' to type 'Details'.
This is what the code looks like, and the error is thrown on this line: Details ctrl1 = (Details)LoadControl( "~/Customer/Details.ascx" );
I have changed the "batch=false" in the web.config, and have changed all the <%@ Reference %> directives to <%@ Register %> directives in the Main .aspx page. But none of this seems to fix the problem. Please help with any suggestions, I have searched the web for hopeful answers to the problem but they did not work (they were the <%@ Register %> and "batch=false"). It seems to be a problem that many people are facing.
- A remoting object
- A server that instanciates the remote object and registrates it in a
- A client that retrieves the object from the channel and executes methods.
When that happens, the results affects the server application.
Well, my scenario is a bit different.
I have a server that is a windows service and receives some messages that
inserts in a database.
I want to add a interface monitoring that messages, so I write another
application and I want to use remoting to communicate with the server.
Then I added a message class, that is remotable. I use that class in my
server, and I registrate that object in a channel.
The client should retrieve the object and show the messages in a control,
but when I get the object from the channel it is empty.
The difference is that in the example scenario, the client executes methods
that affect the server, but I need the opposite.
My only idea is moving the message class to my actual client, but then the
service won't work if the client isn't open.
Do you understand the problem? Any solution please?
i am currently using c# window application on visual studio .net 2005
for those remoting pro out there should know what singleton at server is used for in the remoting
i am currently trying to instead let the client initialise the creation of the remotable class
but instead, create the remotable class once the server start up and inherite it to my window application form so that i can use the values within it.
i am not sure if this method will work so please advice me or give me tips about this way.
also does anyone know how i can create the remotable class once the server start up and inherite it to my window application form so that i can use the values within it.
i cant find any sample codes that does something like that
is this extention to dot net framework necessary to use WPF , I am interest in this technology but i cant use it i have installed .net framework 3.0 but it does not appear when i make new project using visaul stodio can you help me ...\
I use VB.NET 2003 on Windows XP pro and .NET framework 1.1 SP1. VS2005 and .NET 2.0 are also installed.
I am using a combobox on a tabcontrol. When I select a value at runtime directly in the dropdown list of the combobox, it works normally. But it abnormally fires events (SelectionChangeCommitted, SelectedIndexChanged, SelectedValueChanged) when I use the scrollbar of the combobox : events get fired even if I have not selected anything, just after releasing the mouse button above the scrollbar. Then, the application runs into the dispose method of the form and complains about an unexisting instance addressed by reference, and exits on this bug. I observe this behaviour whether I bind it at runtime or I fill its rows at design time. I have tried to solve it and to work around this behaviour without success. Is this a known bug ? I have not found any report on such behaviour in .NET 1.1.
I would greatly appreciate help and explaination ! Thank you.
This property looks to be available for web applications with ASP.NET. I am working on a desktop application written in VB.NET 2003 and no such property exists for combobox.
Furthermore, the problem I describe is really weird and inconsistant : events like SelectionChangedEvent get fired despite the fact that I do not select anything. I just release the mouse button above the combobox scrollbar, which should not fire such event as no selection was already made. I suspect something got wrong on my machine and I need to reinstall VS and .NET. I hope not. Has anyone a suggestion ?
Yes, this is a peculiar problem which I've faced too. The event seems to fire when the control is initialized. I haven't really dug too deep into this, but one way to workaround this is to check for the SelectedIndex property. It's usually -1 or 0 when the event fires unwanted. Put your whole logic inside a if condition that checks for SelectedIndex > 0.
Last Visit: 31-Dec-99 18:00 Last Update: 20-Apr-21 10:50