Signalr Nuget Failing Due To Unrelated Assembly - signalr

I have some code that I wrote before (which did previously work), which uses SignalR Nuget packages.
There is a client side and a server side project.
I have the following packages installed on the server
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="David.Utility.Log4net" version="2.0.1" targetFramework="net45" />
<package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.2.0" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.SelfHost" version="2.2.0" targetFramework="net45" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Diagnostics" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Hosting" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.SelfHost" version="3.0.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>
I also have the following BindingRedirects in place in App.Config
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
And this is a screen shot of all the references for the project
But when I try and attempt to run this process (which is the Server element of the Signalr solution) I get this error:
I do not get this at all, at the server side process does not even use that Dll. The client side project does, but I am trying to run just the server side process.
Any ideas on this one?

Related

Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I'm making a web application using WEB API 2.
Previously, my project ran fine without any errors. Errors only came after I had updated my nuget packages to the lastest version.
Currently, when I start my web application, it throws me an error:
This is the command where exception is thrown (in Startup.cs)
GlobalConfiguration.Configure(ApiRouteConfig.Register);
I've tried reinstalling WEB API 5.2.3 again and again but no luck. The error kept happening.
Here is my packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="4.4.0" targetFramework="net461" />
<package id="Autofac.Mvc5" version="4.0.1" targetFramework="net461" />
<package id="Autofac.SignalR2" version="4.0.0" targetFramework="net46" />
<package id="Autofac.WebApi2" version="4.0.1" targetFramework="net461" />
<package id="EntityFramework" version="6.1.3" targetFramework="net46" />
<package id="JWT" version="1.3.4" targetFramework="net461" />
<package id="log4net" version="2.0.8" targetFramework="net461" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.SignalR.Core" version="2.2.1" targetFramework="net46" />
<package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.1" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net46" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.3" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Logging" version="1.1.3" targetFramework="net461" />
<package id="Microsoft.IdentityModel.Tokens" version="5.1.3" targetFramework="net461" />
<package id="Microsoft.Net.Compilers" version="2.0.1" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net46" />
<package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net46" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net46" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net46" />
<package id="Microsoft.Owin.Security.Jwt" version="3.0.1" targetFramework="net461" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net461" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
<package id="Modernizr" version="2.8.3" targetFramework="net46" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" />
<package id="Nustache" version="1.16.0.4" targetFramework="net461" />
<package id="Owin" version="1.0" targetFramework="net46" />
<package id="ToolKit-DataAnnotations" version="1.0.4" targetFramework="net461" />
</packages>
I've search for many solutions on internet but didn't work for me. I don't know what is going on with my project. It cost me one day with nothing.
My development environment:
Visual Studio 2015 Community Update 3
Net Framework 4.6.1
Can anyone help me please ?
Thank you.
This has occured because some assembly still references System.Net.Http version 4.0.0.0 while you have upgraded it and version 4.0.0.0 no longer exist.
Things you can try:
Search for System.Net.Http.dll in your project folder. It will usually be in packages. Right click on dll > Properties > Goto Details tab > Find Product Version there.
Open App.config, add the following code. assemblyBinding should come under configuration > runtime. Replace current_version with the version you found in the previous step.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http"
publicKeyToken="b03f5f7f11d50a3a"
culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0"
newVersion="current_version"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
This will redirect any call to version 4.0.0.0 to the current_version dll at runtime.

How to upload my asp.net mdf into godaddy's SQL Server so that my site works?

I've been trying to upload my asp.net app on godaddy for going on 3 weeks now. I've already solved all kinds of nightmares with the web.config and I've finally got the damn thing to at least show up. But all pages that call upon database information just crash. I'll go briefly through the steps I used to get it working at the current level in case I missed anything apart from what I suspect is the current problem, which is no database information on the godaddy database.
To upload this monster to godaddy I (using this guide and many many many others http://www.c-sharpcorner.com/article/how-to-host-your-asp-net-mvc-website-on-godaddy-server/)
Uploaded my web app by publishing locally and then zipping, and then uploading to the root directory for the site in godaddy. Then extracted to that directory in file manager (instead of using ftp)
Made sure that my publish (in step 1) published with ALL the dlls and assemblies (bin deployed)
Configured in web.config full trust level, and custom errors mode set off
Created a SQL Server database on goddaddy, and put in the connection string in web.config (I know the string works because I tested the connection in Visual Studio).
In web.config I deleted everything between system.codedom (the website did not even appear before this step).
Here is my web.config if anyone is interested:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DefaultConnection"
connectionString="Data Source= (LocalDb)\MSSQLLocalDB;AttachDbFilename="|DataDirectory|\aspnet-BA Portal- 20170128030249.mdf";Initial Catalog="aspnet-BA Portal- 20170128030249";Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="SampleConnectionString"
connectionString="Data Source= (LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Sample.mdf;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="my_banaturalportal"
connectionString="Data Source=184.168.194.53;Integrated Security=False;database=my_banaturalportal;User ID=my_banaturalportal_user;Password=*******;Connect Timeout=1500;" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<customErrors mode="Off" />
<trust level="Full" />
<authentication mode="None" />
<compilation targetFramework="4.5.2" defaultLanguage="c#" />
<httpRuntime targetFramework="4.5.2" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking"
type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0"
newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0"
newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0"
newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itextsharp" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.5.10.0" newVersion="5.5.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itextsharp.xmlworker" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.5.10.0" newVersion="5.5.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient"
type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.codedom>
</system.codedom>
</configuration>
<!--ProjectGuid: {9AFE5866-CFA2-43B2-8122-EC12418E7D63}-->
Now I've got my web app and it at least shows up, but I can't log in (https://my.banaturalportal.com/). So to try and better understand the problem i uploaded a second version with no authorizations (no login) here (http://testing.banaturalportal.com/) and noticed that every page that call on a database item throws an exception (calling the "forbidden" error page). By the way site has no certificate right now. I don't know if thats a problem.
I never did do anything to put data into the SQL Server database. I assumed it would just somehow work. I guess this was wrong. I guess my first question is, does this throwing an exception when database items get called sound like an error caused because I haven't put my database objects into the godaddy SQL Server (somehow), even though I made sure all the .mdf are still in the App_data folder even in the uploaded manager. And two, if that is the case how do I put these databases into godaddy? How do I put my .mdf files that I can access just fine locally in my App_data, into godaddy so that my asp.net website can use it.
I have researched a lot and I can't really figure out what the steps are. All I was able to figure out is that I need SSMS (which I have downloaded), and maybe my SQL for Visual Studio (which I have also downloaded).
I'd be perfectly happy to be pointed in the right direction too. I know godaddy is not a popular topic, but I'd appreciate any help because I've been doing this everyday for 3 weeks and I am just like, very sad at this point.
I think ADyson right, try to import your localDB into sql server.
this answer could be helpful for this: How to transfer ASP.NET MVC Database from LocalDb to SQL Server?

ADO.NET provider with invariant name 'System.Data.SqlClient;' cannot be found (Entity Framework MVC)

I cannot seem to resolve what appears to be a common issue with Entity Framework 6. I have reviewed the many topics related to this issue on SO, and am unable to find a solution that works for my particular case.
I have up until this point been developing using localdb with code first migrations, which worked fine. But now that I am moving this to a actual SQL server instance it throws the following error while attempting migrations:
"The ADO.NET provider with invariant name 'System.Data.SqlClient;' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)"
I have attempted the following fixes:
1) Uninstalled and Reinstalled Entity Framework
2) Added the code and used :
public abstract class BaseDomainContext : DbContext
{
static BaseDomainContext()
{
// ROLA - This is a hack to ensure that Entity Framework SQL Provider is copied across to the output folder.
// As it is installed in the GAC, Copy Local does not work. It is required for probing.
// Fixed "Provider not loaded" error
var ensureDLLIsCopied = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
}
}
as the base class for my DbSet classes.
3) Added everything to a fresh solution and received the same error.
4) Removed the writecontext and tried migrations with just read, still failed.
5) Attempted several rewrites using information from MSDN
6) I have confirmed that EntityFramework.SqlServer.dll is in my bin directory. It is also referenced properly. Plus I have only one project under my solution.
7) Confirmed I am not using the WebConfig under views.
8) Confirmed I have System.Data dll in bin folder.
Clean/Rebuilding and deletion of existing migrations folder done after each of the above steps.
I am at a loss to explain why I still am receiving this error.
Web Config
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<connectionStrings>
<add name="ReadContext" connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;" providerName="System.Data.SqlClient;" />
<add name="WriteContext" connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;" providerName="System.Data.SqlClient;" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
</system.web>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<contexts>
<context type="ProjectName.Models.ReadContext, ProjectName">
<databaseInitializer type="System.Data.Entity.MigrateDatabaseToLatestVersion`2[[ProjectName.Models.ReadContext, ProjectName], [ProjectName.Migrations.Configuration, ProjectName]], EntityFramework" />
</context>
</contexts>
</entityFramework>
</configuration>
You have this:
<add name="ReadContext"
connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;"
providerName="System.Data.SqlClient;" /> <-- semi-colon
It should be this:
<add name="ReadContext"
connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;"
providerName="System.Data.SqlClient" /> <-- no semi-colon
Otherwise, you're telling ADO to find a provider named System.Data.SqlClient; - there isn't one.
I got this error but for me, it was something entirely different. I was able to solve it by looking at only Unable to find the requested .Net Framework Data Provider and finding this answer.
I then had to edit:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
And:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Searching for DbProviderFactories both configs looked like this:
<system.data>
<DbProviderFactories>
<add name="IBM DB2 for i .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26" />
</DbProviderFactories>
<DbProviderFactories />
</system.data>
When I removed the trailing <DbProviderFactories /> everything started working again.
For me, this issue is caused by damaged EntityFramework. Uninstall EntityFramework as well as Visual Studio and Re-Installing the Visual Studio - The visual studio installation covers the .Net Framework SDK installation kind of resolved this issue.

why do I see SignalR stuff on the network tab when I am not even using signal R on my app

I am creating a SPA using John Papa SPA Videos from Plural Sight.
I created a simple asp.net web application (empty), and then I added
entity framework
web api
jquery
modernizr
web optimization
twitter bootstrap
fontawesome
Razor
Please note I havent added any single SignalR nugetpackage.
However I see some signalR activity on the browser, why?
see here: http://screencast.com/t/yFlMfFoqBl
My web.config
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<appSettings>
<add key="webpages:Version" value="2.0.0.0"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I am using VS 2013 Update 3 RTM.
And my packages:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="bootstrap" version="3.0.1" targetFramework="net45" />
<package id="EntityFramework" version="6.1.1" targetFramework="net45" />
<package id="EntityFramework.SqlServerCompact" version="6.1.1" targetFramework="net45" />
<package id="font-awesome" version="4.1.0" targetFramework="net45" />
<package id="jQuery" version="2.1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.0" targetFramework="net45" />
<package id="Microsoft.SqlServer.Compact" version="4.0.8854.1" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.7.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="5.0.4" targetFramework="net45" />
<package id="Twitter.Bootstrap" version="3.0.1.1" targetFramework="net45" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages>
Since you're using VS2013, then this is almost certainly caused by the Browser-Link feature in Visual Studio, that enables you to view client side changes on your website, Without refreshing it. VS uses SignalR to accomplish this. It is nothing to worry about.

Manually upgraded a MVC web app from 3 to 4, can't add API Controllers

I upgraded my web app from MVC3 to 4 recently by creating a new web application in MVC4, and copying all the files over, and finally merging the web.config. All works well with the existing web app, however I've just noticed a very weird error today - if I try to create a new API controller with the default dummy implementation, and then browse to that api (e.g. /api/events), I get a Could not load type error. The weird thing is if I rebuild the app, and hit the URL again, it seems to be a different assembly it's complaining about, mainly it alternates between these 2:
Could not load type 'System.Web.Razor.Parser.SyntaxTree.CodeSpan' from assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
and
Could not load file or assembly 'Microsoft.Scripting, Version=1.1.0.20, Culture=neutral, PublicKeyToken=7f709c5b713576e1' or one of its dependencies. The system cannot find the file specified.
My web.config contains the following assembly binding information:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<!--<assemblyIdentity name="FluentValidation" publicKeyToken="a82054b837897c66" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />-->
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-4.0.8.0" newVersion="4.0.8.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
And my packages.config looks like it has all the right bits in it:
<package id="AspNetMvc" version="4.0.20126.16343" />
<package id="AspNetRazor.Core" version="2.0.20126.16343" />
<package id="AspNetWebApi" version="4.0.20126.16343" />
<package id="AspNetWebApi.Core" version="4.0.20126.16343" />
<package id="AspNetWebPages.Core" version="2.0.20126.16343" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="Microsoft.Web.Optimization" version="1.0.0-beta" />
<package id="System.Net.Http" version="2.0.20126.16343" />
<package id="System.Net.Http.Formatting" version="4.0.20126.16343" />
<package id="System.Web.Http.Common" version="4.0.20126.16343" />
<package id="System.Web.Providers" version="1.1" />
<package id="System.Web.Providers.Core" version="1.0" />
I've even tried copying over my web.config with a "vanilla" one from a new mvc4 web app, which still gives me the same error (could not load file or assembly Microsoft.Scripting)
Try removing these lines from your web.config
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>

Resources