Forum: IronRuby Multipart form posted failed in IIS 7

Posted by Jack Hong (jhong)
on 2010-09-01 10:08
Hopefully I can explain it well:

I am testing a rails app in IIS 7.
(Windows 7, IIS 7, .NET 3.5, Rails 2.3.5, Rack 1.0, IronRuby 1.0,
IronRack compiled from IronRuby 1.0 source from github)

Now If I add enctype="multipart/form-data" to my rails form, and then
post this form to a controller, all I got is a 500 error page, no error
messages written to Rack or Rails logs. It works fine if I remove
multipart option.

Anyone got similar problems?

Thanks.

Jack
Posted by Jack Hong (jhong)
on 2010-09-02 03:58
Finally the error was written into the rails log:

  Status: 500 Internal Server Error
  bad content body
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:319:in 
`parse_multipart'
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/request.rb:132:in 
`POST'
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:15:in 
`call'
    C:/ironruby/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in 
`call'
    C:/ironruby/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in 
`call'
    C:/ironruby/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in 
`call'
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in 
`call'
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in 
`synchronize'
    C:/ironruby/lib/ironruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in 
`call'
  ...

What puzzled me is why it is working when just use rackup, but not in 
IIS.


Jack Hong wrote:
> Hopefully I can explain it well:
> 
> I am testing a rails app in IIS 7.
> (Windows 7, IIS 7, .NET 3.5, Rails 2.3.5, Rack 1.0, IronRuby 1.0,
> IronRack compiled from IronRuby 1.0 source from github)
> 
> Now If I add enctype="multipart/form-data" to my rails form, and then
> post this form to a controller, all I got is a 500 error page, no error
> messages written to Rack or Rails logs. It works fine if I remove
> multipart option.
> 
> Anyone got similar problems?
> 
> Thanks.
> 
> Jack
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.