abcupload.netfor crack, check www.sorke.net
解决方案 »
- 菜鸟问关于sql 2005 触发器问题
- 求oracle数据库下载地址
- 怎样获取SINA的新闻显示在自己的HTML页面上,我问的不是获取的地址,我问的是如何把他的<script></script>潜入到我的HTML或者ASPX页面中?
- 单击treeView中节点时(链接进入下一页),获得节点的值.急~~~
- 用asp.net 怎么做成这中效果
- treeview1 外 有两个按钮 button1 和 button2 ,如何能点击 button1时展开全部 treeview1 节点,点击 button2 时收缩所有节点?
- 急,急,急:为什么我的调用Shell("calc.exe", AppWinStyle.NormalFocus, False)无法弹出" 计算器"程序?(在线等待)
- 显示不同内容无刷新的问题!
- ASP.net中的Excel调用问题。
- 为什么我在text中输入中文,却得不到数据呢?英文和数字去可以提交!!
- 怎么样在客户端清除application的值啊!急
- 高手帮菜手
<httpRuntime maxRequestLength="1000000000000000"/>
ljupin:你的方法我试了,但不知放在哪是正确的,我试了几个地方都编译不过。
<system.web>
<httpRuntime maxRequestLength="1000000000000000"/>
</system.web>
</configuration>
<add name="UploadModule" type="HttpUploadApp.UploadModule,HttpUploadApp" />
</httpModules>
This configures the timeout to 30 minutes, accepts up to 500MB files, and registers the HttpModule. My assembly name is HttpUploadApp as the namespace is the same thing. Next is the HttpModule class. This is a rough example that writes every HTTP request that has a content body to a file whose name is a GUID with a ".txt" extension saved in a directory named "C:\Upload\". This was just for test purposes!!!
HttpModule class (VB.NET): Imports System
Imports System.IO
Imports System.Web
Public Class UploadModule Implements IHttpModule Public Sub New()
MyBase.New()
End Sub Public Sub Dispose() Implements System.Web.IHttpModule.Dispose
End Sub Public Sub Init(ByVal context As System.Web.HttpApplication) Implements System.Web.IHttpModule.Init
AddHandler context.BeginRequest, AddressOf BeginRequest
End Sub Private Sub BeginRequest(ByVal source As Object, ByVal e As EventArgs) Dim app As HttpApplication = CType(source, HttpApplication)
Dim context As HttpContext = app.Context ' Get the HttpWorkerRequest Object!!!
Dim hwr As HttpWorkerRequest = CType(context.GetType.GetProperty("WorkerRequest", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).GetValue(context, Nothing), HttpWorkerRequest) If hwr.HasEntityBody Then Dim g As Guid = Guid.NewGuid()
Dim fn As String = "C:\Upload\" + g.ToString + ".txt" Dim fs As New FileStream(fn, FileMode.CreateNew, FileAccess.Write, FileShare.Read)
Try Const BUFFSIZE As Integer = 65536 Dim Buffer As Byte()
Dim Received As Integer = 0
Dim TotalReceived As Integer = 0
Dim ContentLength As Integer = CType(hwr.GetKnownRequestHeader(HttpWorkerRequest.HeaderContentLength), Integer) Buffer = hwr.GetPreloadedEntityBody()
fs.Write(Buffer, 0, Buffer.Length)
Received = Buffer.Length
TotalReceived += Received If Not hwr.IsEntireEntityBodyIsPreloaded Then While (ContentLength - TotalReceived) >= Received
Buffer = New Byte(BUFFSIZE) {}
Received = hwr.ReadEntityBody(Buffer, BUFFSIZE)
fs.Write(Buffer, 0, Received)
TotalReceived += Received
End While Received = hwr.ReadEntityBody(Buffer, (ContentLength - TotalReceived))
fs.Write(Buffer, 0, Received)
TotalReceived += Received End If fs.Flush() Catch ex As Exception Finally
fs.Close()
End Try context.Response.Redirect("UploadForm.aspx")
End If End Sub End Class
上面的链结有点误人子弟
就是不能编译,不知何原因