惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
S
Schneier on Security
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
Security Latest
Security Latest
Jina AI
Jina AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recorded Future
Recorded Future
T
Tor Project blog
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
C
Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
IT之家
IT之家
T
Threatpost
Cyberwarzone
Cyberwarzone
O
OpenAI News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
月光博客
月光博客
Latest news
Latest news
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - David

最近比较烦 网络安全管理---三分技术加上七分管理 DataGrid点击删除按钮弹出确认对话框一个好办法 asp.net常用函数 Container.DataItem几种方式. 再贴一个菜单的例子 菜单或浮动窗口被Select等对象遮盖的解决方案 使用缓存时候,发现Page_load只能运行一次的解决方法。 对URL中的参数验证,防止用户恶意改变差数值。 常见木马端口 超时时间已到。在操作完成之前超时时间已过 令人苦笑的诺顿防火墙 IIS5 中内部错误解决方法 正则表达式学习 公司文件服务器管理,让用户快速找到需要的文件。 域名相关知识 字节换算关系 Sql2000中DateName的使用来获取年和月。 对下拉控件的绑定
Asp.net上传文件限制,在大于5M的时候出现DNS解析错误,解决方法。
David · 2004-12-16 · via 博客园 - David

在利用
private void Upload_Click(object sender, System.EventArgs e)
  {
   if(this.File1.PostedFile.ContentLength != 0 && this.File1.PostedFile.ContentLength < (50*1024*1024))
   {
    
    
    string strUploadFold = "/upload/";
    string strFileName = this.File1.PostedFile.FileName;
    int intPosition = strFileName.LastIndexOf("\\");
    strFileName = strFileName.Substring(intPosition+1);
    string strSavePosition = Request.MapPath(strUploadFold)+strFileName;
    this.File1.PostedFile.SaveAs(strSavePosition);
    this.Infor1.Text = this.File1.PostedFile.ContentLength+" = "+this.File1.PostedFile.ContentLength/(1024*1024)+"M";


   }
   else
   {
    this.Infor1.Text = "上传的文件的大小超出范围!";
   }
  
  }
  上传文件的时候,发现如果文件超过了5M就不能上传成功。
解决方法:在<system.web>中加入
<httpRuntime maxRequestLength="10240" /> 这个是控制指示 ASP.NET 支持的最大文件上载大小。该限制可用于防止因用户将大量文件传递到该服务器而导致的拒绝服务攻击。指定的大小以 KB 为单位。默认值为 4096 KB (4 MB)。