得到“已经存在与该命令相关联的打开的DataReader,必须首先关闭它".错误. [英] Getting a "there is already an open DataReader associated with this Command which must be closed first" error.

查看:63
本文介绍了得到“已经存在与该命令相关联的打开的DataReader,必须首先关闭它".错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的是已经有一个与此命令相关联的打开的DataReader,必须先关闭它."将我们的应用程序部署到Azure时出现错误,但是在本地运行良好.我的连接字符串上具有MultipleActiveResultSets = true.请

I'm getting a "There is already an open DataReader associated with this Command which must be closed first." error when deploying our application to Azure, but, works fine locally. I have MultipleActiveResultSets=true on my connection string. Please advise. 

推荐答案

How exactly are you attempting to deploy your WebApp to Azure? Also, please do provide more details about your App framework and database you are attempting to leverage?

I了解您具有'MultipleActiveResultSets = true ' 如果您使用的是Visual Studio,请查看配置-导航到发布网站">在设置"标签中> 显式添加MultipleActiveResultSets = true并选中框在运行时使用此连接字符串(更新目标web.config),看看是否有帮助.
尝试重新下载发布配置文件,看看是否有任何区别.

I understand you have ‘MultipleActiveResultSets=true in your connection string. If you are using Visual Studio, kindly review the configuration – Navigate to Publish Web> In the Settings tab> Add MultipleActiveResultSets=true explicitly and check the box –‘Use this connection string at runtime (update destination web.config) and see if that helps.
Try re-downloading the publishing profile and see if that makes any difference.

建议  

Additionally, you could try the suggestions outlined in the GitHub wiki page Deployment vs runtime issues to isolate the issue further.


这篇关于得到“已经存在与该命令相关联的打开的DataReader,必须首先关闭它".错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆