Can anyone help me understand this error report:
Error: Object reference not set to an instance of an object.
at Project.Web.Config.Data.DataProvider.get_ConfigSettingsConnectionString()
at Project.Web.Config.Data.DataProvider.GetConfigSettings()
at Project.Web.Config.ConfigBase.GetConfigSettings()
at Project.Web.Config.ConfigBase.GetConfigSettingValue(String configName)
at Project.Web.Config.ConfigBase.StringConfigSetting(String configName, String defaultValue)
at Project.Web.Config.Brands.get_BrandsConnectionString()
at Project.Web.Engine.Brands.Data.BrandsDataProvider.GetBrandByHostname(String hostname)
at Project.Web.Engine.Brands.Brands.CurrentBrand()
at Project.Web.Engine.Placeholders.BrandedResource.GetHtmlContent(String resourcePostingName, String resourceName, String cultureCode)
at Project.BWMembership.TranslationHelper.GetTranslation(String sResourcePostingName, String sResourceName, String sCultureCode)
at Project.BWMembership.TranslationHelper.TranslateCountries(ListResponse[] arrCountries, String sCultureCodes)
at ASP.update_aspx.Bind(Member oMembership, Order oOrder) in c:\Projects\Project\zsys_admin\update.aspx:line 82
at ASP.update_aspx.Page_Load(Object sender, EventArgs e) in c:\Projects\Project\zsys_admin\update.aspx:line 58
I know it is telling me there is a null object, and it is coming from:
at Project.Web.Config.Data.DataProvider.get_ConfigSettingsConnectionString()
And I know the rest of the data is a list of methods leading to the error
I am trying to identify what the null object is and how to resolve it.
I know each line corresponds to calling a method, for example, I can call the method:
Project.BWMembership.TranslationHelper.TranslateCountries(ListResponse[] arrCountries, String sCultureCodes)
By typing that in my code. I know this method is in the DLL:
Project.BWMembership
and in the class:
TranslationHelper
and the method is called:
TranslateCountries(ListResponse[] arrCountries, String sCultureCodes)
But when I type:
Project.Web.Config.Data.DataProvider.get_ConfigSettingsConnectionString()
It does not recognize this.
Visual studio will offer me the code up to:
Project.Web.Config
But from there will stop.
Is it the case that Config
is a class name, and Data
is an instance of a different DLL included in Project.Web and being instantiated in this method?
If so, can I assume there is a class called DataProvider
in this DLL that has a method called Get_ConfigSettingsConnectionString()
?
and if this is the case, does this mean essentially this is trying to find some data that does not exist? For example it is looking for a connection string that either does not exist in the existing web config, or is looking for a web config that does not exist?
Or is it that Project.Web.Config refers to the config file of the DLL?
Which opens up a whole new set of questions!