Results 1 to 9 of 9

Thread: [RESOLVED] Strange Issues on ASP.NET App

  1. #1

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    830

    Resolved [RESOLVED] Strange Issues on ASP.NET App

    Good Day All

    I have a ASP.NET app. There is a button one of the pages. I have placed a Break point in the Click event and when i click the Button it does not even go to the Break Point it shows this



    Thanks

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: Strange Issues on ASP.NET App

    At a guess have you set the postBackUrl of the button to some other page that does not exist OR maybe some server/config error. Can you show the html & code pages as there is not much to go on
    Last edited by brin351; Nov 12th, 2009 at 03:32 AM. Reason: edit

  3. #3

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    830

    Re: Strange Issues on ASP.NET App

    i resolved this by adding the following line

    Code:
    <httpRuntime maxRequestLength="102400" />
    Thanks for your reply.

    Kind Regards

    Vuyiswa Maseko

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Strange Issues on ASP.NET App

    Hey,

    Can you show the code for what it is you are doing on this page?

    I can't see off hand why you would need to do that, unless you were uploading something to the server.

    Gary

  5. #5

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    830

    Re: Strange Issues on ASP.NET App

    yes i was loading something on the server. Here is the Code

    Code:
        protected void btnImport_Click(object sender, EventArgs e)
        {
            //Check the Filetype 
            String sFiletype;
    
            String sFinename = FileUploadTimetable.FileName;
    
            sFiletype = Path.GetExtension(sFinename);
    
            sFiletype = sFiletype.ToLower();
    
            Boolean Check_Bool = Check_Rules_Before_Upload(sFiletype, FileUploadTimetable);
    
    
            if (Check_Bool == false)
            {
                lblStatus.Text = "Please upload a file first.";
            }
            else
            {
                string xml = string.Empty;
    
                if ((FileUploadTimetable.PostedFile != null) && (FileUploadTimetable.PostedFile.ContentLength > 0))
                {
                    string SaveLocation = Server.MapPath("App_Data") + "\\" + Path.GetFileName(FileUploadTimetable.PostedFile.FileName);
                    //string xmlFn = Server.MapPath("App_Data") + "\\" + Path.GetFileNameWithoutExtension(FileUpload.PostedFile.FileName) + ".xml";
                    try
                    {
                        FileUploadTimetable.PostedFile.SaveAs(SaveLocation);
    
                        StreamReader sr = new StreamReader(SaveLocation);
                        xml = sr.ReadToEnd();
                        sr.Close();
                        lblStatus.Text = CommonFunctions.ExecuteStoredProc("dbo.import_Timetable_Data '" + xml + "'");
    
                        this.CreatePopUpWindow("TimetablePopUpWindow", "TimetableImportReport.aspx");	// create a popup window at starttime
    
                        File.Delete(SaveLocation);
                    }
                    catch { }
                }
                else
                {
                    lblStatus.Text = "The uploaded file is empty.";
                }
            }
        }
    Thanks

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Strange Issues on ASP.NET App

    Hey,

    So that makes more sense then.

    The only thing to mention is whether you want to allow people to upload large files onto your server. Bearing in mind if lots of people are doing this at once, the performance of your application is going to suffer.

    Gary

  7. #7

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    830

    Re: [RESOLVED] Strange Issues on ASP.NET App

    In this Case its a University Application. Only a TimeTabler will do this.

    Thanks

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Strange Issues on ASP.NET App

    Hey,

    Ah, ok, I see what you are getting at. So it isn't something that is available to everyone that uses the site, only people with the correct permissions.

    That makes sense.

    Gary

  9. #9

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    830

    Re: [RESOLVED] Strange Issues on ASP.NET App

    yes

    Thanks for your input

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width