FIXED IT! Type 'ASP._Page__ViewStart_cshtml' does not inherit from 'System.Web.WebPages.StartPage' - asp.net-mvc-4

Moving and copying some files, now I have this exception on my project, used to work fine.
The thing is that this failing project is a copy of another one, that is working fine, so every critical file inside i´m sure it´s ok.
web.config --> from solution is ok.
web.config --> from views is ok.
viewStart --> ok.
I found out the fix for this, so if you have the same problem than me even if you did what other posts said about adding razor sections to the config, check this solution.
Regards!.

Ok. So I´m assuming that you have all your configs ok, and all of the DLLs ok and updated.
If you did all of that and still having the exception, try to check and DOUBLE check if you don´t have any undesired "_viewStart" files placed somewhere wrong, and also check if is not excluded from solution.
In my case, this was the problem: I removed wrong "_viewStart" that I copied by mistake and the web start working again.
I´m sure that most of scenarios that everybody has this exception is caused by moving this file to another folder or creating a new one.
try it!
hope it helps.
Regards.

Related

Blocklayered module not working prestashop 1.6

I have a bug on my prestashop website that i don't know how to fix.
My blocklayered module is not working... I've tried refreshing cache and indexes and also restored the module with original one but it's not working... I've also setted permissions to 777 for all the folders and files of the module...
Here is the error line:
v_24_2e5bc2f239b0cac64f2bff372a426d98.js:4 GET https://www.bobo-sport.fr/modules/blocklayered/blocklayered-ajax.php?layered_category_12=12&id_category_layered=13&_=1532013197475 500 ()
You can see the problem on this page for exemple: https://www.bobo-sport.fr/13-soins
Could you please have a look to my problem?
Thanks a lot for your help! :)
Seems like a silly resolution but we had the same issue.
screenshot of blank line
Found the fix by total fluke.
In blocklayered.php remove the blank line on the top of the file.
Some apache configs manage this others not. Sometimes there is a hidden ascii value in there that throws an error of headers already sent.
One of our clever engineers spotted this after hours of searching.
Nearly killed us.
Hope this helps.

Error report on FBSDKLoginButton

I have the following error and I have no idea where it's coming from.
I really need help.
Thank you.Click here to see
Problem solved.
If like me you encounter this type of problem it could be due to a language change in your settings (localization) or your main storyboard.
What I did is I put back everything to default, did a Product > Clean, and deleted the app and reinstalled it.

Partial view never affects site after upload and IIS reset

I'm including a partial view in one of the pages of my MVC4 site which when deployed, even after a restart of the web site and recycling of the app pool, never seems to affect the site
I'm wondering if this is caching coming into play
I ended up including the content of the partial view in the page iteself and that seems to have worked but I'd rather have the partial view as I'd like to use the view in other parts of the site
The question is, does anyone have any suggestions as to why this might be happening? I've been pulling my hair out trying to get a view to post the correct data, only to realise that some of the hidden inputs are just missing because the partial view has not been refreshed
EDIT:
Ok now I have a need to use this partial view in more than once place. On my dev environment the partial is rendering correctly. Uploading to the server doesn't seem to have any effect, but what's worse, deleting the partial view from the server also has the same issue.
My site still thinks the file is there and complains about the model type passed to the view now (I changed the model type in the view - all working fine on my local dev) - why does it still think the file is there?
I deleted one of the parent views to see if the site carried on working, but as soon as I delete any other file, the site is affected. Why is this particular file giving me trouble? It's as if the server has cached it at the file system level and is supplying the wrong file content to ASP.NET
I'm going to try renaming the file next
Ok so renaming the file appears to have worked.
I didn't try Fals suggestion but I might try that next time, strange behaviour I'm not going to try and understand why at this point!

Resharper cannot resolve partial view inside master page

I've upgraded from ReSharper 7 on vs2012 pro to ReSharper 8.1 on vs2013 pro, and ReSharper is now warning me a lot of my partial views cannot be resolved.
It seems to be only happening:
In ASP master pages (i.e. not razor)
When the .ascx partial is in the same controller folder as the partial
E.g. Home.Master, located in ~/Views/Home/Home.Master renders UserProfile.ascx, located in ~/Views/Home/UserProfile.ascx.
Both <%: Html.RenderPartial("UserProfile") %> and <%: Html.RenderPartial("~/Views/Home/UserProfile.ascx"%> are flagged by ReSharper as invalid.
Additionally, shared partials in the ~/views/shared folder seem to be picked up fine when I reference just by name:
However, referencing the view by path doesn't seem to work:
(NB. Both images are taken inside Home.Master, in ~/Views/Home)
When I run the application, the partials work correctly, so it seems to be a change in ReSharper 8.1. Is there anything I can do to fix this?
It's a bug in ReSharper.
The best thing for now is to set it to ignore this type of error.
You can do this by selecting 'inspection options' from the 'red light bulb' on the left hand side and setting it to another option. Hopefully it will be fixed soon!
Edit: See this ticket for the problem. http://youtrack.jetbrains.com/issue/RSRP-395642
There's a simpler fix I've got around it by using relative references. So in my case I had a view in another project (and if you try to go outside of the current project without starting with a forward slash "/" you'll get a warning like this. For your problem change the line that reads
<%Html.RenderPartial("UserProfile")%>
to
<%Html.RenderPartial("../../Views/Home/UserProfile")%>
or
<%Html.Partial("../../Views/Home/UserProfile.cshtml")%>
Not sure if this is the exact path in your solution but hopefully you understand what I am saying - you cannot use the tilde (~) symbol. You have to use HTML's navigation symbol. Not ideal obviously but I dare say it is better than changing inspection rules.
Also - if you do need to remove an inspection, just comment it out by adding the line
// ReSharper disable once Mvc.PartialViewNotResolved
... // code goes here
or
// ReSharper disable Mvc.PartialViewNotResolved
... // code goes here
// ReSharper restore once Mvc.PartialViewNotResolved
You can use T4 templates POCO string properties to generate the paths. It's a good idea to update these T4 generated classes regularly and use them inside your code.
I was getting this error today from ReSharper 2018.2.3 when did this:
#Html.Partial("_StatusMessage", Model.StatusMessage)
I also noticed a warning from the IHtmlHelper.Partial method itself:
Use of IHtmlHelper.Partial may result in application deadlocks. Consider using <partial> Tag Helper or IHtmlHelper.PartialAsync.
So I changed the code to:
<partial name="_StatusMessage" model="Model.StatusMessage" />
That fixed it for me.

get rid of “cannot find Symbol” error in intelliJ

Before everything was fine but since some time i get "cannot find Symbol” when i try to compile.
The errors are on my own classes.
If i jump to source and then click the error icon i get this:
But the constructor already exists.
I have no idea of how to get rid of it. I did a lot of searching but none of the solutions like clean worked.
My project is under VCS which i don't really understand (how to set up etc). So maybe it has to do something with that. I only don't know how to get rid of it. Can someone help?
edit:
Here is the zip of the project folder and one folder that includes a library that is used.
I try to compile with build artifacts.
https://dl.dropboxusercontent.com/u/17630770/temp/doekeLibsArchive.zip
I hope someone can give it a try. I would love to continue on this project.
The problem is coming from the fact you have two BezierVertex classes,
a public one nl.doekewartena.path.BezierVertex
and a nested one nl.doekewartena.path.BezierVertexPath.BezierVertex
when you are inside BezierVertexPath, intellij is right nl.doekewartena.path.BezierVertexPath.BezierVertex does not have the constructor shown on your screenshot, it is nl.doekewartena.path.BezierVertex which has it, so you should use the fully qualified name of that class.
Am I missing something ?