zoukankan      html  css  js  c++  java
  • SignalR发布后不能生成signalr/hubs

    问题:代码写完后,在一台服务器上运行没有问题。换到另外一台服务器上,找不到signalr/hubs,显示404错误。

    SignalR版本:2.0.3

    VS版本:2013

    服务器:Windows Server2008

    IIS:7.0

    解决:把http://stackoverflow.com网站上相关的问题都看了一个遍,各种方法都试了。包括:

      1. 在powershell里运行清理

        

    net stop w3svc
    Remove-Item -Path "C:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files
    oot*" -Force -Recurse
    Remove-Item -Path "C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
    oot*" -Force -Recurse
    net start w3svc

      2. 回收IIS缓冲池

      3. 更改路径

    <script src="signalr/hubs" type="text/javascript"></script>

      为

    <script src="~/signalr/hubs" type="text/javascript"></script>

      4. 换SignalR的版本

      5. 重新注册.net

    c:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_regiis.exe -i

      6. 无意中看到:http://stackoverflow.com/questions/8053229/signalr-hub-not-loading-in-iis-7-but-working-correctly-in-visual-studio/8066242#8066242
    修改web.config

      

    <configuration>
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false" />
            <modules runAllManagedModulesForAllRequests="true">
            </modules>
        </system.webServer>
    </configuration>

    试之,发现出现错误,证明有戏了“未能加载文件或程序集“NuGet.Core, Version=1.0.11220.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。“,添加后运行成功。

    感慨的是,中文网站没搜到一个有意义的答案,哪怕沾边的!

     
  • 相关阅读:
    Git
    Spring
    Linux
    Linux
    Linux
    Linux
    Linux
    Linux
    Linux
    Linux
  • 原文地址:https://www.cnblogs.com/ustcyc/p/3806506.html
Copyright © 2011-2022 走看看