This is a migrated thread and some comments may be shown as answers.

Upload errors on Deployment machine.

6 Answers 93 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Stephen Rouse
Top achievements
Rank 1
Stephen Rouse asked on 20 Apr 2011, 09:34 AM

I have an upload application that works on my development machine, but does not work on my "staging" server, which is a windows 2008 R2 Web server. I have checked every setting that I can think of, against the same setting on the development machine, they alll match. However, I get an error when trying to upload the photos. I have followed your instructions in the KB about troubleshooting the issue, and my comments are attached. Is there anything else I can try, I am looking at logging steps within the handler to troubleshooting this.I had some screen prints in the word document, see attached, which did not get "pasted" into this control.

Test the upload handler in your browser - navigate it to the full path of the handler:
You should see the following output if everything is done correctly:

 

Yes, I can see the same, see above.

  • Absolute Path for upload handler.
    If you initialize the UploadServiceUrl property with a full-path value like:
    UploadServiceUrl = "http://localhost:6242/MyUploadHandler.ashx"
    then you will not be able to access it after the deployment.
    To resolve this issue you should use a relative path:
    UploadServiceUrl = "~/MyUploadHandler.ashx"
    or:
    UploadServiceUrl = "../MyUploadHandler.ashx"

Tried; ~/Images.ashx, /Images.ashx, Images.ashx, ../Images.ashx. All with the same result, set up a database table to change the address of the upload handler, tried all of the previously noted options.

  • Upload Storage directory.
    Check the existence of the storage directory. Ensure the upload handler has credentials to write in it.
    Actually, there are two properties to set the name of the storage directory:
    • TargetFolder: use this property if the storage folder is relative to the upload handler:
      TargetFolder="MyStorageFolder"
    • TargetPhysicalFolder: use this one with full path of the storage folder
      TargetPhysicalFolder="C:\Uploaded_Music\New_Upload"

If both TargetPhysicalFolder and TargetFolder are set, the TargetPhysicalFolder will take precedence.

 

Ensured that “everyone” has read/write access to the share, and set the folder up as a virtual folder.

Using Full Trust, therefore irrelevant.

  • Cross-Domain issue.
    In order to increase the security, Microsoft restricted the cross-domain service call in Silverlight. If your Silverlight application and Upload handler are on different domains than you definitely will enter the cross-domain case. In this case you should deploy a client access policy file. Actually, you have a choice to deploy the native to the Silverlight clientaccesspolicy.xml file, or the adopted (from Adobe Flash) crossdomain.xml. More about this case you can find in following links: link-1, link-2, link-3, link-4.

In the same domain.

 

  • Window 7 and IIS Security Exception.
    If the upload handler is hosted on Windows then you can experience the Security Exception issue. This is due to the default settings of the IIS in Windows 7. Below, you can find both the explanation and the resolution:
    • Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permissions please contact your system administrator or change the application's trust level in the configuration file.
    • Exception Details: System.Security.SecurityException:Request for the permission of type 'System.Web.AspNetHostingPermission,...
    • Cause: Microsoft changed the default setting of the Load User Profile setting of the application pools in Windows 7 and Windows 2008 (the older one was True, in IIS7.5 it is False).
    • Suggested solution: Open the Advanced Settings of the Application Pool and set the Load User Profile property to True.

Tried both true and false setting, no exception as described above.

  • Antivirus and Indexing services.
    Yes this one is a common yet mystery case. Sometimes upload succeeded sometimes break with exception like "Handler not found", "Handler not found or execution of the handler failed" or "File is not accessible". If these services are intentionally active then the only resolution is to upload files with different extension (for example ".radupload") and renamed again only after successful upload. Of course the chosen file-extension should be excluded from the services' spectrum.

No anti-virus on the machine and indexing disabled on the directory.

6 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 26 Apr 2011, 07:21 AM
Hi Stephen Rouse,

I apologize for the delayed response. We are going to test this and deploy a test applciation on a Windows Server 2008 R2 machine. What is the environment on your development machine?

All the best,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stephen Rouse
Top achievements
Rank 1
answered on 26 Apr 2011, 08:37 AM
Windows 7 Ultimate (32 Bit), IIs 7.5, 4Gb, Visual Studio 2010. I have downloaded all patches (Operating System and Telerik etc). I have been working on this and have found that the upload works, but returns an error on the "staging" machine, whereas everything is ok on the Development machine.

I have used fiddler to look at the differences between the two, however the last "message" on the staging machine is always the connection to the ashx "page".
0
Stephen Rouse
Top achievements
Rank 1
answered on 26 Apr 2011, 11:48 AM
Further investigation reveals that the error appears to occur when I am "downloading" the photos/pictures uploaded into a coverflow for classification by the end user. I have looked at the examples for a coverflow etc, and cannot see what I am doing incorrectly, at the moment. I will continue to investigate and advise if I fix it or not.
0
Stephen Rouse
Top achievements
Rank 1
answered on 26 Apr 2011, 03:55 PM
Everything appears to work, apart from returning the images to be viewed in the coverflow on the staging machine, I cannot see where I am going wrong with this so will change the strategy to use another control, until I can spend more than 48 hours on this.
0
Alex Fidanov
Telerik team
answered on 29 Apr 2011, 08:22 AM
Hello Stephen Rouse,

Thank you for the feedback. We are also not sure why this is causing the upload to work incorrectly. It would be great if you shared any further information with the community. Some other people reported similar behavior and this could be helpful to them.

Kind regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stephen Rouse
Top achievements
Rank 1
answered on 14 May 2011, 11:06 AM
Ok I have now resolved this issue, although I actually completed it last week, been too busy to post on here. As in my previous posts, the upload was working I just could not see the photos upon return to the dialog, where I displayed each photo for commenting on. I used fiddler intensly to watch what was being returned. I could not see anything that was "incorrect", no requests for the policy file(s) etc.

I decided to add a converter to provide the full URL to the coverflow, and this time it worked!!! So I tried it on another staging machine and it worked on there as well. So it appears that the relative address was for some reason not "working", not going to research this anymore, signed off the issue on my side!

Tags
Upload
Asked by
Stephen Rouse
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Stephen Rouse
Top achievements
Rank 1
Share this question
or