Click here to Skip to main content
16,004,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone,
I am receving an error while injecting the dependencies in my web application.

Server Error in '/WebSite1' Application.

Value cannot be null.
Parameter name: existing

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: existing

Source Error: 


Line 33:                 throw new InvalidOperationException("No Unity container found");
Line 34:             }
Line 35:             container.BuildUp(this as T);
Line 36:         }
Line 37:     }

Source File: C:\Users\Admin\Documents\Visual Studio 2010\Projects\Website1.sln (2)\CRMLibrary\BasePage.cs    Line: 35 

Stack Trace: 


[ArgumentNullException: Value cannot be null.
Parameter name: existing]
   Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(Object argumentValue, String argumentName) +63
   Microsoft.Practices.Unity.UnityContainer.BuildUp(Type t, Object existing, String name) +40
   Microsoft.Practices.Unity.UnityContainerBase.BuildUp(T existing) +113
   CRMLibrary.BasePage`1.InjectDependencies() in C:\Users\Admin\Documents\Visual Studio 2010\Projects\Website1.sln (2)\CRMLibrary\BasePage.cs:35
   CRMLibrary.BasePage`1.OnPreInit(EventArgs e) in C:\Users\Admin\Documents\Visual Studio 2010\Projects\Website1.sln (2)\CRMLibrary\BasePage.cs:14
   System.Web.UI.Page.PerformPreInit() +31
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225


I don't understand what's the error in it.Please help me.
Posted
Comments
dan!sh 3-Jan-14 3:11am    
Try debugging your application to identify which object is null.
Sumit Bhargav 3-Jan-14 5:20am    
hi danish,
I tried a lot but couldn't found what is being null
ZurdoDev 3-Jan-14 7:29am    
C:\Users\Admin\Documents\Visual Studio 2010\Projects\Website1.sln (2)\CRMLibrary\BasePage.cs:35
Sumit Bhargav 3-Jan-14 7:42am    
hi ryan,
I know the line of error but i dont know the reason of error.
ZurdoDev 3-Jan-14 7:55am    
If you put a breakpoint there you should be able to figure it out.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900