Pages

Tuesday, April 30, 2013

Shibboleth Identity Provider FireWall Configuration

Firewall Configuration

The following ports needs to be opened for public and also for the Service Providers. They are

  • Iptable Inbound Configuration
 Go to the /etc/sysconfig/ directory and edit the iptables file and add the following content in the ip tables file.
  • Https 443 - Every One

-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

  • Https 8443 - Service Providers to Access the IDP Server in the Back Channel. 
-A INPUT -p tcp -s <Service Provider IP> --dport 8443 -j ACCEPT


>>Follow the Shibboleth SP Install and Configuration

Shibboleth Identity Provider Static IP Configuration

Static IP Configuration

  • Configuring the Static IP Address

The static IP is required to configure the Shibboleth IDP. The configuration details are shown below.

Click System --> Preferences --> Network Connections --> Edit --> IPv4 Settings. Click Add Button and Enter the Address, NetMask, and GateWay and also Enter the DNS Serevrs. the static IP Configuration screen Shot given below.



  • Add the IP Address and in the Hosts Entry File
       GO to the /etc/ directory and edit the hosts file. Add the following content to resolve the host name while accessing through host name.

     192.168.252.150 <IDP Host Name>.

      The Sample Configuration is
   
     192.168.252.150 idp.liyaqat.com

Shibboleth Identity Provider Configuration

 Idp Server Configuration

Go to the /opt/shibboleth-idp/conf directory and modify the following files to configure the IDP Server.
  • login.config
      It is a JAAS Ldap authentication config file. It is being used to search the user in LDAP and also authenticated the user in ldap. The configuration details is given below.

 ShibUserPassAuth {

      edu.vt.middleware.ldap.jaas.LdapLoginModule required
      ldapUrl="ldap://<Host Name>:<Port>"
      baseDn="<Ldap Base DN>"
      serviceUser="<Admin DN>"
      serviceCredential="<Admin Password>"
      ssl="false"
      tls="false"
      subtreeSearch="true"
      userFilter="uid={0}";
};

If Ldap accepting the SSL Connection, please modify the following parameters to compatible with ldap ssl protocol. They are

ssl="true"
tls="true"
ldapUrl="ldaps://<Host Name>:<Port>"

The Sample Configuration is given below.

ShibUserPassAuth {

      edu.vt.middleware.ldap.jaas.LdapLoginModule required
      ldapUrl="ldap://idp.liyaqat.com"
      baseDn="ou=people,dc=liyaqat,dc=com"
      serviceUser="CN=Manager,dc=liyaqat,dc=com"
      serviceCredential="password"
      ssl="false"
      tls="false"
      subtreeSearch="true"
      userFilter="uid={0}";
};
  • handler.xml
       It is being used configure the authentication scheme. By default shibboleth authentication scheme is RemoteUser. Please comment the RemoteUser Authentication Scheme and Un comment the UserNamePassword Authentication Scheme as follows.

Commented Authentication Scheme
  <!--
    <ph:LoginHandler xsi:type="ph:RemoteUser">
        <ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</ph:AuthenticationMethod>
    </ph:LoginHandler>
    -->

Un Commented Authentication Scheme
 
<ph:LoginHandler xsi:type="ph:UsernamePassword"
                  jaasConfigurationLocation="file:///opt/shibboleth-idp/conf/login.config">
        <ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</ph:AuthenticationMethod>
    </ph:LoginHandler>

  • relying-party.xml
      Edit the relying-party.xml file and Modify the following lines parameters.

     EntityID Configuration
     
  <rp:AnonymousRelyingParty provider="https://<IDP Host Name>/idp/shibboleth" defaultSigningCredentialRef="IdPCredential"/>

    <rp:DefaultRelyingParty provider="https://<IDP Host Name>/idp/shibboleth" defaultSigningCredentialRef="IdPCredential">

     IDP Metada Configuration

        <metadata:MetadataProvider id="IdPMD" xsi:type="metadata:FilesystemMetadataProvider"
                                   metadataFile="<IDP_HOME>/metadata/idp-metadata.xml"
                                   maxRefreshDelay="P1D" />


    IDP Certicate Configuration

    <security:Credential id="IdPCredential" xsi:type="security:X509Filesystem">
        <security:PrivateKey><IDP_HOME>/credentials/idp.key</security:PrivateKey>
        <security:Certificate><IDP_HOME>/credentials/idp.crt</security:Certificate>
    </security:Credential>

  • attribute-resolver.xml
       This configuration required while configuring the Service Provider Registering with IDP Server.
  • attribute-filter.xml
This configuration required while configuring the Service Provider Registering with IDP Server.

Follow the Static IP Configuration

Shibboleth Apache Web Server Configuration

Apache Server Configuration

  • Enable the Apache to Tomcat Data Transfer Protocol
     Login as a root or Sudo user and Go to the /etc/httpd/conf.d directory and create the proxy_ajp.conf file and Add the following content to enable the apache to tomcat data transfer.

 ProxyPass /idp/ ajp://<Tomcat Host Name or IP Address>:8009/idp/

 For Example, the configuration is

 ProxyPass /idp/ ajp://127.0.0.1:8009/idp/ 

  • Enable Apache SSL
      Go to the /etc/httpd/conf.d directory and edit the ssl.conf file. Please modify the following parameters to enable the SSL.
 
     ServerName <Host Name>
     SSLCertificateFile /opt/shibboleth-idp/credentials/idp.crt
     SSLCertificateKeyFile /opt/shibboleth-idp/credentials/idp.key.
 
     I am using the default idp provider certificate and key file to enable the SSL. It is not recommended in production. Please different certificates for the IDP , and Apache Web Server.

>>Follow the Identity Provider Configuration

 

Shibboleth Identity Provider Tomcat Configuration

Tomcat Configuration


The following Configuration needs to be done to deploy the IDP War File.
  • Enable The SSL
      Go to the /etc/tomcat6 directory and edit the server.xml file and add the following content after <Connector port="8443"/>

       <Connector port="8443"
           protocol="org.apache.coyote.http11.Http11Protocol"
SSLImplementation="edu.internet2.middleware.security.tomcat6.DelegateToApplicationJSSEImplementation"
           scheme="https"
           SSLEnabled="true"
           clientAuth="false"
           keystoreFile="/opt/shibboleth-idp/credentials/idp.jks"
           keystorePass="keystorepassword" />
 
  •  Deploy the IDP War File

    Go to the /etc/tomcat6/Catalina/localhost directory and create the idp.xml file and add the following content in the idp.xml file.

   <Context docBase="/opt/shibboleth-idp/war/idp.war"
    privileged="true"
    antiResourceLocking="false"
    antiJARLocking="false"
    unpackWAR="false"
    swallowOutput="true" />

  • Copy idp endorsed directory to tomcat6 directory
      Go to /var/lib/tomcat6/ directory create the common/endorsed directory as follows.

      mkdir common
      mkdir common/endorsed.
 copy the /opt/shibboleth-identityprovider-2.4.0/endorsed library files to /var/lib/tomcat6/common/endorsed
cp  /opt/shibboleth-identityprovider-2.4.0/endorsed/* /var/lib/tomcat6/common/endorsed
  • Change the OwnerShip to tomcat
     
      chown -R tomcat:tomcat /var/lib/tomcat6/common
  • Copy tomcat6-dta-ssl-1.0.0.jar to /usr/share/java/tomcat6 directory

    >>Follow the Apache Web Server Configuration

     

Shibboleth Identity Provider Integration with Service Provider

Service Provider Initiated Single Sign On Configuration

I have installed the shibboleth Identity and Service Provider in Cent OS 6.4 64 bit server in different virtual machines. I have allocated 4gb ram for each virtual machines. The installation and Configuration details as follows. 

Identity Provider Installation

  • Software Requirement
       Cent OS 6.4 64 Bit
       Tomcat6
       Apache 2.2 Web Server
       mod_ssl
       Identity Provider 2.4.0
       Java 1.6
       open ldap
       tomcat6-dta-ssl-1.0.0.jar

  • Install the Cent OS 6.4 64 Bit in Virtual Machines.
     Please follow the Cent OS Install Lync to install the centos.

  • Install Tomcat6, httpd, mod_ssl,  openldap, and open jdk from the centos default repositories.

    yum install tomcat6
    yum install httpd
    yum install mod_ssl
    yum install *openldap* -y
    yum install java-1.6.0-openjdk-devel.x86_64

  • Install Shibboleth Identity Provider
    
Copy the shibboleth-identityprovider-2.4.0-bin.zip to /opt directory and extract the zip file. The Identity Provider file structure as follows.

  /opt/shibboleth-identityprovider-2.4.0/doc
  /opt/shibboleth-identityprovider-2.4.0/LICENSE.txt 
  /opt/shibboleth-identityprovider-2.4.0/install.sh
  /opt/shibboleth-identityprovider-2.4.0/install.bat
  /opt/shibboleth-identityprovider-2.4.0/cpappend.bat
  /opt/shibboleth-identityprovider-2.4.0/lib
  /opt/shibboleth-identityprovider-2.4.0/src
  /opt/shibboleth-identityprovider-2.4.0/endorsed

Go to the /opt/shibboleth-identityprovider-2.4.0/ directory and run the install.sh file. After running the install.sh file and please provide the following details. They are
  1. Where should the Shibboleth Identity Provider software be installed?
  •     Provide the absolute path of the of IDP installation directory. Default Installation Directory is /opt/shibboleth-idp/. If you want to change the installation directory, please specify different path else accept the default one.
  1. What is the fully qualified hostname of the Shibboleth Identity Provider server?
  • Enter Host Name. I have used host name is idp.liyaqat.com
  1.  A keystore is about to be generated for you. Please enter a password that will be used to protect it.
  • Enter Keystore password.
The shibboleth IDP structure as follows.
/opt/shibboleth-idp/
-->bin/ . This directory contains the SAML executable files.  



--> conf/  This directory contains the IDP Configuration Files. The Configuration files info is  explained in IDP Configuration Section.


--> credentials/ . This Directory Contains the Install process generate the IDP Self Signed Certificate. For Production Environment Generate the Create the Certificate request and send to the Certificate authority for signing. Once the Certificate is signed, import the signed certificate into the key store.    




--> lib/  This Directory Contains the Shibboleth Library Files.

 -->lib/endorsed. This directory Contains the Endorsed libraries. These files needs to be copied into the tomcat endorsed directory.
    
--> metadata/ . This directory contains the idp metadata. All other metada files needs to be copied in this directory. 
--> war/ . This directory contains the war file. This war file needs to be deployed in the tomcat web apps directory.

--> log/ . This directory contains the idp server log files.


>>Follow the Tomcat Configuration

Monday, April 8, 2013

Spring FrameWork .Net Hello World Application

I am using the Spring Frame Work .net to integrate the c# Application as follows.

Setting The Development Environment

1.1 Installing the NuGet Extension

Please follow the NuGetInstall  link to install the nuget extension for visual studio 2010.
  

1.2  Downloading the Pr-Requisiste Software Using Nuget Package Manager Console.

 After Installing Nuget application, Create the HelloWorld console application in visual studio as follows.

 1.2.1 File --> Project --> ConsoleApplication --> Enter application name is HelloWorld.
 1.2.2 Open the Nuget Package Manager Console using Menu Tools --> Library Package Manager --> Package Manager Console and It will open the following screen.



  1.2.3 Download the Spring Core Application using NuGet Package Manager Console.

   Install-Package Spring.Core -Version 1.3.2

  After Running the above command, the Spring.Core dependencies are downloaded and as shown in the screen shot.



1.2.4 Download the Common.Logging.Log4Net using NuGet Package Manager Console.

Install-Package Common.Logging.Log4Net   -Version 1.2.0

  After Running the above command, the Common.Logging.Log4Net dependencies are downloaded and as shown in the screen shot.




 After running above commands, all dependencies are added to your HelloWorld Solution Folder --> Reference folder and it is shown below.


And also dll's are copied to your project solution folder --> Packages. The hierarchy as shown below.

 

Develop the Hello World Application

Create the Hello Package Folder

Create the Hello Folder in the HelloWorld Solution Explore.

Create the Hello World Class

Create the following Class in the Hello Folder

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelloWorld.Hello
{
    public class HelloWorld
    {
        public string GetMessage()
        {
            return "My First Spring Hello World Application";
        }
    }
}

Create the App.conf File

 Right Click HelloWorld Solution Folder --> Add --> New Item > Choose Application Configuration File --> Click Add  button and it will create the App.conf file.

Add the following Content to the App.conf file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <configSections>
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
    </sectionGroup>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
    </sectionGroup>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
  </configSections>

  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
        <!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
        <!-- otherwise BasicConfigurer.Configure is used   -->
        <!-- log4net configuration file is specified with key configFile-->
        <arg key="configType" value="INLINE" />
      </factoryAdapter>
    </logging>
  </common>

  <spring>

    <context>
      <!-- using embedded assembly configuration file
      <resource uri="assembly://Spring.IocQuickStart.MovieFinder/Spring.IocQuickStart.MovieFinder/AppContext.xml"/>
      -->

      <!-- using section in App.config -->
      <resource uri="config://spring/objects"/>

    </context>

    <objects xmlns="http://www.springframework.net" >
      <description>An example that demonstrates simple IoC features.</description>

      <object id="hello"
              type="HelloWorld.Hello.HelloWorld, HelloWorld">
      </object>
    
 
    </objects>
  </spring>
  <log4net>
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%-5level - %message%newline" />
      </layout>
    </appender>

    <!-- Set default logging level to DEBUG -->
    <root>
      <level value="DEBUG" />
      <appender-ref ref="ConsoleAppender" />
    </root>

    <!-- Set logging for MovieFinder to DEBUG -->
    <logger name="hello">
      <level value="DEBUG" />
    </logger>

    <!-- Set logging for Spring to INFO. 
         Logger names in Spring correspond to the namespace -->
    <logger name="Spring">
      <level value="INFO" />
    </logger>

  </log4net>
</configuration>

Registering the Bean

I have highlighted the bold and italic font to register the Spring Bean in the App.Conf file As follows.

      <object id="hello"
              type="HelloWorld.Hello.HelloWorld, HelloWorld">
      </object>


Id : Unique Id for your bean.
type: Hello World Class Name, and Assembly Name.
In our example Class Name is HelloWorld.Hello.HelloWorld and Assmbly Name is HelloWorld.


Running the Application


Getting the Spring Context


IApplicationContext context= ContextRegistry.GetContext();

Getting the registered bean


HelloWorld Hello = (HelloWorld)context.GetObject("hello");

Invoke the Hello WolrdBean GetMessage Method

Console.WriteLine (hello.GetMessage());

HelloWorld Client Class


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spring.Context;
using Spring.Context.Support;
using HelloWorld.Hello;

namespace HelloWorld
{
    public class Program
    {
        static void Main(string[] args)
        {
            IApplicationContext context = null;
            try
            {
                Console.WriteLine("Initializing the Context");
                context = ContextRegistry.GetContext();
                Console.WriteLine("Initializing the Context Successfully");
                Console.WriteLine("Getting the HelloWorld Handle");
                HelloWorld.Hello.HelloWorld hello = (HelloWorld.Hello.HelloWorld)context.GetObject("hello");
                Console.WriteLine("Data Out put from spring method {0}", hello.GetMessage());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
                if (context != null)
                {
                    context.Dispose();
                }
            }

        }
    }
}


Copy Dependencies DLL and XML Files to bin/debug folder

Visual studio 2010 shouldn't copy internal dependencies to bin/debug folder. Please go to the HelloWorld/Packages directory and copy the following dependency files to bin/debug folder.

copy Common.Logging.Log4Net.1.2.0\lib\2.0\Common.Logging.Log4Net.dll ..\HelloWorld\bin\Debug
copy log4net.1.2.10\lib\2.0\log4net* ..\HelloWorld\bin\Debug


Execute Application

Go to the HelloWorld Project Directory --> bin --> Debug Directory and run the HelloWorld.exe and it will display the following output

Initializing the Context
INFO  - ApplicationContext Refresh: Completed
Initializing the Context Successfully
Getting the HelloWorld Handle
Data Out put from spring method My First Spring Hello World Application


Common Errors:

Error 1:

Common.Logging.ConfigurationException: Could not configure Common.Logging from configuration section 'common/logg

C:\Users\nagore\Documents\Visual Studio 2010\Projects\HelloWorld\HelloWorld\bin\Debug>HelloWorld.exe
Initializing the Context
System.TypeInitializationException: The type initializer for 'Spring.Context.Support.ContextRegistry' threw an exception
. ---> Common.Logging.ConfigurationException: Could not configure Common.Logging from configuration section 'common/logg
ing'. ---> System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handl
er for common/logging: Unable to create type 'Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net
' (C:\Users\nagore\Documents\Visual Studio 2010\Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.exe.Config line 16)
---> Common.Logging.ConfigurationException: Unable to create type 'Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, C
ommon.Logging.Log4Net' ---> System.IO.FileNotFoundException: Could not load file or assembly 'Common.Logging.Log4Net' or
 one of its dependencies. The system cannot find the file specified.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOn
ly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOn
ly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, Stac
kCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at Common.Logging.ConfigurationSectionHandler.ReadConfiguration(XmlNode section)
   --- End of inner exception stack trace ---
   at Common.Logging.ConfigurationSectionHandler.ReadConfiguration(XmlNode section)
   at Common.Logging.ConfigurationSectionHandler.Create(Object parent, Object configContext, XmlNode section)
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfiguration
Record configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader read
er)
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionWithRestrictedPermissions
(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig,
 ConfigXmlReader reader)
   at System.Configuration.RuntimeConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord,
 SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
   at System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord
, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line)
   --- End of inner exception stack trace ---
   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, Fac
toryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Ob
ject parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPe
rmission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPe
rmission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPe
rmission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(Stri
ng sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at Common.Logging.ConfigurationReader.GetSection(String sectionName)
   at Common.Logging.LogManager.BuildLoggerFactoryAdapter()
   --- End of inner exception stack trace ---
   at Common.Logging.LogManager.BuildLoggerFactoryAdapter()
   at Common.Logging.LogManager.get_Adapter()
   at Common.Logging.LogManager.GetLogger(Type type)
   at Spring.Context.Support.ContextRegistry..cctor() in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support
\ContextRegistry.cs:line 60
   --- End of inner exception stack trace ---
   at Spring.Context.Support.ContextRegistry.GetContext()
   at HelloWorld.Program.Main(String[] args) in c:\users\nagore\documents\visual studio 2010\Projects\HelloWorld\HelloWo
rld\Program.cs:line 19


Solution:

The Common.Logging.Log4Net.dll missing in the debug folder. Please copy the Common.Logging.Log4Net.dll folder from the HelloWorld/Packages/Common.Logging.Log4Net.1.2.0/lib to HelloWorld/HelloWorld/bin/Debug.


Error2
Common.Logging.ConfigurationException: Unable to create instance of type Common.Logging.Log4Net.Log4NetLoggerFact

Initializing the Context
System.TypeInitializationException: The type initializer for 'Spring.Context.Support.ContextRegistry' threw an exception
. ---> Common.Logging.ConfigurationException: Unable to create instance of type Common.Logging.Log4Net.Log4NetLoggerFact
oryAdapter. Possible explanation is lack of zero arg and single arg NameValueCollection constructors ---> System.Reflect
ion.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundExce
ption: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or
one of its dependencies. The system cannot find the file specified.
   at Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter..ctor(NameValueCollection properties)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, Cultu
reInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture,
 Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo cul
ture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Common.Logging.LogManager.BuildLoggerFactoryAdapter()
   --- End of inner exception stack trace ---
   at Common.Logging.LogManager.BuildLoggerFactoryAdapter()
   at Common.Logging.LogManager.get_Adapter()
   at Common.Logging.LogManager.GetLogger(Type type)
   at Spring.Context.Support.ContextRegistry..cctor() in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support
\ContextRegistry.cs:line 60
   --- End of inner exception stack trace ---
   at Spring.Context.Support.ContextRegistry.GetContext()
   at HelloWorld.Program.Main(String[] args) in c:\users\nagore\documents\visual studio 2010\Projects\HelloWorld\HelloWo
rld\Program.cs:line 19

Solution:

The Log4Net.dll and Log4Net.xml files are missing in the HelloWorld/bin/Debug Folder. Copy from theHelloWorld\packages\log4net.1.2.10\lib\2.0 to HelloWorld/HelloWorld/bin/debug


References:

Spring Example Reference.

Spring FrameWork Sample Application

 Micro Soft Reference Dependencies dll's

Missing Dependencies DLL