This project has moved. For the latest updates, please go here.

Operation is not valid due to the current state of the object.

Feb 10, 2016 at 2:00 PM
thanks for your replay for AxHost.Dispose()

I use your dlls in your sample (saraff.twain.webseite) it is work properly .
Now i want to use this dlls in other web application .

in new web application i get this error :

"Operation is not valid due to the current state of the object."

when "_Send" in "UploadHelper.cs" and method ProcessRequest(HttpContext context) in twainhandler.ashx do not hit.

difference between saraff.twain.webseite and new web application is that
in website <authentication mode="windows"> and in new web application
<authentication mode="Forms">

i searched internet and found this solution that adding this lines
<add key="aspnet:MaxHttpCollectionKeys" value="10000"/>
<add key="aspnet:MaxJsonDeserializerMembers" value="10000"/>

in my appsettings in web.config can solved problem.

i add this lines but error do not fix.

with regards .
Feb 11, 2016 at 2:54 PM
Hello, hjeishi1360.
Advising on the development of a web application is beyond the scope of a Saraff.Twain.NET project. I can only say that if you add authentication on the server side, the corresponding actions must be performed on the client side.
Marked as answer by SARAFF on 2/18/2016 at 6:40 AM