Click here to Skip to main content
15,904,155 members
Home / Discussions / C#
   

C#

 
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
GeneralRe: Strange problem Pin
Daniel Turini3-Dec-04 5:13
Daniel Turini3-Dec-04 5:13 
GeneralRe: Strange problem Pin
Stefan Troschuetz3-Dec-04 6:53
Stefan Troschuetz3-Dec-04 6:53 
GeneralDifferences Control vs UserControl Pin
Ivan Fernandez3-Dec-04 1:44
Ivan Fernandez3-Dec-04 1:44 
GeneralRe: Differences Control vs UserControl Pin
Alex Korchemniy3-Dec-04 3:38
Alex Korchemniy3-Dec-04 3:38 
GeneralRe: Differences Control vs UserControl Pin
cchere3-Dec-04 4:24
cchere3-Dec-04 4:24 
GeneralRe: Differences Control vs UserControl Pin
Alex Korchemniy3-Dec-04 4:31
Alex Korchemniy3-Dec-04 4:31 
GeneralControl vs UserControl Pin
Ivan Fernandez3-Dec-04 1:43
Ivan Fernandez3-Dec-04 1:43 
Generalcalculation during compile time Pin
dkoder3-Dec-04 1:21
dkoder3-Dec-04 1:21 
GeneralRe: calculation during compile time Pin
Felix Cho3-Dec-04 1:45
Felix Cho3-Dec-04 1:45 
GeneralAdding attributes to inherited members Pin
Paul Watson3-Dec-04 0:51
sitebuilderPaul Watson3-Dec-04 0:51 
GeneralRe: Adding attributes to inherited members Pin
Daniel Turini3-Dec-04 1:02
Daniel Turini3-Dec-04 1:02 
GeneralUsing FTP Pin
Member 10976992-Dec-04 22:50
Member 10976992-Dec-04 22:50 
GeneralRe: Using FTP Pin
Daniel Turini3-Dec-04 1:05
Daniel Turini3-Dec-04 1:05 
GeneralRe: Using FTP Pin
Alex Korchemniy3-Dec-04 3:25
Alex Korchemniy3-Dec-04 3:25 

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.