swfupload 相关配置
部署在IIS上出现404:
修改 C:\Windows\System32\inetsrv\config\applicationHost.config 文件
连续查找requestFiltering,往下添加一行
<requestLimits maxAllowedContentLength="1073741824" />
里面的1073741824=1G。
<requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> <fileExtensions allowUnlisted="true" applyToWebDAV="true"> ................ </fileExtensions> </requestFiltering>
或者在本地web.config添加下面代码
<configuration> <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> </requestFiltering> </security> </system.webServer> </configuration>
另一种 404的可能性:
路径要添加绝对路径http://www.xxxx.com/swfupload/…… 或者 http://192.168.1.34/swfupload/……
flash_url: "http://www.xxxx.com/swfupload/swfupload.swf", upload_url: "http://www.xxxx.com/swfupload/imageUp.ashx", button_image_url: "http://www.xxxx.com/swfupload/up.png",
Web.Config要添加节点:
maxRequestLength的大小根据自己的需求设置1024000~=1G
<system.web> <httpRuntime maxRequestLength="1024000" executionTimeout="360" requestValidationMode="2.0" /> </system.web>
post_params 参数的设置:
因SWFUpload上传需要自己开辟Session 所以要在Globals中添加处理
post_params: { "ASPSESSID": "<%=Session.SessionID %>", "AUTHID": "<%=Request.Cookies[FormsAuthentication.FormsCookieName].Value%>" //微软MemberShip },
Globals.asax文件添加
Application_BeginRequest内添加
try { string session_param_name = "ASPSESSID"; string session_cookie_name = "ASP.NET_SESSIONID"; if (HttpContext.Current.Request.Form[session_param_name] != null) { UpdateCookie(session_cookie_name, HttpContext.Current.Request.Form[session_param_name]); } else if (HttpContext.Current.Request.QueryString[session_param_name] != null) { UpdateCookie(session_cookie_name, HttpContext.Current.Request.QueryString[session_param_name]); } } catch (Exception) { HttpContext.Current.Response.StatusCode = ; HttpContext.Current.Response.Write("Error Initializing Session"); } try { string auth_param_name = "AUTHID"; string auth_cookie_name = FormsAuthentication.FormsCookieName; if (HttpContext.Current.Request.Form[auth_param_name] != null) { UpdateCookie(auth_cookie_name, HttpContext.Current.Request.Form[auth_param_name]); } else if (HttpContext.Current.Request.QueryString[auth_param_name] != null) { UpdateCookie(auth_cookie_name, HttpContext.Current.Request.QueryString[auth_param_name]); } } catch (Exception) { HttpContext.Current.Response.StatusCode = ; HttpContext.Current.Response.Write("Error Initializing Forms Authentication"); }
void UpdateCookie(string cookie_name, string cookie_value) { HttpCookie cookie = HttpContext.Current.Request.Cookies.Get(cookie_name); if (cookie == null) { cookie = new HttpCookie(cookie_name); HttpContext.Current.Request.Cookies.Add(cookie); } cookie.Value = cookie_value; HttpContext.Current.Request.Cookies.Set(cookie); }
---------------------如果以上都注意了,基本应该没什么问题
swfupload 相关配置的更多相关文章
- zookeeper集群的搭建以及hadoop ha的相关配置
1.环境 centos7 hadoop2.6.5 zookeeper3.4.9 jdk1.8 master作为active主机,data1作为standby备用机,三台机器均作为数据节点,yarn资源 ...
- Linux网络相关配置
一.修改网卡相关配置 Linux网络参数是在/etc/sysconfig/network-scripts/ifcfg-eth0中设置,其中ifcfg-eth0表示是第一个网卡,如果还有另外一块网卡,则 ...
- ios开发之Info.plist文件相关配置
前言:在iOS开发中有些情况下需要对Info.plist文件进行配置,以下介绍几种相关配置.以后遇到需要配置的再更新... 开发环境:swift3.0.1,Xcode8.1 一,项目中需要使用第三方字 ...
- SharePoint 2013 托管导航及相关配置 <二>
本文的思路是使用JQuery重写SharePoint自带托管导航的样式,其实思路和脚本都非常简单,引用一下JQuery脚本,然后重写导航的样式,把脚本放到母版页中,即可.当然,使用JQuery可以做很 ...
- IO 相关配置参数
INNODB I/O相关配置 记录日志为顺序I/O,刷新日志到数据文件为随机操作.顺序操作性能快于随机IO. innodb_log_file_size innodb_log_files_in_grou ...
- win7下IIS错误:"无法访问请求的页面,因为该页的相关配置数据无效"的解决方法(转)
今天新装win7,然后在IIS下布署了一个网站,布署完成后运行,提示如下错误:HTTP 错误 500.19 - Internal Server Error无法访问请求的页面,因为该页的相关配置数据无效 ...
- IDEA 从SVN检出项目相关配置
1.新建好一个工程,然后通过SVN检出项目 2.检出后一般tomcat的环境是配置好的,点击上方Project Structure按钮,弹出窗体,查看Project项,一般没问题,如果要配置就配置Pr ...
- HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效。
HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效. 详细错误信息模块 IIS Web Core 通知 BeginReques ...
- "HTTP 错误 500.19 请求的页面的相关配置数据无效" 解决办法
HTTP 错误 500.19 - Internal Server Error无法访问请求的页面,因为该页的相关配置数据无效. 问题"详细错误信息模块 IIS Web Core通知 Begin ...
随机推荐
- Function Set in OPEN CASCADE
Function Set in OPEN CASCADE eryar@163.com Abstract. The common math algorithms library provides a C ...
- 一起学微软Power BI系列-使用技巧(2)连接Excel数据源错误解决方法
上一篇文章一起学微软Power BI系列-使用技巧(1)连接Oracle与Mysql数据库中,我们介绍了Power BI Desktop中连接Oracle和Mysql的方法,其实说到底还是驱动的问题, ...
- Log4net入门(控制台篇)
Log4net是Apache公司的log4j™的.NET版本,用于帮助.NET开发人员将日志信息输出到各种不同的输出源(Appender),常见的输出源包括控制台.日志文件和数据库等.本篇主要讨论如何 ...
- 挑子学习笔记:对数似然距离(Log-Likelihood Distance)
转载请标明出处:http://www.cnblogs.com/tiaozistudy/p/log-likelihood_distance.html 本文是“挑子”在学习对数似然距离过程中的笔记摘录,文 ...
- 解决iframe作为子窗口,刷新后iframe页面跳转到其它页面的问题
转载请在页首注明作者与出处 http://www.cnblogs.com/zhuxiaojie/p/5990262.html 前言: 在开发网站时,尤其是管理后台,我们经常会使用iframe作为内容窗 ...
- AJAX(一)
AJAX(一) Ajax是Asynchronous Javascript和XML的简写,这一技术能够向服务器请求额外的数据而无需卸载页面,会带来更好的用户体验. [前面的基础知识][关于同步和异步的了 ...
- Entity Framework 教程——概述
Entity Framework 基础 本教材将手把手教你使用entity framework,我们将使用entity framework 6.0和visual studio 2012. 以下表格是e ...
- Entity Framework Plus 系列目录
Entity Framework Plus 系列文章计划的已经全部写完,可能还有其他功能没有写到,希望大家能够多动手,尝试一下使用,一定会给您带来一些帮助的.文章全部写完,也应该出一个目录方便查看,目 ...
- Spring 实现数据库读写分离
随着互联网的大型网站系统访问量的增高,数据库访问压力方面不断的显现而出,所以许多公司在数据库层面采用读写分离技术,也就是一个master,多个slave.master负责数据的实时更新或实时查询,而s ...
- wnmp环境搭建
windows下配置nginx+php环境 刚看到nginx这个词,我很好奇它的读法(engine x),我的直译是“引擎x”,一般引“擎代”表了性能,而“x”大多出现是表示“xtras(额外的效果) ...