Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the proper way to do an http Post from Flash to an Asp.Net MVC Application?
    text
    copied!<p>Here are a few of the things I need to know:</p> <ol> <li><p>What do you put for the URLRequest? It's confusing me a bit since Asp.Net MVC is methods and not pages</p></li> <li><p>How do you assign parameters for the POST?</p></li> <li><p>How to you execute the URLRequest to complete the Http Post?</p></li> </ol> <p>Any information on how to do a Post from Flash to an Asp.Net MVC Application would be helpful.</p> <p>Thanks,<br/> Matt</p> <p><strong>Edit:</strong> I'm asking this because I'm getting an IO Error and a Stream Error:</p> <p>Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: <a href="http://www.mysite.com/MyController/MyMethod" rel="nofollow noreferrer">http://www.mysite.com/MyController/MyMethod</a> at Main/postToMySite()</p> <p>And people have told me that this usually means the url does not exist. I've tried typing: <a href="http://www.mysite.com/MyController/MyMethod" rel="nofollow noreferrer">http://www.mysite.com/MyController/MyMethod</a> into the address bar and it says the resource cannot be found, but I know for a fact that it does exist because it gets called perfectly fine from my javascript (I've tested it).</p> <pre><code> [AcceptVerbs(HttpVerbs.Post)] public ActionResult MyMethod(FormCollection formValues) { return this.Json("Completed"); } </code></pre> <p><strong>NOTE!!!!</strong> I Just tested it on a different url, one that didn't have the <code>[AcceptVerbs(HttpVerbs.Post)]</code> and it didn't give me any errors! Any idea of why this is? Will doing a post to a method without the <code>[AcceptVerbs(HttpVerbs.Post)]</code> still work?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload