jquery - SignalR and c# causing a version error -
i've installed signalr , getting error below. looks if i've got version issue not know prepare it. i've installed signalr using nuget installer.
anyone know how prepare this?
could not load file or assembly 'microsoft.owin.host.systemweb, version=0.10.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code. exception details: system.io.fileloadexception: not load file or assembly 'microsoft.owin.host.systemweb, version=0.10.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. located assembly's manifest definition not match assembly reference. (exception hresult: 0x80131040) source error: line 35: protected void session_start(object sender, eventargs e) line 36: { line 37: routetable.routes.maphubs(); line 38: } line 39: }
uncaught typeerror: cannot read property 'client' of undefined signalr_test.html:35
<!--script references. --> <script src="../scripts/jquery-1.9.1.js"></script> <script src="../scripts/jquery.signalr-1.0.0-rc1.js"></script> <script src="../scripts/jquery.signalr-1.0.0-rc1.min.js"></script> <!--reference autogenerated signalr hub script. --> <script src="/signalr/hubs"></script> <!--add script update page , send messages.--> <script type="text/javascript"> $(function () { // declare proxy reference hub. var chat = $.connection.collaboratorhub; // create function hub can phone call broadcast messages. chat.client.broadcastmessage = function (name, message) { // html encode display name , message.
--packages.
<packages> <package id="entityframework" version="5.0.0" targetframework="net45" /> <package id="jquery" version="1.8.2" targetframework="net45" /> <package id="jquery.ui.combined" version="1.8.11" targetframework="net45" /> <package id="jquery.validation" version="1.9.0.1" targetframework="net45" /> <package id="knockoutjs" version="2.1.0" targetframework="net45" /> <package id="microsoft.aspnet.mvc" version="4.0.20710.0" targetframework="net45" /> <package id="microsoft.aspnet.providers.core" version="1.0" targetframework="net45" /> <package id="microsoft.aspnet.providers.localdb" version="1.0" targetframework="net45" /> <package id="microsoft.aspnet.razor" version="2.0.20710.0" targetframework="net45" /> <package id="microsoft.aspnet.signalr" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.aspnet.signalr.core" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.aspnet.signalr.js" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.aspnet.signalr.owin" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.aspnet.signalr.systemweb" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.aspnet.web.optimization" version="1.0.0" targetframework="net45" /> <package id="microsoft.aspnet.webapi" version="4.0.20505.0" targetframework="net45" /> <package id="microsoft.aspnet.webapi.client" version="4.0.20710.0" targetframework="net45" /> <package id="microsoft.aspnet.webapi.core" version="4.0.20710.0" targetframework="net45" /> <package id="microsoft.aspnet.webapi.webhost" version="4.0.20710.0" targetframework="net45" /> <package id="microsoft.aspnet.webpages" version="2.0.20710.0" targetframework="net45" /> <package id="microsoft.jquery.unobtrusive.ajax" version="2.0.20505.0" targetframework="net45" /> <package id="microsoft.jquery.unobtrusive.validation" version="2.0.20505.0" targetframework="net45" /> <package id="microsoft.net.http" version="2.0.20710.0" targetframework="net45" /> <package id="microsoft.owin.host.systemweb" version="1.0.0-rc1" targetframework="net45" /> <package id="microsoft.web.infrastructure" version="1.0.0.0" targetframework="net45" /> <package id="modernizr" version="2.6.2" targetframework="net45" /> <package id="newtonsoft.json" version="4.5.9" targetframework="net45" /> <package id="owin" version="1.0" targetframework="net45" /> <package id="webgrease" version="1.1.0" targetframework="net45" /> </packages>
where beingness used: alumcloud
to me sounds problem you're using assembly wants depend on specific version of microsoft.owin.host.systemweb: i.e. version x, version of microsoft.owin.host.systemweb getting loaded instead version y. clr raise error default.
you can prepare making sure using 1 version (e.g. x) consistently , dependent assemblies reference version.
you may need @ assemblies in ildasm/reflector see version trying load.
or, can seek forcefulness clr take different assembly version using assembly binding redirect says clr "load version y when assembly asks version x". if seek app succeed if there no changes in assembly public interface.
(note 1, can't tell question found microsoft.owin.host.systemweb lack of farther info assume app bin folder, , doens't impact answer, in way of debugging version mismatch.)
c# jquery .net signalr
No comments:
Post a Comment