Unable to use File upload control in VS2012 IIS Express server

susen

New Member
I am using a File Upload custom control in asp.net. I have created a new web form application in VS2012. The VS2012 is started with IIS Express server as default server. Because of this, the file upload control which I am using in my page is not working, whereas it is working fine when the web form application is configured with Visual Studio Development server. Can anyone please tell me the reason why IIS express server is unable to create a dynamic folder and upload the file and store it in the folder? I am using the below code in my page,\[code\]<code>[Aspx]<cc:UploadBox ID="UploadBox1" runat="server" />[code behind] protected void Page_Load(object sender, EventArgs e) { this.UploadBox1.UploadFolder = GetUploadPath("UploadedFiles"); } //Function definition - This function is used to get the path of destination folderprivate string GetUploadPath(string folderName){return string.Format("{0}\\{1}", Request.PhysicalPath.Substring(0, Request.PhysicalPath.LastIndexOf("\\")) , folderName);}\[/code\]Here, "UploadedFiles" is the destination folder which needs to be created dynamically while rendering the file upload control and the selected file should be stored in the above folder.Please help me for resolving this.Regards,
 
Back
Top