Constant Build issues with IIS not being able to find WebViewPage in System.Web.Mvc - asp.net-mvc-4

I keep running into the following exception
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name
'WebViewPage' does not exist in the namespace 'System.Web.Mvc' (are
you missing an assembly reference?)
Source Error:
Line 27: Line 28: Line 29: public class
_Page_Views_Content_Index_cshtml : System.Web.Mvc.WebViewPage { Line 30: Line 31: #line hidden
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET
Files\root\8df93262\ed60a52a\App_Web_index.cshtml.eba9863.jffbohqj.0.cs
Line: 29
So far doing a clean and a rebuild normally fixes the problem. The Dev Environment is using IIS, it seems like something is going wrong when IIS caches the binaries. From some trial and error it seems like the issue happens if a request is made to the site at the same time as the site is being built.
Does anyone have any idea what might be causing the problem? It seems to be a configuration issue as other developers with the same setup do not have the issue.

It turned out to be the references in the project were falling back to a different version of MVC.

Related

Unity Di container not working with 64 bit build

I am using Unity for in WCF service to load component.
I am referring below mention article.
https://msdn.microsoft.com/en-us/library/vstudio/hh323725(v=vs.100).aspx
Service is working fine when i build service in visual studio with build option option any CPU.
As one third party component required 64 bit specific build. So i selected 64 bit build option.
I have downloaded Unity code and build for 64 bit but it is also not working.
I am getting below mention exception.
Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'Common.Unity' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Common.Unity' could not be loaded.
As this is not issue of Unity.
It is issue of IISExprees of VS2012 which is support on 32 bit.
Can't get IIS Express 8 beta to run website as 64-bit process
https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3254745-allow-for-iis-express-64-bit-to-run-from-visual-st

Error: Could not find or load main class org.apache.hadoop.util.PlatformName

I have configured a single node cluster and its is running fine unexpectedly I got the below error and it stopped working. All the hadoop paths are configured in their paths but still I'm getting this error how to come out of this.
/opt/hadoop/hadoop/bin/../libexec/hadoop-config.sh: line 24: /bin/basename: cannot execute binary file
/opt/hadoop/hadoop/bin/../libexec/hadoop-config.sh: line 29: /bin/basename: cannot execute binary file
Warning: $HADOOP_HOME is deprecated.
Error: Could not find or load main class org.apache.hadoop.util.PlatformName
Error: Could not find or load main class org.apache.hadoop.fs.FsShell

Retrieving COM class factory ... failed error 80040154

I have an old VB.Net application using Interop.ebCryptLib.dll that I couldn't get to work. I get the following error:
Retrieving COM class factory for component with CLSID {...} failed due to the following error: 80040154
I've searched for the error online and tried the following:
Register the dll using regsvr32 but I get the error "entry point was not found"
I tried recompiling the project and set the platform to x86 but still get the same error.
Is there any other suggestion I can try? This is an old application developed by another person. I do have access to the code and am unable to get it to work properly.
Was able to resolve this by finding the original ebCrypt.dll online. Thanks for the help #HansPassant

Compilation error in ASP.NET MVC4 BigShelf sample SPA solution

Just trying out the sample for the MVC4 Single Page Application. The BigShelf project is here
But when I try to run this, I get the following error after logging in. I'm not sure what is wrong.
Compilation Error Description: An error occurred during the
compilation of a resource required to service this request. Please
review the following specific error details and modify your source
code appropriately.
Compiler Error Message: CS0012: The type
'System.Data.Entity.DbContext' is defined in an assembly that is not
referenced. You must add a reference to assembly 'EntityFramework,
Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 22: Line 23: $(function () { Line 24:
upshot.metadata(#(Html.Metadata()));
Line 25: Line 26: ko.applyBindings(new
BigShelf.CatalogViewModel({
Source File: d:\Visual Studio Projects\ASP.NET Single Page Application
(SPA) BigShelf\C#\BigShelf\Views\Home\Index.cshtml Line: 24
Removing the EntityFramework reference and referencing the latest (4.3.1) solved the problem for me.

Error adding sharepoint web service as web reference in a project

I'm trying to add web reference to my project using the link:- http://localhost/_vti_bin/Lists.asmx
Getting the following error:-
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'Microsoft.SharePoint' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 1: <%# Assembly Name="Microsoft.SharePoint"%><%# Application Language="C#" Inherits="Microsoft.SharePoint.ApplicationRuntime.SPHttpApplication" %>
Source File: /global.asax Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.SharePoint' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].