Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:46:35+00:00 2026-05-29T19:46:35+00:00

I have a website made in Asp.net MVC which is installed in the root

  • 0

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.

enter image description here

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) +118
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action
1 action) +190
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +27
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +62
System.Data.Entity.Internal.Linq.InternalSet
1.get_InternalContext() +15
System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() +37
System.Linq.Queryable.OrderByDescending(IQueryable
1 source, Expression1 keySelector) +66
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
2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +56
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
1 continuation) +267
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 _) +12
System.Web.Mvc.Async.WrappedAsyncResult
1.End() +55
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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:46:37+00:00Added an answer on May 29, 2026 at 7:46 pm

    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 clear tag in child directories web.config

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a ASP.net MVC 3 website.We had to store many values in hidden
Hi, I have built a ASP.NET MVC website that uses Membership, this works fine.
I have started converting my simple website to ASP.NET MVC, just to mess around
I have a single-page JavaScript application, held within an ASP.NET MVC 3 website. In
I have made a MVC application that uses the built-in ASP.NET login functions. It
I have an asp.net mvc app running on a local iis website that is
I have an ASP.NET hosting plan with a hosting company. I've made many websites
I have made a website in ASP.NET 3.5 With C#.In the default page we
I have made website deployment project for ASP.NET 3.5 website. After build i have
I was asked to run a website which was made by Asp.Net and Sql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.