asp.net (Visual studio 2013) - asp.net

I am writing a Web API on Visual Studio 2013(in C#). While building the code Visual Studio shows no error and build succeeds. But when i try to hit a controller using my browser keeping visual studio in debug mode.The control does not goes to the debug point at controller instead it throws an exception a point which is unrelated to the flow.Saying:
Could not load file or assembly 'MySql.Data, Version=6.4.4.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its
dependencies. The system cannot find the file specified.
even though this assembly is there in reference of this project.

Related

Warning ASP.NET runtime error: Could not load file or assembly 'EntityFramework, Version=6.0.0.0

I'm developing using ASP.NET in Microsoft Visual Studio Express 2012 for Web. Everything works great but suddenly when changing some code in one of my controllers Visual Studio crashed and now I got this weird runtime error:
Warning 1 \Views_Create.cshtml: ASP.NET runtime error: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
My project still works fine though only a bit slower than before but every aspect of code, views, models, controller works just fine. Only in my studio the lines using EF are being underlined and marked as warning which is kinda annoying!
I already tried to uninstall and install EF or upgrade to EF 6.1 but no results...
Anybody an idea how to resolve this problem?
The answer posted in a similar question solved the problem for me:
Delete all files from the following folders and try again:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
%SystemRoot%\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

Cannot run Webmatrix? I get a Web PageInspector error

Previously I had Webmatrix, Visual C# Express and Visual Web Developer Express on my machine. I updated Microsoft Visual Studio Express and now I get ASP.NET failed starting up when trying to load Webmatrix:
This is the error message:
Could not load file or assembly 'Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I have uninstalled Webmatrix and re-installed it. Also I removed Visual Web Developer.
This Visual Studio Web.PageInspector does not belong to Webmatrix I believe. How fo I get rid of this?

Error building empty website in VS2012

I am using Visual Studio 2012 Update 3 and whenever I create a new ASP.NET empty website and build it for the first time compilation is successful but I get a server error when accessing the site of "Could not load file or assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The module was expected to contain an assembly manifest."
If I then go back and build the website again I get a single error of "Object reference not set to an instance of an object" but no line number.
This error occurs whichever framework I am targeting and whether I am using C# or VB.
Can anyone point me in the right direction please?
Thanks,
Richard.
Possibly AjaxControl Toolkit is the issue.
Depending on your Framework version( 4.5, 4.0, 3.5 ),, install the correct version of AjaxControl Toolkit from here: http://ajaxcontroltoolkit.codeplex.com/releases/view/94873.
Another solution I found is to place System.Web.Extensions.dll and System.Web.Extensions.Design.dll directly in the Bin folder of your web application.

ASP.Net 3.5 web app trying to load System.Web.Mobile.dll version 4.0.0.0

I'm trying to debug a web application that I inherited from a previous developer, it was written using Visual Studio 2008 with the .Net 3.5 framework (hence using asp.net 2.0). I can see temporary asp.net files show up in the 2.0 folder (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files)
Unfortunately every time I try browse to the login page on my local IIS server I get the following error:
"Could not load file or assembly 'System.Web.Mobile, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)"
The assembly is not referenced anywhere in the application, I have no idea why it's trying to load it when I browse to the page. I tried explicitly referencing the the 3.5 version as follows in the web.config using the 2.0 framework dll:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll
No matter what I do however it seems to try to bind to the 4.0.0.0 version and fails to load the page.

Asp.Net 4.0 Web Forms -Webpages.Deployment assemblie

I have a web application. The platform is Asp.NET 4.0 and I've used web forms. It's not MVC.
I'm getting an error.
System.IO.FileLoadException: Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is denied.
I've searched and the error is about MVC. I couldn't find any answer why it's happening at webforms. Also the project is working well at localhost. But when I publish it, I am getting that error.
Thanks...
Looks like you have a broken reference to a DLL in production - the DLL may not be in the GAC on the machine you pushed to. To verify, you can compare the bin folder locally to that on the production machine.
If it's not available on the deployment machine, right click the reference in your "References" folder and set "Copy Local" to true - then redeploy.

Resources