FineUI 官方论坛

标题: FineUIMvc 搭配 SignalR 出错框 [打印本页]

作者: yygy    时间: 2017-7-29 23:11
标题: FineUIMvc 搭配 SignalR 出错框
  1. namespace FineUIMvc.EmptyProject
  2. {
  3. public class ChatHub : Hub
  4. {
  5. public void Send(string name, string message)
  6. {
  7. // Call the broadcastMessage method to update clients.
  8. Clients.All.broadcastMessage(name, message);
  9. }
  10. }
  11. }
  12. //=====================================================
  13. [assembly: OwinStartup(typeof(FineUIMvc.EmptyProject.Startup))]

  14. namespace FineUIMvc.EmptyProject
  15. {
  16. public class Startup
  17. {
  18. public void Configuration(IAppBuilder app)
  19. {
  20. // 有关如何配置应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=316888
  21. app.MapSignalR();
  22. }
  23. }
  24. }
复制代码
空项目增加以上两文件运行Hello就出错
[attach]10406[/attach][attach]10407[/attach]

创建一个新项目就没有出现错误框。是不是FineUIMVC设置出错


作者: yygy    时间: 2017-7-30 13:43
新建项目怎样配置FineuiMvc
复制Bin,res目录, _Layout,Web.config[attach]10408[/attach]

作者: yygy    时间: 2017-7-30 17:54
运行Hello是这样
[attach]10409[/attach][attach]10409[/attach]

作者: zy32002    时间: 2017-7-31 08:51
管道的问题,需要设置下web.config
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
</system.webServer>

作者: yygy    时间: 2017-7-31 11:56
管道的问题,需要设置下web.config
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
</system.webServer>


加入还是一样。有没有其它方法???新建项目配置FineuiMvc又出错。
作者: zy32002    时间: 2017-7-31 13:05
又出什么错误,你倒是说清楚啊。别让我挤牙膏
作者: yygy    时间: 2017-7-31 13:44
不好意思,还是出现原来的错误
[attach]10412[/attach]

作者: yygy    时间: 2017-8-18 11:27
本帖最后由 yygy 于 2017-8-18 11:31 编辑

问题已解决
1、增加一个BundleConfig.cs,文件是空的
namespace Cpmro
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {

        }
    }
}

2、Global.asax.cs修改以下
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            ModelBinders.Binders.Add(typeof(JArray), new JArrayModelBinder());
            ModelBinders.Binders.Add(typeof(JObject), new JObjectModelBinder());
        }

3、Web.config增加以下
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="FineUIMvcScriptModule" type="FineUIMvc.ScriptModule, FineUIMvc" />
    </modules>
    <handlers>
      <add name="FineUIMvcResAxd" verb="GET" path="res.axd" type="FineUIMvc.ResourceHandler, FineUIMvc" />
    </handlers>
  </system.webServer>

4、
[attach]10442[/atta[attach]10445[/attach]ch][attach]10444[/attach]
作者: capfhz    时间: 2017-10-16 15:52
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="FineUIMvcScriptModule" type="FineUIMvc.ScriptModule, FineUIMvc" />
    </modules>
    <handlers>
      <add name="FineUIMvcResAxd" verb="GET" path="res.axd" type="FineUIMvc.ResourceHandler, FineUIMvc" />
    </handlers>
  </system.webServer>加入这个节点后,FineUI就可以随便以什么模式运行





欢迎光临 FineUI 官方论坛 (https://www.fineui.com/bbs/) Powered by Discuz! X3.4