Click here to Skip to main content
15,920,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: Very Very Long Complex C# Programs Pin
Robert Rohde4-Dec-04 8:41
Robert Rohde4-Dec-04 8:41 
GeneralRe: Very Very Long Complex C# Programs Pin
demasoni.com4-Dec-04 19:34
demasoni.com4-Dec-04 19:34 
GeneralProbably simple Pin
stamester3-Dec-04 13:05
stamester3-Dec-04 13:05 
GeneralColored Rectangle around control with focus Pin
mlamb3-Dec-04 11:42
mlamb3-Dec-04 11:42 
GeneralRe: Colored Rectangle around control with focus Pin
Robin Panther3-Dec-04 13:09
Robin Panther3-Dec-04 13:09 
QuestionHow to use WMI to collect a fixed number of sys logs at one time Pin
Loug523-Dec-04 11:35
Loug523-Dec-04 11:35 
GeneralMove button Pin
Giuseppe Di Modica3-Dec-04 10:10
Giuseppe Di Modica3-Dec-04 10:10 
GeneralRe: Move button Pin
DougW483-Dec-04 10:33
DougW483-Dec-04 10:33 
GeneralRe: Move button Pin
Giuseppe Di Modica3-Dec-04 10:44
Giuseppe Di Modica3-Dec-04 10:44 
GeneralRe: Move button Pin
Robert Rohde4-Dec-04 8:53
Robert Rohde4-Dec-04 8:53 
GeneralRe: Move button Pin
Giuseppe Di Modica4-Dec-04 9:42
Giuseppe Di Modica4-Dec-04 9:42 
Generalsplitting stream data Pin
jtmtv183-Dec-04 9:37
jtmtv183-Dec-04 9:37 
GeneralRe: splitting stream data Pin
Daniel Turini3-Dec-04 19:07
Daniel Turini3-Dec-04 19:07 
GeneralRe: splitting stream data Pin
jtmtv183-Dec-04 19:38
jtmtv183-Dec-04 19:38 
GeneralNotifier in SmartClient way.. Pin
aznkk773-Dec-04 9:20
aznkk773-Dec-04 9:20 
GeneralNetStream problem Pin
Marc Clifton3-Dec-04 8:06
mvaMarc Clifton3-Dec-04 8:06 
GeneralRe: NetStream problem Pin
leppie3-Dec-04 8:30
leppie3-Dec-04 8:30 
GeneralRe: NetStream problem Pin
Marc Clifton3-Dec-04 10:16
mvaMarc Clifton3-Dec-04 10:16 
GeneralRe: NetStream problem Pin
leppie4-Dec-04 1:19
leppie4-Dec-04 1:19 
GeneralForm: best way Pin
Stijn Goris3-Dec-04 4:53
Stijn Goris3-Dec-04 4:53 
GeneralRe: Form: best way Pin
perlmunger3-Dec-04 5:14
perlmunger3-Dec-04 5:14 
GeneralTask Scheduling Pin
dragonroamer3-Dec-04 4:31
dragonroamer3-Dec-04 4:31 
GeneralRe: Task Scheduling Pin
Daniel Turini3-Dec-04 5:15
Daniel Turini3-Dec-04 5:15 
GeneralRe: Task Scheduling Pin
Dave Kreskowiak3-Dec-04 5:24
mveDave Kreskowiak3-Dec-04 5:24 
GeneralStrange problem Pin
Stefan Troschuetz3-Dec-04 4:28
Stefan Troschuetz3-Dec-04 4:28 
Hallo CP's!

Yesterday I've encountered a really strange problem and I hope someone here can help me out.
I'm currently developing a small application, which manages birthdays and reminds the user a few days before a birthday. The birthdays are stored into a XML file by using XML serialization.
try
{
	XmlRootAttribute xmlRoot = new XmlRootAttribute("BirthdayList");
	xmlRoot.Namespace = "http://www.troschuetz.de";
			
	XmlSerializer serializer = new XmlSerializer(typeof(BirthdayList), xmlRoot); //<---------
	serializer.Serialize(writeStream, this.birthdays);
}


The preceeding code snippet is called by the event handler for the Closing event of my main form. Everything worked fine during development, so I began using the application. As the program has a reminder function it's supossed to run from login until logoff of an user. But here is where the drama begins.
When I normally exit the application everything works fine, but when the program has to exit due to an user logoff or a shutdown it crashes. The error is caused by the line marked in the above code snippet. This is what happens:

1. A dialog box pops up saying: "csc.exe Error in the application
The application could not be initialized correctly." (Please note that this error message was translated from german)

2. After clicking the OK button the dialog box disappears and the following exception is thrown:
Could not find file "C:\DOKUME~1\Arbeiten\LOKALE~1\Temp\ak6ctdg1.dll".
System.IO.FileNotFoundException
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
at Troschuetz.BirthdayManager.FormMain.SerializeBirthdays() in e:\SharpDevelop Projects\Birthday Manager\Birthday Manager\FormMain.cs:line 502

To makes things even more strange, the error only occurs when I run my application under an account without administrator privileges.

Any suggestions?

THX in advance







www.troschuetz.de

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.