I have a WPF problem, namely my GUI top level exception handler doesn't:
publicpartialclass ApplicationWindow : System.Windows.Window<br />
public ApplicationWindow()<br />
AppDomain.CurrentDomain.UnhandledException += <br />
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); <br />
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)<br />
// Some stuff here that writes to event log*<br />
* The code that I've removed from here works when CurrentDomain_UnhandledException is called sucessfully. Also I have try catches round all my top level execution blocks.
The problem I get is intermittant, and has only happened on the live machines . When I look at the event log, the CurrentDomain_UnhandledException isn't called (there is no event log entry), but I get a .net 2 runtime error:
I know the error must be from WCF which is referenced by the GUI and have put pretty decent exception trapping in my client code. I really need to know how to capture the execption at the top level in the GUI (have I missed anything?).
Install DirectX SDK from Microsoft. Add the needed reference to your project. Then add namespace you need to compile it. If you are using VS2005, then just mouse over unknown class, then click at the small box "using DirectX.xxx.xxx.xxx", then namespace will be added automatically.
I have never worked with DirectX but just to be sure for others: When you say you installed DirectX, what is it that you installed exactly? The runtime or the SDK? If you didn't install the SDK, there is no chance that any DirectX project will work (I think!)
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
I'm experimenting on UPnP in Windows Vista Ultimate with Media Center. I've set up a few UPnP AV media servers and could connect to the data from Windows Media Player. But in Media Center I could only browse local files and no files from other UPnP servers.
That's why I'd try to write a C# UPnP client, that uses ALL available AV servers and not only the local storage in Vista MCE.
I've found out there are Intel tools für UPnP, but they are written in C. There is also UPnP support in Platform SDK CE, but I'm using UPnP on a standard PC.
I did not find any UPnP clients in C# here on codeproject. Maybe I've overlooked one in the results or someone of you knows some good external links on how to build a UPnP client in C# (without manually writing the protocol).
I am wondering if I am using TCPClient class in C#, how to setup timeout value? Timeout I mean, when connects to server for the 1st time, and during <timeout> interval, if no server response is received, the GetStream method will return will return other than wait forever.
Hey Guys, whats going on ? I want to check the the way I connect to sql and see if there's a more professional way, so please bare me !!! thanx
First I declare my SqlConnection, SqlDataAdapter and DataSet
SqlConnection InstConn = new SqlConnection();<br />
SqlDataAdapter InstDA = new SqlDataAdapter();<br />
DataSet DS = new DataSet();
then i create my Command text (Select, delete or update) SqlCommand ChkCmd = new SqlCommand();
for selection then I fill my data set InstDA .Fill(DS , "Table Name");
and if its Insert Delete or edit I use ChkCmd .ExecuteNonQuery();
Not to mention that for edit I use SqlParameter.
so what do you think ? Is there a better way for doing this ?
and I also have another question, how can I prevent users from manipulating my database by entering some SQL command in a text box ! I know in ASP.net It authomatically prevent this, is this the same in C# Win or we have to manually do the same thing ?