首页 \ 问答 \ AppHarbor上的布局被忽略(Layout being ignored on AppHarbor)

AppHarbor上的布局被忽略(Layout being ignored on AppHarbor)

我有一个MVC应用程序,可以在本地呈现,但是当部署到Appharbor时,它只呈现页面的视图部分并忽略布局。

关于可能原因的任何想法?

我尝试过启用/禁用预编译。


I have an MVC application that renders fine locally but when deployed to Appharbor it renders only the view portion of the page and ignores the layout.

Any ideas on possible causes?

I've tried enabling/disabling precompilation.


原文:https://stackoverflow.com/questions/20323389
更新时间:2023-04-27 17:04

最满意答案

您不能假设事务已回滚,但您不必假设: ITransaction具有bool WasCommitted属性。

您可以检查以确定事务是否已提交,并在有保证的情况下显式调用Rollback()


You can't assume that the transaction was rolled back, but you don't have to assume: ITransaction has a bool WasCommitted property.

You can check that to determine whether the transaction was committed, and call Rollback() explicitly, where warranted.

相关问答

更多
  • 如果您正在使用休眠,请考虑这种情况。 当repoMember.save(A,B); 执行时,hibernate会话没有刷新会话(即执行save sql)util createMember()完成。 当hibernate实际刷新并执行save sql时,会发生该错误。 这就是为什么你可能无法捕获导致事务回滚的异常的原因。 这里是可能有用的链接http://hedleyproctor.com/2014/08/understanding-hibernate-session-flushing/ If you're ...
  • 你的想法是正确的。 理想情况下,您应该能够从ASP.net代码执行以下操作: 致电BAPI 1。 致电BAPI 2。 等等 如果成功,则调用BAPI_TRANSACTION_COMMIT ,如果错误,则调用BAPI_TRANSACTION_ROLLBACK 。 不幸的是,如果BAPI本身包含一个COMMIT (许多旧的和非BAPI功能模块都有),那么你的ROLLBACK就太晚了 - 数据已经提交了。 在您的情况下,函数模块CSAP_MAT_BOM_MAINTAIN包含FL_COMMIT_AND_WAIT参数 ...
  • 由于整个当前事务都标记为回滚,因此第二次调用EJB也将被回滚。 您必须为RPMRequestSessionBeanRemote bean使用@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)或@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) ,具体取决于您是否还需要事务处理。 Since the whole current transaction is marked ...
  • 是的,可以在EXCEPTION块中使用COMMIT或ROLLBACK 。 ROLLBACK特别是与保存点结合使用时,比COMMIT更常见。 在大多数应用程序中肯定不会发生COMMIT 。 我当然不会在EXCEPTION块中的任何地方使用COMMIT ,除了最外层的代码。 Yes it's possible to use either COMMITor ROLLBACK in an EXCEPTION block. ROLLBACK especially when combined with a save p ...
  • 这看起来像DAO类(数据访问对象)。 通常,您希望尽可能缩短数据库连接或事务处理,因此这看起来不错。 我不知道你的长期计算是什么,但是在你坚持实体之前我会做到。 异步和潜在的并行计算可能非常有用,但在这里我看到的危险多于收益,如果等待完成,你会让数据库事务挂起很长时间。 This looks like DAO class (Data Access Object). Generally, you want to keep a DB connection or transaction open as short ...
  • 那么, conn.Close()可以继续使用 - 它会被using关闭(如果您考虑它,奇怪的是我们只在Close()之后Close()它)。 你的任何一个存储过程是否在自己内部执行任何事务代码(没有被回滚/提交)? 这听起来像是问题出在哪里......? 如果有的话,错误消息告诉我,其中一个存储过程正在执行COMMIT即使它没有启动事务 - 可能是由于(不正确)方法: -- pseduo-TSQL IF @@TRANCOUNT = 0 BEGIN TRAN -- ... IF @@TRANCOUNT > 0 ...
  • 也许https://blog.codecentric.de/en/2012/03/transactions-in-spring-batch-part-1-the-basics/文章可以提供帮助。 如果从编写器或读取器/处理器抛出错误,SB会采取不同的操作,并且在您的情况下可以执行回滚并且SB再次循环以检查哪个项目是错误的原因。 另外,请看看帮助没有回滚 - 例外 - 配置 Maybe https://blog.codecentric.de/en/2012/03/transactions-in-spring- ...
  • 好的..几点。 1)您需要从触发器引发异常,因为插入将失败并且不会插入。 所以要么不抓住你的例外,要么再次RAISE它。 2)使用dbms_output.put_line()只会在用户/客户端打开时显示一条消息。 3)您不需要循环光标。 添加where子句更有效 4)您的触发器将无法工作..它将抛出ORA-04091: table SALOANE is mutating, trigger/function may not see it如果您一次插入多于1行ORA-04091: table SALOANE i ...
  • 您不能假设事务已回滚,但您不必假设: ITransaction具有bool WasCommitted属性。 您可以检查以确定事务是否已提交,并在有保证的情况下显式调用Rollback() 。 You can't assume that the transaction was rolled back, but you don't have to assume: ITransaction has a bool WasCommitted property. You can check that to determ ...
  • 在3.1.4的示例zip中有一个名为“transaction-rollback”的示例。 检查一下,因为它有几种方法可以在单元测试中回滚。 其中一种技术包括为每个测试获取新的内存数据库的技巧。 There's an example called 'transaction-rollback' in the examples zip for 3.1.4. Check that out as it has several ways to rollback in a unit test. One of the te ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。