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

  • SEARCH
  • Home
  • 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 914713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:45:48+00:00 2026-05-15T17:45:48+00:00

So i’ve been working on a MVC2 application just to learn the ropes really.

  • 0

So i’ve been working on a MVC2 application just to learn the ropes really. One thing i did not like about the default set-up is that the views, models and controllers were in a single assembly together. This was not hard to overcome, moved both to different projects and migrated each folders contents over.

However, now time has come to start fiddling with user roles. I decorate a controller action like so;

    [Authorize(Roles = "Admin"), AcceptVerbs(HttpVerbs.Post)]
    public ActionResult EditProject(Guid Id, FormCollection formValues){}

So here is how my solution is setup;

  • MySolution.Web.Views <– All aspx /
    ascx stuff
  • MySolution.Controllers
    <– All controllers, including the
    default AccountController that comes
    with the MVC2 application

I also have the default ‘AccountModel’ within the MySolution.Controllers.AccountModels namespace which is where the LogOnModel class is located. Now when i run the program and ask the controller to execute an action which requires a certain role (which i am not) I get the following error;

“Compiler Error Message: CS0234: The type or namespace name ‘Models’ does not exist in the namespace ‘MySolution.Web’ (are you missing an assembly reference?)”

It also highlights the following line as the source error;

“public class views_account_logon_aspx : System.Web.Mvc.ViewPage, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler”

and comments the line and file of the error as;

“Source File: c:\Users\\AppData\Local\Temp\Temporary ASP.NET Files\root\d1b48054\1ce7c091\App_Web_logon.aspx.5f83eb8c.mdfplvvy.0.cs”

So I have tried navigating to that file and manually typing in the correct namespace of the LogOnModel but each time i run the project, a new version of this file is created with the incorrect location of LogOnModel reproduced. So clearly there is something within the application that is still looking in the original location for the AccountModel which no longer exists.

I have looked in my web.config file and cannot find anywhere which appears to reference the LogOnModel in the MySolution.Web namespace.

Does anyone know how I might inform the application where the LogOnModel now resides ?

The actual application is failing within the AccountController’s LogOn action:

public ActionResult LogOn()
{
   return View(); // Failing here
}

So maybe it’s something to do with routing ? I have not touched the default setup of the Global.asax file.

  • 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-15T17:45:49+00:00Added an answer on May 15, 2026 at 5:45 pm

    Have you referenced MySolution.Controllers.AccountModels in your web.config namespace section? Or use the Import directive in your aspx, or give the full name in the page directive ViewPage<MySolution.Controllers.AccountModels.LogOnModel>

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:

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.