MVC3 not finding a View in an Area - asp.net-mvc-3

I have one area in my project (for admin).
I want to be able to use a view called Index.cshtml in the Admin area but my app always displays the Index.cshtml view for the main project (which isn't in a seperate area).
If I change the name of the view in the admin area to a name that doesn't exist anywhere else it works fine.
What am I missing? It must be something simple !
Answer (probably)
Bit of a mystery but it seems that maybe there was some sort of weird caching problem. I restarted the web server and now it works fine.
thanks to all who responded

Answered my own question to remove it from the unanswered list.
Bit of a mystery but it seems that maybe there was some sort of weird caching problem. I restarted the web server and now it works fine.
thanks to all who responded

Related

Joomla error "MODULO BY ZERO"

This error showed up as plain text on white background after logging in to the Maintenance Login window on the public front end of our Joomla 3.5.1 site. We are using a template from TemplateMonster called "theme3289" (default version), aka "Truckie".
For no apparent reason, we found we could not log in to the Maintenance Login window on the public front end. We got the error:
"Modulo by zero" on a plain white background.
No part of the front public end of the site could be navigated to, even by pasting in a link. However, we could navigate fine to the backend ([site_domain_name.com]/administrator)
Not sure exactly what caused this, but we did have the internet connection go down in the middle of saving an article. After re-gaining connection, the new article was missing. We had also made some simple content changes (not configuration or settings changes) in the articles inside the TM Parallax module.
Looking for help on this "Modulo by zero" error.
RESTORED DATABASE BACKUP = Solved the problem. I am pretty sure it was some kind of database error or corruption. We tried clearing the cache (Joomla System Menu) and a number of other things. Nothing worked.
We had two staff working on the site at the time of the error, one a newbie, one an advanced beginner. Interviewing them with "what were you doing at the time" didn't seem to lend any clues. Unless perhaps the TM Parallax module may have a bug (???) - or a corruption somehow when internet went down while saving an article.
SOLUTION: We restored a recent backup copy of the database made only 2 hours prior to the ERROR. This solved our problem.
This worked for us.
I faced this issue today, and I found out the cause. Its simple actually,as the issue says your code somewhere is attempting to do division or modulo by 0. Maybe you had added a new field with value 0 in your db after taking backup and the data there was causing it. This may not be helpful for you now but I'm leaving this here to make it easy if someone has a similar issue and ends up here.
I think the problem was caused by a change in the template. For example, some templates do not allow specific values to be zero, and will crash when this happens.
A good idea to discover the root cause of the problem is to compare the templates settings of the backup to the template settings of the problematic site. If everything is exactly the same, then you should compare the modules, and finally the menu items. It is not a fun job to do, but will help you isolate the problem in case it happens again.
For your reference. Just had this issue and the above information did not help. Finally found the solution:
In Article > global Options > Blog/Featured layout I had the columns set to 0

Cloud 9 ide problems

I'm currently using c9.io as a IDE to work with a friend on a project.
My problem is that when i attempt to view the project i get an infinite loading loop followed by this.
Cloud nine error
So yeah. Development cannot really continue until this can get fixed or whatever. Its a huge spanner in the works for me.
What can i do? Is there any other alternatives to working real time with a buddy?
Thanks,
Taylor.
I know this question is old but this solution worked for me:
https://docs.c9.io/v1.0/docs/restarting-your-workspace
You can also do this by appending ?reset=1 to your workspace URL. For
example, if my workspace URL is
https://ide.c9.io/username/workspace_name then I'd want to change it
to https://ide.c9.io/username/workspace_name?reset=1.
Here is the situation I've experienced which sounds like the issue you noticed and a solution that has worked for me:
Issue:
You clicked to open a workspace and get the usual loading screen with the c9 logo and ajax loader in the center. This is normal until you realize the page never loads.
Solution:
At this point, go ahead and clear your cookies. Then login to c9.io and access your workspace.
Alternate solution:
Logout of c9 on your current browser. Open a different browser than the one currently running the infinite loading workspace. Login to your account and open the workspace.

How to go about debugging Durandal

I had a trivial Durandal app working, paused to prototype a capability in an html page related only by the fact that it resides in the same folder, and then returned to the Durandal app only to find that while the shell is constructing the menu, views don't seem to load or at least render. The # url changes but that's it.
I've previously seen this when I had broken JS in a view or in shell.js, but I've tried stripping the routing table down to the home view which is basically static html with an empty view, and it's still happening.
The question is not so much "why are my app views showing blank" as "how does one go about troubleshooting this". There's no barfing, just a white silence. I'm not fond of guessing games and I can't believe a framework so well thought out lacks a strategy for troubleshooting.
Yes, I've seen the http://durandaljs.com/documentation/Debugging.html page. Debugging is switched on in my main.js but I don't know how to proceed from here.
So, where does one normally start when this happens? Some logging seems in order but I have no idea where to put it.
I marked the applicationHost div like so
<div id="applicationHost">
<div style="margin: 100px;">Hello, I haven't been replaced yet.</div>
</div>
and it vanishes right after shell calls router.activate()
OK, I found the specific problem, it was a bad binding in shell.html - the name of a binding target changed and the binding needs to be updated.
But the question of how to find this stuff remains. My app is trivially simple. "Inspect everything and hope you notice any problems" is not going to work on a complex app.
In the absence of any advice I'm starting to think that the only available strategy is to make only incremental changes with constant regression testing.

Template issue - Halogy

I have just installed Halogy on my MAMP localhost. I've followed the instructions here to set up all my folders and this is working fine. Dashboard looks good. However, my default template is empty. And, no matter what I put in it, after editing and saving - the markup is still empty. So I cannot get any editable fields in my pages whatsoever. When I edit my page content its just empty. I have also tried creating a new template and applying that to a new page. Same results. I am scratching my head here. Does anyone have any ideas as to what's gone wrong?
I could help you, since I've been working exclusively with and extending Halogy for about 8 months now. But, I need more details, since this behavior could be attributable to any number of issues. For example, what does the page source look like? Also, please note that, if you're not logged into Halogy, unpublished pages will not appear. However, your default home page should be visible. Have you searched the Halogy forum and/or posted your question there?

ASP.NET MVC 3: External component has thrown an exception

Set up:
New MVC 3 project, using existing database. Created an EF file (edmx), used the automatic generator to create the POCO classes and DbContext, then deleted the edmx.
Scaffolded a number of controllers and views, using -Repository -Force -Area -ModelType flags from the Package Manager Console command line.
Problem:
When running the app I get the following error:
External Component has thrown an exception.
Right. Fat lot of use. Stopped and started Cassini. No joy. Closed and opened VS2010. No joy.
Can't think what else can be wrong. No one else seems to have the problem (according to Google).
Question:
What the heck is wrong?! Any suggestions?
OK, I restarted the computah and the problem went away.
Just like that.
As if by magic.
First thing I should've tried, isn't it?
|||||||||||
0 0
|
vvvvvvvvvvv
___________
^^^^^^^^U^^
(Self portrait of the Web Developer as an aging man)
Three hours of my life. Vaporised. No page, no pay. No pay, no dinner. No dinner, no web developer. No web developer, no page. The circle of life and death. Ying and Yang. The Tao.
Should've carried on doing Mathematical Physics. At least no one is to blame when the Universe doesn't do what the client expects.
In case it helps anyone: I had this problem and found an error in a bug partial view. After fixing the bug in the partial, the error went away.
It happens when inside View1 you render #Html.Partial(View2, model) and pass a viewmodel that the View2 does not acccept (at least when the viewmodel is templated).

Resources