Click here to Skip to main content
15,914,419 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: adding controls to tabpages in c# using ado.net Pin
Eslam Afifi18-Mar-09 7:40
Eslam Afifi18-Mar-09 7:40 
QuestionForm loading - help Pin
jdcorr16-Mar-09 14:00
jdcorr16-Mar-09 14:00 
AnswerRe: Form loading - help Pin
Eslam Afifi17-Mar-09 0:01
Eslam Afifi17-Mar-09 0:01 
AnswerRe: Form loading - help Pin
tech60319-Mar-09 18:40
tech60319-Mar-09 18:40 
AnswerRe: Form loading - help Pin
Skymir27-Mar-09 8:29
Skymir27-Mar-09 8:29 
QuestionCrystal Report for Visual Studio 2008 Pin
abdu29216-Mar-09 0:34
abdu29216-Mar-09 0:34 
AnswerRe: Crystal Report for Visual Studio 2008 Pin
jaypatel51220-Mar-09 18:55
jaypatel51220-Mar-09 18:55 
Questionlog4net issue in windows application Pin
ramakrishnamakkena13-Mar-09 4:59
ramakrishnamakkena13-Mar-09 4:59 
I have an window application(using log4net) with App.config as below

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

<log4net debug="true">
<appender name="ErrorLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="E:\\Logs\\Test.log" />
<appendToFile value="true" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<datePattern value="yyyyMMdd" />
<rollingStyle value="Date" />
<filter type="log4net.Filter.StringMatchFilter">
<param name="AcceptOnMatch" value="false" />
<param name="StringToMatch" value="get_aspx_ver.aspx" />
</filter>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="WARN" />
<levelMax value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>

<root>
<level value="ERROR" />
<appender-ref ref="SmtpAppender" />
<appender-ref ref="InfoLogFileAppender" />
<appender-ref ref="ErrorLogFileAppender" />
</root>
</log4net>

</configuration>

I configured log4net as above.

and in Assemblyinfo.cs file i used the tag like
[assembly: XmlConfigurator(ConfigFile="App.config",Watch=true)]

now My problem is when i run this windows application,error is not logging to the given path.

It seems it is looking the app.config file in bin\debug folder.
if i copy &amp; paste the app.config file in the bin\debug file then it is writing error into the given path.else it is not writing.

when we add new item defaultly the file will be in our project location.right?

Please suggest me, why it is behaving like that?

I enabled log4net debug,at that time, error is as below:

log4net: XmlConfigurator: config file [E:\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\App.config] not found. Configuration unchanged.
log4net: Hierarchy: Shutdown called on Hierarchy [log4net-default-repository]

Please give me suggestions as soon as possible.
AnswerRe: log4net issue in windows application Pin
Curtis Schlak.13-Mar-09 9:45
Curtis Schlak.13-Mar-09 9:45 
AnswerRe: log4net issue in windows application Pin
Giorgi Dalakishvili13-Mar-09 10:04
mentorGiorgi Dalakishvili13-Mar-09 10:04 
QuestionDisplay Image in DatagiedView Pin
raushan_912-Mar-09 20:06
raushan_912-Mar-09 20:06 
AnswerRe: Display Image in DatagiedView Pin
dan!sh 13-Mar-09 5:30
professional dan!sh 13-Mar-09 5:30 
QuestionRetaining selected node of treeview Pin
Fadi Yoosuf12-Mar-09 1:26
Fadi Yoosuf12-Mar-09 1:26 
AnswerRe: Retaining selected node of treeview Pin
Eddy Vluggen12-Mar-09 4:26
professionalEddy Vluggen12-Mar-09 4:26 
Questionnon-modal forms can not be displayed in this host application from an activex dll + VB.net Pin
Member 437854611-Mar-09 22:34
Member 437854611-Mar-09 22:34 
AnswerRe: non-modal forms can not be displayed in this host application from an activex dll + VB.net Pin
Ashfield12-Mar-09 2:42
Ashfield12-Mar-09 2:42 
AnswerRe: non-modal forms can not be displayed in this host application from an activex dll + VB.net Pin
Dave Kreskowiak12-Mar-09 3:27
mveDave Kreskowiak12-Mar-09 3:27 
QuestionTaking measurements of an autocad drawing in vb.net Pin
Ageesh11-Mar-09 0:44
Ageesh11-Mar-09 0:44 
AnswerRe: Taking measurements of an autocad drawing in vb.net Pin
dan!sh 11-Mar-09 2:41
professional dan!sh 11-Mar-09 2:41 
AnswerRe: Taking measurements of an autocad drawing in vb.net Pin
Dave Kreskowiak11-Mar-09 4:14
mveDave Kreskowiak11-Mar-09 4:14 
QuestionVScrollBar messes with MessageBox Pin
Bruno BERTRAND9-Mar-09 2:10
Bruno BERTRAND9-Mar-09 2:10 
AnswerRe: VScrollBar messes with MessageBox Pin
Richard Blythe10-Mar-09 20:21
Richard Blythe10-Mar-09 20:21 
GeneralRe: VScrollBar messes with MessageBox Pin
Bruno BERTRAND11-Mar-09 4:19
Bruno BERTRAND11-Mar-09 4:19 
QuestionHow to get Network Workgroup Name using IP with VB.NET 2003 Pin
faq0078-Mar-09 22:49
faq0078-Mar-09 22:49 
AnswerRe: How to get Network Workgroup Name using IP with VB.NET 2003 Pin
Reza Raad9-Mar-09 19:16
Reza Raad9-Mar-09 19:16 

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.