|
Hi,
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.
AZ
|
|
|
|
|
.netEnthu wrote: 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
|
|
|
|
|
subrata.jana wrote: In Debug some values will be set to default values while in realse it may be assigned with null.
No it won't.
An integer will be assigned 0 by default in Debug and Release. A Boolean will be false in both. A reference type will be null by default in both debug and release.
Can you cite any example where an object is assigned one value by default in a Debug build and another in Release?
|
|
|
|
|
Thanks to correct me. Then only we can check for #if Debug .in this case.
|
|
|
|
|
.netEnthu wrote: the same code doesn't work
Dont hesitate to be a little bit more specific, so we might be able to help.
.netEnthu wrote: a C# code snippet
care to share it ?
|
|
|
|
|
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 )
|
|
|
|
|
may be one of your threads working depends on other thread .. and at runtime a deadlock creates due to lesser time or some other reason.
|
|
|
|
|
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: dgordon@ciber.com. If this type of posting is not welcomed then just let me know and it will not be repeated. Thanks in advance.
Dale
|
|
|
|
|
This is a programming question forum.
Ben
|
|
|
|
|
dalegordon wrote: if it is appropriate to post an open job requirement on this discussion board?
No, it's not. They go here[^].
|
|
|
|
|
Ok, sorry for the inconvenience and I appreciate the heads-up on the job advertisement section.
|
|
|
|
|
Hi everyone,
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.
Does anyone have an idea how to do this (in C#)?
Thanks in advance.
|
|
|
|
|
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" );
protected void Details_Click()
{
Details ctrl1 = (Details)LoadControl( "~/Customer/Details.ascx" );
PlaceHolder1.Controls.Clear();
PlaceHolder1.Controls.Add( ctrl1 );
}
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.
Thanks
Jeff
|
|
|
|
|
You don't actually need to convert the control. All you need to do is replace this with:
Control ctrl = LoadControl("~/Customer/Details.ascx");
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello. I'm having troubles with Remoting.
I've been doing a sample that has:
- A remoting object
- A server that instanciates the remote object and registrates it in a
channel
- 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?
Regards,
Diego F.
|
|
|
|
|
hi
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
thx
|
|
|
|
|
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 ...\
my name is layth abu sada
plaese help me
best regards
layth@ayla.ws
-- modified at 12:00 Wednesday 9th May, 2007
|
|
|
|
|
I am not sure of the exact name of the installer, but you need to install the Visual Studio Orcas tools for Visual studio 2005 if you want to have VS 2005 support for WPF.
|
|
|
|
|
- Make sure you install VS2005-SP1
- Always close your VS2005 to install
- Reboot your system after you install vsextwfx.msi
God bless,
Ernest
|
|
|
|
|
Hello,
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.
-- modified at 4:21 Wednesday 9th May, 2007
|
|
|
|
|
Set AutoPostBack property of combobox as false
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
No such property seems to be defined for combobox in .NET 1.1. Can you please precise your solution ? Thank you.
|
|
|
|
|
hey its there...Open you eyes please check it closely
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
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 ?
|
|
|
|