[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
http://www.tiyaneproperties.co.za/SSIS/Strange.jpg
Thanks
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
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
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
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
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
Re: [RESOLVED] Strange Issues on ASP.NET App
In this Case its a University Application. Only a TimeTabler will do this.
Thanks
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
Re: [RESOLVED] Strange Issues on ASP.NET App
yes :)
Thanks for your input :)