flex上传文件(flex+asp.net)
废话不说,直接代码部分代码摘抄自网上,在此想原作者表示感谢
1、服务端 uploadFile.ashx
<%@ WebHandler Language="VB" Class="UploadFile" %>
Imports System
Imports System.Web
Imports System.Web.HttpServerUtility
Imports System.IO
Imports System.Web.HttpRequest
Public Class UploadFile : Implements IHttpHandler
Private m_UploadPath As String = "~\Files\"
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
context.Response.ContentType = "text/plain"
Dim responses As String = ""
Dim files As HttpFileCollection = context.Request.Files
If files.Count = 0 Then
'Response.Write("请勿直接访问本文件")
context.Response.End()
Else
' 只取第 1 个文件
Dim file As HttpPostedFile = files.Item(0)
If (file IsNot Nothing AndAlso file.ContentLength > 0) Then
Dim path_1 As String = context.Server.MapPath(m_UploadPath)
Dim today As DateTime = DateTime.Today
Dim dirname As String = String.Format("/Files/{0}/{1}/{2}/", today.Year, today.Month, today.Day)
&n
相关文档:
flex中使用socket与其他语言(如Java)socket交互的例子。
自从Adobe Flash Player升级到9.0.124后,由于安全策略的修改,原来的socket连接方式将不能被使用,而必须采用新的安全策略方式来验证,具体的过程如下:
1.首先检测服务端的843端口是否提供安全策略文件;
&n ......
这是一个简单的工作流设计器模型,还不能用于实际项目,只是个人兴趣做一些技术学习与尝试。设计器支持一些工作流基本组件的绘制,如节点、路由线路等等。
整个设计器是纯Flex技术实现,未与数据库接口。采用Flex Builder 3.0开发,通过实践对Flex以下技术有了更进一 ......
断点续传的原理
在了解HTTP断点续传的原理之前,先来说说HTTP协议,HTTP协议是一种基于tcp的简单协议,分为请求和回复两种。请求协议是由客户机(浏览器)向服务器(WEB SERVER)提交请求时发送报文的协议。回复协议是由服务器(web server),向客户机(浏览器)回复报文时的协议。请求和回复协议都由头和体组成。头和体之 ......
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Text;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Sy ......
web.config
<customErrors mode="On" defaultRedirect="ApplicationErroy.aspx" >
<error statusCode="403" redirect="403.htm"/>
<error statusCode="404" redirect="404.htm"/>
<error statusCode= ......