在web.config的System.Web节点下面加入这一行即可 <httpRuntime maxRequestLength = "40960" useFullyQualifiedRedirectUrl="true"/>