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
- <? XML version= "1.0" encoding="UTF-8"?>
- <services-config>
- <services>
- <service id="Remoting-service"
- class="Flex.messaging.services.RemotingService"
- messagetypes="Flex.messaging.messages.RemotingMessage">
- <destination id="fluorine">
- <channels>
- <channel ref="MY-AMF"/>
- </Channels>
- <properties>
- <source>*</source>
- </Properties>
- </Destination>
- </Service>
- </Services>
- <channels>
- <channel-definition id="MY-AMF" class="Mx.messaging.channels.AMFChannel">
- <endpoint uri="http://localhost:12432/ReomteFlex/Gateway.aspx" class=" Flex.messaging.endpoints.AMFEndpoint "/>
- </channel-definition>
- </Channels>
- </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".