I have a website made in Asp.net MVC which is installed in the root directory of shared hosting enviroment.
Now, I have made a mobile version for this site in Asp.net MVC and installed it as a sub-domain http://m.price-tag.org which points to a folder m(set as virtual directory) in root directory.
When someone visits the site from mobile, an assembly qualified name error is shown which goes off when the page is refreshed. Following is the screen-shot for iPhone emulator which displays the same error. Even in emulator, the error goes when the page is refreshed.

The strange part is that the type mentioned in error is used in my main website and not the mobile website. Why is this happening when my mobile project is completely different and has its own web.config but somehow, it seems that the root’s web.config is used ? Can this be a web.config issue
NOTE:- Both projects have their own EntityObject, Models and Web.config files and nothing is shared between them.
EDIT:- This error shows in mobile only…..And that too first time, if one refreshes the page, it goes away.
EDIT with Stack Trace
[InvalidOperationException: The type 'PriceCompare.Models.PriceCompareEntity,
PriceCompare' could not be found. The type name must be an assembly-qualified name.]
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializer() +315
[InvalidOperationException: Failed to set database initializer of type ‘Disabled’ for DbContext type ‘PriceCompare.Models.PriceCompareEntity, PriceCompare’ specified in the application configuration. Entries should be of the form ‘key=”DatabaseInitializerForType MyNamespace.MyDbContextClass, MyAssembly” value=”MyNamespace.MyInitializerClass, MyAssembly”‘ or ‘key=”DatabaseInitializerForType MyNamespace.MyDbContextClass, MyAssembly” value=”Disabled”‘. The initializer class must have a parameterless constructor. See inner exception for details.]
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializer() +383
System.Data.Entity.Internal.DatabaseInitializerConfig.ApplyInitializersFromConfig() +288
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +59
System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) +7
System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input) +1181 action) +190
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +27
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +621.get_InternalContext() +15
System.Data.Entity.Internal.Linq.InternalSet
System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() +371 source, Expression
System.Linq.Queryable.OrderByDescending(IQueryable1 keySelector) +662 parameters) +188
PriceMobile.Controllers.HomeController.Index() in HomeController.cs:19
lambda_method(Closure , ControllerBase , Object[] ) +40
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +271 continuation) +267
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
System.Web.Mvc.<>c__DisplayClass17.b__14() +20
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters) +190
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +329
System.Web.Mvc.Controller.ExecuteCore() +115
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +93
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +121.End() +55
System.Web.Mvc.Async.WrappedAsyncResult
System.Web.Mvc.<>c__DisplayClasse.b__d() +31
System.Web.Mvc.SecurityUtil.b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969117
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
You need to use inheritInChildApplications, so that application inside sub directory will not use the root application configuration. See this for detail.
For appSettings section, one can’t use location tag. Therefore configurations which uses key/value pair, one needs to use the
cleartag in child directories web.config