ASP. NET interacts with Flex Test record

Source: Internet
Author: User

First, the use of ASP to provide data Services Flex, Flex for the front-end performance.
Flex uses three ways of four code implementations to fetch data. respectively for
Httpservice,
WebService,
RemoteObject,
RemoteObjectAMF0.
Third, in the project folder
Vs2010service provide httpservice, WebService services;
Vs2008remoteobject offers RemoteObject services.
Iv. fluorinefx.net+remoteobjectamf0 files are additional files.
Wu, <sessionstate cookieless= "AutoDetect" ></sessionState>
Set up a compatible client to disable cookies (to be passed back to SessionID in a flex project)
The use of session in ASMX requires [WebMethod (EnableSession = True)] to be set.

Install Setup (fluorinefx.net). exe under the fluorinefx.net+remoteobjectamf0 file.
Project templates can be integrated into 2005 and 2008, and VS2010 is not supported.
Eight. Use the template in the seven to build a common Web site (FluorineFX ASP. NET Web site) project.
Set console.aspx as the startup page to test the methods in the class.
Nine, the use of RemoteObjectAMF0 when the Renaun_com_remoteobjectamf0.zip decompression to the SRC
The COM folder is copied to the Flex project as a whole;
Note that the path is the same path as the mxml;
Override Public Function SetCredentials (username:string, password:string): void in remoteobjectamf0.as modified to override Public Function SetCredentials (username:string, password:string,charset:string=null): void)
Add xmlns:renaun= "com.renaun.rpc.*" to <mx:application ... In
Ten, the use of ordinary remoteobject in the same directory of mxml add services_config.xml file content as follows:

XML code
  1. <? XML version= "1.0" encoding="UTF-8"?>
  2. <services-config>
  3. <services>
  4. <service id="Remoting-service"
  5. class="Flex.messaging.services.RemotingService"
  6. messagetypes="Flex.messaging.messages.RemotingMessage">
  7. <destination id="fluorine">
  8. <channels>
  9. <channel ref="MY-AMF"/>
  10. </Channels>
  11. <properties>
  12. <source>*</source>
  13. </Properties>
  14. </Destination>
  15. </Service>
  16. </Services>
  17. <channels>
  18. <channel-definition id="MY-AMF" class="Mx.messaging.channels.AMFChannel">
  19. <endpoint uri="http://localhost:12432/ReomteFlex/Gateway.aspx" class=" Flex.messaging.endpoints.AMFEndpoint "/>
  20. </channel-definition>
  21. </Channels>
  22. </services-config>


Note: http://localhost:12432/ReomteFlex/Gateway.aspx port changes with project initiation.

After that, the Flex project right-property-flex compiler-compiler parameter (-locale en_us-services "Services_config.xml")

Xi. the use of functions of the above premise
Run VS2008 project, VS2010 project, Flex project;
VS2008 project, the port after the startup of the VS2010 project is inconsistent with the port at the time the instance was established, change the port accordingly to the flex project.
12, the Flex project Httpservice the URL address in the way there is a {SessionID} can not, just for testing purposes, Ann vs by default will SessionID placed in a cookie.
13. The whole process is:
Enter user name: NJM
Password: 168
Login successfully returned to current SessionID
You can then click on "with identity access" to test.
Finally click "Exit".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.