1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Upload file error (InvalidOperationException: There is already an open DataReader associated

Upload file error (InvalidOperationException: There is already an open DataReader associated

17 posts, 0 answered
  1. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    11 Jul 2011
    Link to this post

    Hi,
    I am trying to upload the 5 mb pdf file and I got the error

    (InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.)

    I tried a few times and all failed. Then I tried to upload small 1 to 3 mb pdf files which all successfully went thru.

    What should I do? Please help.


    Thanks,

  2. Milena
    Milena avatar
    75 posts
    Registered:
    05 Apr 2017
    14 Jul 2011
    Link to this post
    Hello Nk,

    Can you send us more details how to reproduce the problem you are reporting? Does it happen only with this specific .pdf ?  Did you tried with other files with size greater or equal to 5 mb? What is the problem the size or the specific .pdf file?

    Kind regards,
    Milena
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    14 Jul 2011
    Link to this post

    Milena,
    I tried any size from 5 mb and more, I got errors. I did not have any problem from 1 to 3 mb.

    There is no specific file type should be concerned but large files.


    Thanks,
  4. Milena
    Milena avatar
    75 posts
    Registered:
    05 Apr 2017
    18 Jul 2011
    Link to this post
    Hello Nk,

    Here are more questions about how to reproduce the problem:

    Are both front end and back end have the same behavior?
    Do you reproduce it locally with Cassini web server or on  published site on IIS? 
    Can you send a video how do you reproduce the problem ?

    Best wishes,
    Milena
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    18 Jul 2011
    Link to this post


    Milena,
    I am not undersding you question  "Are both front end and back end have the same behavior?". I had SQL db and SItefinity apps on difference servers. 

    Yes, I can replicate the error - It was on published site.
        It maybe help you more. When I uploaded files sometime I got this error and the other time I got this page could not be display or something just like that

    Sorry, I can not video this error.


    Hope you can help.

    Thanks,
  6. Milena
    Milena avatar
    75 posts
    Registered:
    05 Apr 2017
    18 Jul 2011
    Link to this post
    Hi Nk,

    Can you please check MaxRequestLength attribute of HttpRuntime configuration element for your site:
    http://msdn.microsoft.com/en-us/library/e1f13641%28v=VS.100%29.aspx ?

    The default length of the HttpRuntime is 4 MB, so you should reconfigure size in order to be able to upload larger files.

    Let me know if this solve the problem you are experiencing!

    All the best,
    Milena
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    28 Sep 2011
    Link to this post

    Hi,
    I am back. At this time, I have a PDF 5mb file to upload to CMS today. And I got this error:

    InvalidOperationException: This SQLTransaction has completed. It is no longer usage.

    It did not allow me to upload it.

    I tried to upload the same file in development/test environment and I do not have any problems. So, I check the Web.config file I just see the differences are:

    Development & test environment
    No thing change on those tags
    <system.web>
                     ...// Default - no add-in                 ..
    </system.web> 
     
    <system.webServer>
                 ... // Default - no add in
    </system.webServer>


    Production
    <system.web> 
                 // Add in to limit to 10mb & set time out
                 <httpRuntime maxRequestLength="10240" executionTimeout="3600" />
     ..
    </system.web>

    <system.webServer>
                 <security> // Add-in 
                      <requestFiltering>
                               <requestLimits maxAllowedContentLength="512000000"/>
                      </requestFiltering>
                 </security>
    </system.webServer>


    Please help.

    Thanks!

  8. Teodor
    Teodor avatar
    52 posts
    Registered:
    24 Sep 2012
    29 Sep 2011
    Link to this post
    Hello Nk,
           Can you check if this is happening in the latest version of sitefinity - 4.2.SP1.  If so it will be grate if you send us the project (this includes Database ,configuration , dlls ).

    Regards,
    Teodor
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    29 Sep 2011
    Link to this post

    Teodor,
    Thank you for fast responses. Unfortunately, for now I can not migrate my project to version 4.X yet. Would you tell me how to work around to fix this issue.

    It must be done now. Would you help me out?


    Many thanks,


    fyi: I changed the httpRuntime maxRequestLength to 102400.

    and I got this error (see attachment)
  10. Teodor
    Teodor avatar
    52 posts
    Registered:
    24 Sep 2012
    06 Oct 2011
    Link to this post
    Hi Nk,

        I am really sorry that i wasn't able to reply early. I try to reproduce the problem but i couldn't. Can you send us the project itself and steps to reproduce the problem.  If I understand correctly you are not using Sitefinity 4. If so there is a mistake in the ticket . It is marked that you are using 4.1.1501.

    Best wishes,
    Teodor
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    06 Oct 2011
    Link to this post
    Teodor,
    I am still using 3,7 SP3. I am so sorry that I could not send the project itself.

    In the past few days, I make changes a web.config such as

    <Libraries defaultGenericProvider="Libraries" streamingProviderName="Nolics"
            streamingIsEnabled="True" streamingChunkSize="20971520" >

    Then, at all time, I can to upload up to 6mb. Sometime I can and can't upload up to 9.25mb.


    Please let me know if there anything I can provide you.


    Thanks,
  12. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    10 Oct 2011
    Link to this post
    Hello Nk,

    The current settings of the provider are setting each chunk to be at the size of 20 MB. I can recommend that you set this size to something like 4 MB.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    11 Oct 2011
    Link to this post

    Radoslav,
    Thank you for replying my question.

    I was trying to reduce the size from 20mb of streaming chunk to 6mb which I was able to upload up to 10.8mb. But a few times it took me a couple attempts to open before it worked properly.

    Moreover, when I uploaded files thru the pages, not module library, the elapsed time stop at 45 seconds then it halted for a while before system terminated current processing. Do you why it stoped at 45 seconds?

    Is there another way to set web.config file to be able to upload to 50-60 mb?


    Please help!

    Thanks,
  14. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Oct 2011
    Link to this post
    Hello Nk,

    What is your current version of Sitefinity? In Sitefinity 3.7 SP3, there was a bug with calculating the size of uploaded documents which caused problems when downloading. This is resolved in 3.7 SP4.

    You can extend the maximumRequestLength and exectuionTimeout of the httpRuntime. Default values are (4MB and 90 seconds).

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    13 Oct 2011
    Link to this post
    Radoslav,
    I did set the execution time out as indicated in previous post:

    <system.web> 
                 // Add in to limit to 10mb & set time out
                 <httpRuntime maxRequestLength="10240" executionTimeout="3600" />
     ..
    </system.web>


    Did you know any other ways around to configure system to be able to up 30 mb or more?


    Please help.

    Thanks,
  16. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    13 Oct 2011
    Link to this post
    Hello Nk,

    If you limit the request lenght to 10MB it is not likely that you will be able to upload larger files.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  17. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    13 Oct 2011
    Link to this post

    Radoslav,
    You are right. That setting is just limit to 10mb.

    I already changed it to 100mb to test any larger files
    <system.web> 
                 // Add in to limit to 100mb & set time out
                 <httpRuntime maxRequestLength="102400" executionTimeout="3600" />
     ..
    </system.web>



    Thanks,
17 posts, 0 answered