|
I have a configuration class, FileMonitorConfig, that has a few string properties, and one ConnectionInfo property. The ConnectionInfo class in turn has a few string properties that describe a SQL Server connection.
When I write the FileMonitorConfig object, the inner ConnectionInfo object does not get serialized. It always appears a an empty tag in the config file.
Nothing in the literature indicates that only the top level of an object graph gets serialized, and the Serializable attribute on either class has no effect. Am I doing something wrong, or should I consider the provided Xml Serializer Transformer effectively useless and develop a custom transformer?
The DJ's took pills to stay awakwe and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
It seems that when the transaction of my C# Serviced Component times out the code still goes ahead and attempts another operation on that transaction. It then catches an exception. Is there not a way to be aware of the timeout event and abort processing before generating an exception?
The DJ's took pills to stay awakwe and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Hi,
I am working on a fairly good sized .NET CF application (single process, multi-threaded) that runs on WinCE 5.0. The application is all C#, with a decent amount of p/invokes into OS calls and a 3rd party native DLL.
I have been trying to use the Remote Heap Walker to examine the applications heap and have run into the following issue:
When I use Remote Heap Walker I see my application and Heap Walker shows is as having 3 Heap regions. One of the heap regions HF32_DEFAULT flag set, the other 2 do not. I am able to examine the contents of the 2 heap regions that do not have the HF32_DEFAULT flag set, but when I try to examine the one that does have the flag, the Heap Walker application does the following:
Writes this to the debug output:
Data Abort: Thread=96b74da8 Proc=91ed8e40 'CEHWCLI.EXE'
AKY=00040001 PC=000117c4(CEHWCLI.EXE+0x000017c4) RA=001af000(CEHWCLI.EXE+0x0019f00) BVA=261b1000 FSR=00000007
And pops up a window to the display showing a fatal application Error.
My application is still running just fine and shows no ill effects. The reason I started using the Heap Walker is due to some random data aborts that pop up from time to time. Also, I am sometimes seeing the application gobble up all the memory on the WinCE device (when this occurs, I cannot even see my process using Heap Walker). Both of these occur sporadically, and not on all devices.
Does the Heap Walker tool throwing a data abort mean that the heap is corrupted (it happens every time, even just after applicaiton start up), or is there something incompatible with Heap Walker and large .NET CF applications?
Any insight is greatly appreciated.
Thanks.
|
|
|
|
|
I have a simple Windows Service. It is a timer loop, and when the timer expires it calls an external component to check if certain tasks need to be executed.
I noticed it was leaking memory. The Service itself does nothing but call a function in the external component, and it creates one reference to this component at startup and keeps this single reference to the component throughout the service lifetime.
At first I thought this might be a Timer problem, because it leaks memory every time the Elapse event expires.
But after a lot of experimentation, I determined that the memory leak actually occurs because of a call to write an entry in an EventLog. If I remove the EventLog entry write from the Timer_Elaspe event, the memory leak goes away.
I'm running Framework 1.1 on Win2K Service Pack 4.
Anyone else seen this problem??
|
|
|
|
|
I need to create a windows user account and add permissions for a specific folder. I have to code to create a auser, but how can I add permissions for this user on a specific folder?
|
|
|
|
|
Can someone suggest a tool to find the dependencies of a .NET assembly?
|
|
|
|
|
|
|
How can I get information about currently logged users (user names) in windows?
--
Digitally yours, Bounz
|
|
|
|
|
Hi all,
I am working in .NETCF.I am developing similar to paint software for Pocket PC using .NETCF.I like to do cut/copy/paste. For that I need to select particular area in picture box. How to do that.
If I am draw the rectangle then it is merged to the picture box. So I am not able not able to zoom that.
If I am creating new bitmap with rectangle drawn. But it is not transparent. So I am not able to view the actual picture behind that bitmap. How to handle this. Please help me.
Regards,
S.Sevugan.
|
|
|
|
|
how to pass messages between java and .net without using sockets
Mohamed Hasan is usally called as Hasan. He is very much interested in C++ programming . He slowly picking up .NET programming. He done his Bachler degree in Arumugam Pillai Seethai Ammal college Thiruppathur. and Master degree in MK university College.
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
|
|
|
|
|
|
We have an API from a contributor that provides us access to their data via web services. My code is a small server that runs 24/7 and repeatedly (every 5 seconds) requests updates via a call to a web service method. So far it seems that after a day or two of continuous running, this call ends up blocking forever.
Looking into the wrapper code, I see that it is derived from the System.Web.Services.Protocols.SoapHttpClientProtocol class, and the wrapper method ends up calling Invoke().
The docs claim that you can set a timeout using the Timeout property of the class. They further claim the default timeout is 15 seconds. This does not seem to be the case otherwise the call would return after 15 seconds, wouldn't it? Is there something else I'm missing?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Newbie question.
I have a .net form (C++) and all I want to do is launch an external application when a button is pushed. (e.g. MSWord or Notepad) The button is all setup, and right now I just have it displaying a message box when it's pushed. How can I tell the operating system to go launch this independent application?
Thanks in advance.
John
|
|
|
|
|
|
Thanks for the help.
In case anyone else has the same question, here's a direct link to the MSDN article and a code snip that I did based on it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticsprocessmemberstopic.asp
private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
Process *myProcess;
myProcess = Process::Start(S"Notepad.exe");
while (!myProcess->HasExited){
Thread::Sleep(500);
myProcess->Refresh();
}
myProcess->Close();
MessageBox::Show( "Complete", "Notepad has exited");
|
|
|
|
|
in earlier times it was possible to install a app with setup /r to record the user interactions in a Setup.iss. after that we run the setup in silent mode.
is the same posssible with a msiexec installation?
Ariadne
|
|
|
|
|
msiexec supports a /qn switch that will force it to run as a silent install.
But I am not aware of any equivalent to InstallShield's utility to generate a script to supply any required user fields.
You can supply default values in the MSI Properties table.
If you require things like a database login, obviously default values will not work. You may be able to accomplish this by having and administrator run an Admin install for his user groups. But I have personally never worked with Admin installs, and I am not very clear on exactly how they function.
Unfortunately the MSI documentation is poor at best ...
|
|
|
|
|
Hi all,
In my project we had system to log the exceptions through creating a text file for each day and writing the exceptions occured during tht day. The exceptions will be cathed through exception handling applied for necessary events.
There is system class called using 'System.Diagnostics' in .net.
Through which we can enter details in to a cutom log and we can see the details .
My point is it better to use the application orinted logging as we are doing or
Is it better to use the 'System.Diagnostics.EventLog()' for logging the errors.
Is any one worked on these concepts..? Please let me know the details.
Adavanced Thanks,
yeggu
|
|
|
|
|
Microsoft is pushing System Diagnostics logging, but I think you can argue for and against both methods.
There are two clear cut cases:
1) Windows Services should definitely use "System" logs.
2) If you still have to support Win98, there are no system logs, so a conventional file method is your only option. Of course you could create multiple versions, but I see no compelling reason to do so just for logging.
There are pluses and minus for both. For example, if you need to troubleshoot a weird problem it is a lot simpler to ask a client to find a folder and e-mail you a log file than it is to try to explain to them how to save a System log to a file and send it.
On the other hand if you actually have access to the Event log viewer, you can assign levels when you write messages and then System logs make it easy to find critical errors out of possibly a large number of insignificent messages.
Personally, I use both methods. If it is an application that I will be managing directly on a server I have access to I will use a System log. If it is a "3rd party app" that I don't expect to have direct access to once I've released it I ten d to still use the old fashioned flat file approach for the reason I've mentioned - I can always request an error log by e-mail if a problem arises.
You really have to evaluate your own specific situation.
|
|
|
|
|
Hi All!
I need to know that fromwhere I can modify the Install Shield script. I have created a setup in InstallShield X and now i want to modify its code. I cant find the code. It has just the design view...
Need Help immediately
Thanx
_mubashir
Marriala Technologies,
Pakistan
|
|
|
|
|
Hi
I am facing one problem while opening my Dot net project ?Error is coming like there "There is error on 1 Line:Expected '<' but found Auto attach" and the corresponding project file is not a valid project.
if anybody knows please help me out
dimp
dimp
|
|
|
|
|
Hii All!
I have created an application using Vb.net......Now I want to make its installer with Install Shield. I want the installer to check whether the .Net Framework is installed, if not then install it. I need to know that what kind of scripting is required to achieve it.
Regards
_mubashir
Marriala Technologies,
Pakistan
|
|
|
|
|
Search the MSDN for Bootstrapping the NET Framework. They have C++ source code that you can use as an example of how to check this. You should be able to convert that into Install Script, because is is essentially a "C" language.
|
|
|
|
|
Hi folks,
The following piece of C#.NET code creates an A4 size binary image by reading values from a two-dimensional byte array iPage[][].
Is there anyway I can further optimize the nested for loop inside the unsafe block? It is taking ~2.2s, and I'd love to bring it down further.
Sarab.
// page dimensions
iwd=iPage.Length;
iht=iPage[0].Length;
// create new bitmap
bMap=new Bitmap(iwd, iht, PixelFormat.Format24bppRgb);
// create bitmap data
bData=bMap.LockBits(new Rectangle (0,0,iwd,iht),ImageLockMode.WriteOnly,PixelFormat.Format24bppRgb);
// get bitmap position
Scan0 = bData.Scan0;
iStride=bData.Stride;
unsafe
{
// initialize pointer
byte *p = (byte*)(void*)Scan0;
int nOffset = iStride-iwd*3;
for(int y=0;y<iht;++y)
{
for(int x=0;x<iwd;++x)
{
if (iPage[x][y]==0) p[0]=p[1]=p[2]=255;
else p[0]=p[1]=p[2]=0;
p += 3;
}
p += nOffset;
}
}
PS. the code above is inspired from the article(s): http://www.codeproject.com/cs/media/csharpgraphicfilters11.asp
|
|
|
|