.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
SP
satyapriyanayak
Subhransu Sekhar Jena
abhays
DotnetUser
Post New Web Links

Uploading Large File (40mb) fails... (webhttpbinding) (Azure)

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WCF
 
I'm using javascript to upload a file to my WCF service hosted on Azure.  (40 mb file) Here is the snippets from the web.config for the service: <system.serviceModel> <bindings> <webHttpBinding> <binding transferMode="Streamed" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" openTimeout="00:25:00" closeTimeout="00:25:00" sendTimeout="00:25:00" receiveTimeout="00:25:00" name="WebConfiguration"> </binding> </webHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="RestfulEndpointBehavior"> <webHttp/> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="CPUploadServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpGetUrl=""/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <services> <service name="CPUpload" behaviorConfiguration="CPUploadServiceBehavior"> <endpoint add


View Complete Post


More Related Resource Links

Using response.outputstream.write to stream large file fails in firefox

  

Hi,

I have some code to stream files (for security of the files), the code works for all files in IE, and small files in firefox. but If the file is large (eg 750Mb) firefox hangs before it shows the open/save dialog box. 

However if i take out response.clearheaders and the response.flush in the code it does download but all the files downloaded by firefox are corrupt because the file size is too large.   Filenames are guids but I took the "-" out incase that was an issue.

If any one can shed some light on this I would be very grateful.

Function is Below. 

 

Private Sub StreamFile(ByRef response As HttpResponse, ByVal sFile As String)
            Dim fs As FileStream = Nothing
            Dim sFileName As String = Path.GetFileName(sFile)

            Dim oFile As New FileInfo(sFile)
            Try


                fs = New FileStream(sFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)

            Catch ex As Exception

                LogError(ex)
            End Try


        

             response.Clear()
            'response.ClearHeaders() 'makes file size wrong in firefox
            response.AddHeader("Content-Length", oFile.Length)
           
            'To forcefully download, even for Excel, PDF files, reg

Silverlight Uploading Large File to a ListItem Erroring Out

  

Hi everyone,

 

Having a problem when trying to upload a large file like say 4 megs for a list item via a Silverlight webpart, it is using the Silverlight Client Object Model, I keep getting the following error "The remote server returned an error: NotFound.".

 

It's fine for small files.

 

I've already gone into central admin to see if I can adjust the max upload size, and I've increased it, looked at web.config and increased it as well, recycled the app pool, restarted the website, done everything.

 

What could be wrong?

 

Thanks.


Winston

How to go around the file size issue when uploading large files?

  

Hello,

In my application the user uploads three files ( Resume, Cover Letter, Selection Creteria).

I want users not to upload more then 4 MB files, so In my web.confing file I have allowed max of 5 MB. <httpRuntime maxRequestLength="5000"/>. I did this so that I can validate the file and give user a message that they are trying to upload more then 4 MB file.

It all works fine if the user is only uploading resume. But if the user uploads all three files of size 4MB then my validation does not work and it goes to connection time out.

How can i handle the validation to check the file size of all 3 files?

Thanks



AsyncFileUpload is not uploading the file

  

Hi,

I have added AsyncFileUpload to creata user wizard control. When I tried to upload the file this control seemed to work fine and show confirmation at the end. But when I checked the website no file has been uploaded at all.

Here is the code, please let me know why its not uploading the files/images

<asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"  
 FinishDestinationPageUrl="~/MyPage.aspx"                                     LoginCreatedUser="False" CreateUserButtonText="Add" oncreateduser="CreateUserWizard1_CreatedUser1" 
onfinishbuttonclick="CreateUserWizard1_FinishButtonClick">
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" >
<ContentTemplate>
Controls.......
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Set preferences">
<asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" ThrobberID="spanUploading" OnClientUploadError="

Uploading to SQL Server using AJAX muiltiple file uploader and dynamic SQL Server Tables

  

I am getting an error on the following code when trying to pload files directly to a database.  

 Incorrect syntax near ','.

 Incorrect syntax near 'image'.

 

    Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)

        Dim data() As Byte = New Byte((args.FileSize) - 1) {}

        Dim stream As Stream = args.OpenStream

        stream.Read(data, 0, data.Length)

    End Sub

 

Private Sub ButtonTellme_Click(ByVal sender As Object, ByVal e As EventArgs)

 

        Dim objConn As New SqlConnection("Data Source=mrpoteat.db.2798093.hostedresource.com; Initial Catalog=mrpoteat; User ID=mrpoteat; Password=Colgate23;")

        objConn.Open()

        Dim strCommandText As String = ""

        For index = 1 To Attachments1.Items.Count Step 1

            strCommandText += "pic" + index.ToString() + Space(5)

ASP.NET FILE UPLOAD FAILS

  
I have a requirement that a user can upload as many files as he wish. So i am dynamically generating <input type="file"... and embedding them into form tag, Once user clicks submit button. I see that nothing is uploaded to aspx page. The post data looks like this   -----------------------------19718198955447 Content-Disposition: form-data; name=""; filename="" Content-Type: application/octet-stream You can see that the filename is blank and file content is not posted.   I have set the enctype of my form to 'multipart/form-data', but still the problem persists.   Can someone tell me whats the issue here?    suneeelid2000@gmail.co

Access to path xxx denied when uploading a file using c#

  
Hi I have a file upload app written in c#. The app runs on IIS on a Windows 2003 Server OS. I want the app to upload the file onto the server (The app and the server are on the same machine). This code has been working fine for a long time running on Windows Server 2000, and Windows XP Professional. Now when I moved onto Windows Server 2003, it stopped working. I have given ASPNET account full access to the folder on the server, and it still gives this error. Is this a bug in 2003, and can anybody assist me? Thanks Shane

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

  
Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

Upload large file via webservice problem in vb.net 1.1

  
Hi All, I am uploading large file via webservice using below my code in vb.net 1.1. Problem is vb.net 1.1 don't know Using Object loop. I would like to know any other loop similar Using loop to replace in vb.net 1.1Public Function UploadLargeFile(ByVal FileName As String, ByVal buffer As Byte(), ByVal Offset As Long) As Boolean Dim retVal As Boolean = False Try Dim FilePath As String = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory.ToString() & "\fpath\", FileName) If Offset = 0 Then File.Create(FilePath).Close() End If Using fs As New FileStream(FilePath, FileMode.Open, FileAccess.ReadWrite, FileShare.Read) fs.Seek(Offset, SeekOrigin.Begin) fs.Write(buffer, 0, buffer.Length) End Using retVal = True Catch ex As Exception Throw ex End Try Return retVal End Function  

Uploading a file to a document library produces access denied error, but only on first try.

  
Hi I have a task which uses a custom form which is part of a custom workflow.  The form incorporates an asp fileUpload control to allow a user to browse for a local file which they can then select and it will be upload a file to a folder in a document library.  The first time this action is performed the folder in the document library will not exist so the code creates a folder and then uploads the file to it. The problem I have is, the first time users try and upload a file the directory is created in the document library as expected, but then the user gets redirected to the standard SharePoint Access Denied page.  If the user goes back to the task list, then loads the task web page again, selects the same file and hits upload, then the file is uploaded fine. All subsequent file uploads work fine after that for all users. Users have Contribute permissions on the document library. The code to do the upload is as follows.  The task has a "CR Number" associated with it, which the directory in the doc library should be called.  It uploads the file to a stream.  Then gets the url of the web and works out the file url and uploads it.  The creation and checking of the folder in the doc library happens in the getDirUrl method. /// <summary> /// Processes an uploaded file. /// </summary> /// <param name="

What is the best Hosting model when Uploading Large Files via WCF?

  
I am building a WCF service where besides regular CRUD operations, it porovides methods to upload large (upto 15MB each) files. The service will serve a number of "clients" that will send data to our back-end. Now, while some of the clients are ok with sending one file at time, others would like to be sending these files in batches (i.e. several files at a time).... My questions: What is the best option for hosting this service considering the environment (see below)?  Will IIS be able to support it or will it time out? I know you can increase timeout limit in config file but how will it handle a batch of large files at a time? Is windows service a better option here? What are the dis/advantages of IIS vs Win Srvc in this scenario?  Current Environment: Win 2003 Server w/IIS 6.0 and WCF (.NET 3.5) Thanks in advance!

Problem with uploading a zip file containing xls with macros

  
I am getting the following error when I try to upload a zip file containing xls file with macros. The zip file size is 4 mb. However, we have SP 2010 environment (ready to be deployed in couple of months) and it works there. So, it is not to do with the file. I am not sure if SP 2007 has any limitations/restrictions with .xlsm files. How do I fix this issue ? "GILA_Reports_File_byGTStar_9_2010.zip" contains the following virus: "Large uncompressed size; Tagged ID: C57E7332_69BC_484A_B087_DB04D574CDC4" . This file cannot be saved to the document library. If you want to save this file to the document library, clean the file using alternative virus scanning software and try saving it again.

user.identity.name="0" when uploading file using ajaxToolkit:AsyncFileUpload

  
hi, i am using AsyncFileupload to upload user picture. after the picture is uploaded and saved i opened another page and i noticed that the user.identity.name is lost. any idea 

How to read and analyze a very large log file with high efficiency and performance?

  
It is a very large .txt file (more than 3M), and produced everyday, the content is user's system log like below: 2007-11-01 18:20:42,983 [4520] INFO GetXXX() SERVICE START2007-11-01 18:21:42,983 [4520] WARING USER ACCESS DENIED2007-11-01 18:22:42,983 [4520] ERROR INPUT PARAMETER IS NULL CAN NOT CONVERT TO INT322007-11-01 18:23:59,968 [4520] INFO USER LOGOUT   Any idea? Thanks.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend