Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

Extract file(varbinary(max)) from MS SQL database

$
0
0

IIS 6 and local(Developer Environment - Win XP + VSS 2010) are working properly.
When we deployed to IIS 7.5, the browser didn't prompt the download window and appear "IE cannot display the webpage"  .

Enclosed the source code for your reference.

 Download.aspx.vb

                Response.ClearHeaders()
                Response.Clear()
                Response.Expires = 0
                Response.Buffer = True

                Response.AddHeader("Accept-Language", "zh-tw")
                Response.AddHeader("content-disposition", "attachment; filename=" & Chr(34) & Server.UrlEncode(rs("Name")) & Chr(34))

                Response.AddHeader("Content-Length", rs("Size") * 1024)
                Response.ContentType = "Application/octet-stream"
                Response.BinaryWrite(rs("Body"))

                Response.Flush()
                Response.Close()

 

 Web.Config

   <httpRuntime executionTimeout="3600" maxRequestLength="2097151"
 requestLengthDiskThreshold="80" useFullyQualifiedRedirectUrl="false"
minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000"
 enableKernelOutputCache="true" enableVersionHeader="true" requireRootedSaveAsPath="true"
 enable="true" shutdownTimeout="900" delayNotificationTimeout="50"
 waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true"
 sendCacheControlHeader="true" apartmentThreading="false" />

Please help 

Thanks for your kindly attention! 

 


Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>