File Upload Stopped Working - Only Working For About 100KB
Jan 10, 2010
Until the Dec 29th my website was working fine. Then My fileupload problems started happening. My fileupload page would simply quit and say the page can not be found. I maximized all my timeout settings and that did not work. I called my hosting company and apparently they have no problem using my page to upload files from their geographical area. So then I concluded it might be a network problem. I ran a trace route and could not really figure out where the problem was. So, I have no idea what is going on. Is it possible that my site is being blocked by some black list out there somewhere?
I have a web application which has 2 different versions deployed. 1 is an ASP.Net web forms version and the other is an ASP.Net MVC version
I have a File Upload page which dynamically creates a directory folder for the target location of the file to be uploaded to.
The application is using Forms Authentication for outside users and Integrated Windows Authentication for inside the network users.
I have an issue where a user can upload a file in the ASP.Net Web Forms version fine. But when the same user tries to upload the file in the MVC version the user gets a File.IO permission error.
Here's the kicker: I can upload the same file in both versions. The user is in a remote location but I believe they're still inside the network because they can work on the other parts of the application just fine.
Possible clues: In the event log there's an info that says Event code:4005 Forms authentication failed for the request. Reason: Ticket supplied was invalid.
What would be your initial thoughts on why this is happening?
Am in the middle of developing 2 projects and my AJAX Toolkit has stopped working, which is also stopping my designer filers being generated. Have the same problem in both projects. A sample error is below: Warning 3 Generation of designer file failed: Unable to create type 'cc1:CollapsiblePanelExtender'. Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
C:UsersHuwDocumentsMy Web SitesRegent2Regent2Master.Master 169 0 Regent2
I'm trying to use below simple code for ajax postback. With file upload, neither javascript the "function startRequest" ever triggers, the file control shows null value somemore.Earlier I had Update progress which didn't work with file upload ever so I removed it. Now I just want to disable the button as the file is uploaded and its inputs are processed in the background. Once the response comes back, the "submit" button is re-enabled.But the file-upload with Updatepanel doesn't work at all. What am I doing wrong,
I have a form with a few fields that the user has to fill, and then an upload field that allows the user to upload their article (I haven't added the code to check for file size and format yet; trying to get it to save first!)
For some reason, the click event of the button doesn't run, and I don't get any exceptions or such. Here's the .aspx file:
<%@ Page Language="C#" AutoEventWireup="true" title="Submit an Article" CodeFile="SubmitArticle.aspx.cs" Inherits="SubmitArticle" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">
iam using masterpage and ajax update panel, i have child page called fileupload.aspx,i try to upload the file but its not working , can i use updatepanel in child page.
I have a web app that allows users to upload images. Last week, all was well. This week, it appears the code is breaking. Here is the code:
Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click If FileUploadControl.HasFile Then Dim month As String = ddlMonth5.SelectedValue Dim year As String = ddlYear7.SelectedValue ' Dim whatis As String = FileUploadControl.PostedFile.ContentType Try If (FileUploadControl.PostedFile.ContentType = "image/jpeg") Or (FileUploadControl.PostedFile.ContentType = "image/pjpeg") Or (FileUploadControl.PostedFile.ContentType = "image/gif") Or (FileUploadControl.PostedFile.ContentType = "image/x-png") Then Dim fs = New FileStream(FileUploadControl.PostedFile.FileName, FileMode.Open, FileAccess.Read) 'save file with new size Using image As System.Drawing.Image = System.Drawing.Image.FromStream(fs) Using bitmap As New Bitmap(image) bitmap.Save("C:WebsitesimagesCusRespData.jpg", image.RawFormat) bitmap.Save("C:Websitesimages" & month & year & "CusRespData.jpg", image.RawFormat) End Using End Using StatusLabel.Text = "Upload status: File uploaded!" fs.Close() fs = Nothing Else StatusLabel.Text = "Upload status: Only .jpg,.jpeg,.gif and .png files are accepted!" End If Catch ex As Exception StatusLabel.Text = "Upload status: The file could not be uploaded. The following error occured: " & ex.Message End Try StatusLabel.Visible = True End If End Sub
On the development side, I see this error: The file could not be uploaded. The following error occurred: Could not find a part of the path. On the production side, this occurs: The following error occured: A generic error occurred in GDI+.
I've just upgraded a visual studio.net 2003 project (asp.net 1.1) to visual studio.net 2010 (asp.net 4.0). I'm encountering a problem with viewing Crystal reports. I'm using Visual Studio Development Server as a Web Server.
When I try to create a new report (via code that worked fine previously) the line below causes the webserver40.exe to crash.
Protected WithEvents MyRep As New CrystalDecisions.CrystalReports.Engine.ReportDocument
I'm just getting started with MVC and I created a new MVC 2 C# project. Visual studio defaults it to .net 4 but since my hosting provider is still on 3.5 I went into properties and set my project to target .net 3.5. However when I did this a piece of my code stopped working.
I have an HttpHandler which takes care of 404 errors, which I implemented years ago as a way of doing url routing. If the request maps to a valid page, it redirects to that page. Otherwise, it returns a 404. (I know I should start using the new routing feature of asp.net 4.0, but that will take some time. I need to get this working asap.)
In IIS6, I have mapped the 404 error to "/404.ashx". In the web.config, custom errors are set up like so:
This has been working for years - it stopped working as soon as I changed the site to use asp.net 4.0. Everything was recompiled for 4.0, and there were no code changes.
Now, when I hit one of these urls that used to work, I get a blank page with a 404 error code. If I remove the IIS 404 error mapping, I get a regular old 404 page. It seems that the httphandler is not being called.
I have other http handler which are working fine. I figure there must be some configuration setting I missed or something like that. Naturally, this is a problem only on my production server, so I can't run it in the debugger to see what is happening.
I have some services deployed on [URL]I want to move them to [URL]. I have [URL] physically hosted & has its own web.config file. No inheritance issues...
I configured the subdomain (through my host--I don't actually own the web server) so that the subdomain is physically hosted & made sure it's running as an IIS application.
When the services lived on [URL], I used the following address prefixing in web.config:
[Code]....
Now that they're on [URL], I modified the web.config to read:
I'm having a problem with my 3rd cascading dropdown no longer displaying the list. I've obviously made a change somewhere but I cannot see it so I'm hoping some extra eyes will spot the problem. If it matters, I am using VWD 2010 Express, SQL Express, .NET 4.0I have checked the datasets and they are returning the proper list based on the input criteriahere is the pertinent code:
I have a simple file input field that utilizes a File.Copy routine to move the file from the local store to the server. This part of the application works fine in staging but in production I had to establish a work around in order to get it to work. I have the users do a Save As on the file they want to upload and then slightly change the name of the file and then it will upload. I do not have to do this in staging with the same file in order for it to work. I am racking my brain as to whether this is a permissions issue or code issue or what.
i have a fileUpload in my web page but it's not supporting all files eg:
when i browse xls file it's working for small size files but when i go for a little bigger files let's say 50-60k it won't work and will give me an offline web page, i have tried the input HTML on server mode and still having the same problem.
I have a c# control class inside of a dll, then this control is embedded in a web page in an asp.net application by using the object tag. When the dll is compiled with .net 3.5 sp1 and the web application also runs in .net 3.5 sp1, the code works fine. But when the dll is compiled in .net 4.0 and the web application runs in 4.0, the control does not show up in the web page. All I see is a box with an object icon in the upper left corner.
I have a .net 1.1 ASP application (domain.com) which has a .net 2 virtual directory (domain.com/v2) beneath it, both applications run within their own app pool on the same Windows Server 2003 machine running IIS 6. The web.config files for both apps are setup for Forms Authentication as described here - [URL]
Users would be directed to the domain.com/v2/login.aspx page which would authenticate for both applications, this configuration has been working fine for the last few years until installing one of the recent Windows 2003 security updates today. Now after authenticating under /v2 users keep getting redirected back to domain.com/v2/Login.aspx as domain.com doesnt see them as authenticated anymore.
which security update would have caused this and if its possible to fix or rollback?
I had the strangest bug yesterday while trying to debug in vs.net 2005....
I had an '05 web application. I clicked the "Run" button to start debugging, and the webpage popped up fine. I could run through the pages fine. Everything seemed fine....UNTIL!
Until I tried to start inserting breakpoints into my code. The application ignored them. In addition, I noticed my little green visual studio "Start Debugging" arrow (which is normally greyed out while in debug mode) was green. It was as if visual studio completely detached itself from my website I was trying to debug.
After playing around with it for a while, I realized I also had a vs.net 2008 solution open as well. My '08 solution wasn't in debug mode or anything, it was just sitting there open. I just happened to close it, not thinking anything of it, and presto! My 2005 debugger started working again!
So basically, I can't debug an '05 solution (or at least a web solution, as that's all I tried) while I also have an '08 solution open.
I have added autocompleteextender in page . It was working without parameters , when i have added parameters "pretext","count" it stops working. below are my code :
<div> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/Admin/WebService1.asmx" /> </Services> </asp:ToolkitScriptManager> <asp:TextBox ID="TextboxCompletelist" runat="server"></asp:TextBox> <asp:AutoCompleteExtender ID="TextboxCompletelist_AutoCompleteExtender" runat="server" ServiceMethod="GetCompletionList" Enabled="True" ServicePath="~/Admin/WebService1.asmx" TargetControlID="TextboxCompletelist" CompletionSetCount="10"> </asp:AutoCompleteExtender> </div> namespace AgentService [WebService(Namespace = [URL] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] [System.Web.Script.Services.ScriptService] public class WebService1 : System.Web.Services.WebService { [WebMethod] public static string[] GetCompletionList(string PrefixText, int count) { string countryname; SqlParameter[] parm = new SqlParameter[1]; parm[0] = new SqlParameter("@PrefixText", PrefixText); DataTable dt = SqlHelper.ExecuteDataset(AppSetting.ActivateConnection, CommandType.StoredProcedure, "FetchAutoCompleteStates",parm).Tables[0]; List<string> items = new List<string>(); for (int i = 0; i <= dt.Rows.Count-1; i++) { countryname = dt.Rows[i]["statename"].ToString(); items.Add(countryname); } return items.ToArray(); }