Log4Net and Windows Server 2012

Hi,

This is a little interesting and I was wondering if anybody could shed some light here.

I am using a windows app in C# and I have it using Log4Net and VS 2013.

In the code if I have like:

TestLogger.Debug("This is a test start");

It works fine and creates the .txt file that I specified in the location I specific in the logger.config file.

My machine is a Windows 7 Enterprise.

However, when I take the exact same code and deploy it to a Windows Server 2012 location and change the logger.config file to a location that I can access (confirmed in a cmd window). It then does not go anything nor report anything nor is the file created. It's as if Log4Net never existed. There is no information in the EventLogs either.

Does anybody have any quality information that help allow this to be done?

Thanks!
LVL 1
davismAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it_saigeDeveloperCommented:
What happens if you run your application as Administrator (by right-clicking and choosing Run As Administrator)?

-saige-
0
davismAuthor Commented:
That is so weird. I am a member of the administrators group BUT I had to run as Administrator. Any idea why that might be?
0
it_saigeDeveloperCommented:
Since Windows Vista, Microsoft has made drastic changes to the Service and Security model of their operating systems.  Part of these changes dealt with a separation of concerns with regards to Administrative rights and differentiating between operational Administrative rights (rights that affect the user experience) and functional Administrative rights (rights that affect the Operating Systems functionality).

As such, Microsoft introduced the UAC (User Account Control) as a means of adjusting how much control the user had over the functionality portion of the Administrative rights.  With each release since Vista, the UAC (and the amount of control it has over the OS functionality) has changed.

What location are you attempting to write to?  Also which event log's are you attempting to write to?

-saige-
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

davismAuthor Commented:
UAC is turned off. This is running from a Win 2012 server. In a WIN 7 client (where it was developed) this issue did not exist.

What is was going was creating a new source on the Application log.
0
it_saigeDeveloperCommented:
Even with UAC turned off, you do not completely control the functionality of the operating system in Windows 8/Windows Server 2012 (this is one of the changes Microsoft made since Windows 7).

Do you know find that you can run the application normally?

-saige-
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
davismAuthor Commented:
I will not work unless I run the application as an administrator. If I do a RunAs Administrator then it works otherwise I get a failure.
0
davismAuthor Commented:
But I thought you said since Vista. I seemingly works fine until Win 2012. Unless there is something else going on that needs adjusting.
0
it_saigeDeveloperCommented:
0
it_saigeDeveloperCommented:
Yes, since Vista, but with each new version since Vista's inception, Microsoft has changed UAC and how it interacts with not only the user but the operating system as well.

-saige-
0
davismAuthor Commented:
Thank you for the response and information. It has provided a value-add input!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.