|
You need to learn more on how .NET configuration system works. It will never report a missing configuration file since there is always a master config file with default settings (machine.config). What you put in your application's config file just overrides (or adds to) those values.
Configuration files are typically attached to processes. Since a .NET library is not loaded into its own process but loaded into the calling process, it uses the calling process's config file. It is a mistake that every newbie makes.
|
|
|
|
|
Well why should the message then read
This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
I do know about the cascading of config files - a great feature btw - but I do not know every detail about what can be configured in machine.config versus web.config/app.config, nor do I remember exactly how web services and WCF services are configured.
In general however I have to say .NET usually does a fairly good job with error messages, compared to anything else I've used. That doesn't mean it's the right tradeoff tho! For every small improvement in the error reporting of any library used by many people, a lot of people can end up saving some time, and in aggregate quite a lot of time. That's the point I want to get across.
|
|
|
|
|
Hi,
I have an excel add-in which is developed using .Net framework 3.5.
When I have excel.exe.config file with supported version 3.5, excel crashes.
When I delete this configuration file, add-in works fine.
Any idea why this behavior?
|
|
|
|
|
Since we don't know what the add-in is it's a bit hard to say much useful to this.
However, I'll speculate that Excel runs the add-in in-process, and there is probably a bug in the add-in that causes it to crash either whenever there is a configuration file or perhaps more likely when that configuration file contains some particular thing (or is invalid in some way). Any unhandled exception in the plug-in would take down the process it's running in.
The fact that the file is called Excel.exe.config is a hint that the plug-in runs in-process, since by default the configuration system will look for a file named the same as the process + ".config".
|
|
|
|
|
|
This is the C# forum. It's for programming questions.
|
|
|
|
|
did i make mistake?
i did the same and asked about solution in C#
Bye...
Khalid Mehmood Awan
|
|
|
|
|
Hi,
I am new to .NET Windows Forms Applications.
Would you please let me know if there is any sample ’N Tier Windows Forms Application’ built on C#.NET so
that I could go through it and understand the concepts?
It would be of great help to me.
Many thanks.
Regards,
Reshma.
|
|
|
|
|
Did you tried searching in google? Or articles here at CP?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Hi!
I have a TextBox with a Button and a ListBox. I will type in an email address and click the button and the email address will be added to the listbox. Simple enough.
My question is this:
How would I go about serializing the ITEMS in the ListBox to an XML file? I know how to create the XML file using the SOAPFormatter but I only serialize the first item in the listbox. I need to serialize all of the items in the listbox.
Thank you!
Illegal Operation
|
|
|
|
|
|
Hi,
I am working on retrieving emails from mail servers(like gmail,etc..) using pop3 and imap. I need to know, is there any other way to do this without using these protocols.
Thank you.
|
|
|
|
|
|
...is this possible? how do you add userdefined properties to
the dgv unbound column properties designer.
i want to add a user defined properties on the unbound columns
settings that can be set during design time
Life - Dreams = Job
TheCardinal
BenPOS Systems
modified on Sunday, November 22, 2009 11:24 PM
|
|
|
|
|
I don't think that's possible; you are essentially asking to modify framework types.
That's generally not possible. But in most cases we can derive new types from them (when they are not sealed). In this case you could perhaps derive a custom grid type from DataGridView, a column type from DataGridViewColumn, and have your custom grid use your custom column for unbound columns. That way you can add whatever properties you like and associate your own designer class and type editors with it if you wish.
|
|
|
|
|
thanks for the reply, thats what im afraid, but i have already tried to look for more commercial product that can easily be extended
thanks for the input, ill try your idea
Life - Dreams = Job
TheCardinal
BenPOS Systems
|
|
|
|
|
Hi All,
How can i open existing excel sheet using C# code.
For ex :In my C: directory i have xl book.i want to open and write some value.I have used below code but its giving error.am using office 2007.
string workbookPath = "c:/SomeWorkBook.xls";
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(workbookPath,
0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true, false, false);
Thanks,
Mohan.T
Mohan T
|
|
|
|
|
|
Hi
Thanks for ur reply...
I have tried that
it giving below error
An unhandled exception of type 'System.NullReferenceException' occurred in testexcelwrite.exe
Additional information: Object reference not set to an instance of an object
Mohan T
|
|
|
|
|
mohant$.net wrote: An unhandled exception of type 'System.NullReferenceException' occurred in testexcelwrite.exe
Additional information: Object reference not set to an instance of an object
It clearly saying that some object is not initialize. Please go thorough the code and debugged it. Or show us the code.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Excel.Application XlApp;
Excel._Workbook XlWB;
string workbookPath = "c:/test.xls";
XlWB = XlApp.Workbooks.Open(workbookPath,0,false, 5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
Mohan
|
|
|
|
|
In which line it throwing the exception ? Did you debug the code ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Its giving the exception in
XlWB = XlApp.Workbooks.Open(workbookPath,0,false, 5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
and Exception is:
An unhandled exception of type 'System.NullReferenceException' occurred in testexcelwrite.exe
Additional information: Object reference not set to an instance of an object.
Mohan T
|
|
|
|
|
mohant$.net wrote: XlWB = XlApp.Workbooks.Open(workbookPath,0,false, 5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
I think you need to initialize XlWB
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|