Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I have written an application in C#.net
I have uploaded this to Australia Netregistry windows server.
The page where I have used .net file upload control returns a security error saying that I need to change the trust level to full or high but it's not possible as it is preset by netregistry.
I found out the page below and I realized that I need to use their preinstalled modules to make my website work:
http://www.netregistry.com.au/support/index.php?/article/AA-00408/0/ASP.NET-Cloud-Hosting-developer-checklist.html

I don't really know how to use W3 upload 2.0 in C#.net application.
I need to be able to resize the uploaded image in codebehind and also I want to be able to make sure that the file is uploaded correctly and update a SQL server table with the file name.

Please help me as I need to make this work by the end of today.
Posted

1 solution

Hello Sahar,

Please checkout this[^] link for the sample for w3upload control. This control is from www.Dimac.net and is not a free control. However your hosting provider has made it available for use while hosting apps in their infrastructure.

Regards,
 
Share this answer
 
Comments
Sahar.Aghakasiri 25-Sep-13 2:42am    
Thank you Prasad for your response.

I had seen that link before but the problem is that I don't want to post data to FormProcess page.
I want to be able to handle it in in the same page where my actual form is.
And as I mentioned before, I need to be able to do some other stuff with the chosen file name in code behind.
Also I have problem converting the VBScript code to C# :-$

I will appreciate if you help me more.
Kind regards,
Sahar
Prasad Khandekar 26-Sep-13 9:41am    
Hello Sahar,

The w3upload probably is good for older asp applications. For .NET upload control's saveAs method to work the account under which your ASP.NET application is running must a write access to the folder where you are trying to save the file. Please ask your hosting provider to find out which directory is writable for the hosted application. I am sure they must have one for your account. Once you get the details you can use that folder to save uploaded files. The other method is any way not recommended by Microsoft (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.saveas.aspx).


Regards,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900