Have you tried it just using a data connection, without code, to see if you can successfully submit?
One thing is make sure your portal site is in your Internet or Trusted security zone in Internet Explorer.
You may have read access and not write access. Verify your permissions on this site.