Skip to main content

Posts

Showing posts from May, 2016

Log4Net MVC.net and what web config to use

I'm new to using log4net ( remember using it a long time ago .net 2 area) so I did a rookie mistake. I trying to set it up using resources i found on the net (mainly http://www.codeproject.com/Articles/140911/log-net-Tutorial). But it did not log anything, and I did not get any errors in the Visual Studio  output. After some time and testing I found that because I had put the configuration part under the Views folder, I have to point to that config file. The reason was that I got an error stating that I can only have one configuration section in the web.config, if I added a configuration section in the root web.config. So then I tried to set the assembly section in the AsseblyInfo file to point to the web.config in the Views folder. Then it worked. [assembly: log4net.Config.XmlConfigurator(ConfigFile = "View\\Web.Config", Watch=true)]

You can't run SharePoint add-in as system account

After setting up a on prem developer environment, I was ready do start coding add-ins. But then i got access denied, What I'm running as administrator I'm king and can access everything. After after some searching on the net I found the answer (I do not remember the link). The fact that I was running as an System Account was the problem, it is not allowed. Guess I'm not king as administrator after-all. Created a other user and tried one more time, bang it worked.