I hope one of you clever people can help me with the following problem, go easy on me as I am fairly new to ASP.NET and MS Visual Studio.
I am currently building a webpage which will be used to run a SSIS package. I have built the code to run the package and this works fine. I now want to pass a variable to the package which contains the path of the file to process. Ideally the user will be able to select this file using a 'Browse File' dialog box.
As it stands I have used the 'FileUpload' tag to create the text box and button to allow the user to select the file. I now wish to pass the file path to the SSIS package without uploading the file to the server as these files can be massive. In the code I have attached is a simplified version of what I am trying to achieve which is currently just to pass the filepath to a label but what I find is that when the file is above 4mb the page fails to load after the button is clicked. If the file is less than 4mb then this works fine. I understand that you can change this in the webconfig settings but should I need to change this if I never need to upload the file? Am I approaching this task the right way?
Any help in this matter is much appreciated.
'code snippet for webpag
<form id="form1" runat="server">
<asp:FileUpload ID="fuFileASP" runat="server" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick ="UploadProcess" />
<asp:Label ID="lblMessage" runat="server" Text="Message Box"></asp:Label><br />
'VB code snippet
Protected Sub UploadProcess()
lblMessage.Text = Server.MapPath(System.IO.Path.GetFileName(fuFileASP.PostedFile.FileName.ToString()))