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

Why need a temp folder when you upload directly to database

5 Answers 356 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Rajesh Krishnamohan
Top achievements
Rank 1
Rajesh Krishnamohan asked on 21 Mar 2011, 09:28 PM
Hi there,

I am trying to implement something like this

http://demos.telerik.com/aspnet-ajax/upload/examples/async/imageuploader/defaultcs.aspx?product=asyncupload

It works great on my local, but when deployed in IIS 7, it throws a security error

System.UnauthorizedAccessException: RadAsyncUpload could not create App_Data\RadUploadTemp folder. Ensure the App_Data folder is writable or set the TemporaryFolder property to a writable location.     at Telerik.Web.UI.RadAsyncUpload.CreateTempFolder()     at  

While I know how to fix the security issue, I really do not want the AsyncUpload tool to write to any local folders [due to various deployment environment constraints]

Any idea why this is happening?

Here's my code in the markup

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" HttpHandlerUrl="~/lib/Upload.ashx" >
</telerik:RadAsyncUpload>

5 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 24 Mar 2011, 03:36 PM
Hello Rajesh Krishnamohan,

If you are using Silverlight to upload a file, the file is divided to small chunks which are uploaded and reassembled into the AsyncUploadTemporary folder.

If you are using Flash or IFrame the file is uploaded into an ASP.NET temporary folder and after that is moved to the AsyncUploadTemporary folder. That difference to upload process with Flash/IFrame is because we have no control of the overall upload process. If you want to disable upload with Silverlight please add this snippet to your code:
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function () { return false; };

Regards,
Peter Filipov
the Telerik team
0
Kishor
Top achievements
Rank 2
answered on 01 Mar 2021, 06:08 AM

Hi Team,

I am facing issue while upgrading the telerik dlls .

Old version is "2015.3.1111.45" and new version is "2020.3.1021.35"

My application is hosted in IIS and when i try to replace new dll in bin folder i get error " could not load the assembly 2015.3.1111.45"

i dont know from where its refering this old dll even i have deleted from bin folder.

I check that there is dll present at below location

C:\windows\Microsoft.Net\Framework\v4.0.30319\Temporary ASP.NET Files\_Layouts_esub\ee228841\6a3b82e\dl3\211cd89d.

Can any guide how to deploy dll at above location.

 

0
Rumen
Telerik team
answered on 01 Mar 2021, 08:01 AM

Hi Kishor,

The problem is most likely related to the licenses.licx file. 

Please delete its content as instructed in the following KB article: https://www.telerik.com/support/kb/aspnet-ajax/details/how-to-fix-license-file-related-errors, e.g.

Could not load file or assembly 'Telerik.Web.UI, Version=20xx.x.xxx.xx, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))' 

you can solve them by:
  • Deleting the contents of the license.licx and making it read only
  • Or deleting the whole license.licx file and rebuild
  • Or right-clicking the Telerik.Web.UI.dll file in Windows Explorer, select Properties, and then click the 'Unblock' button on the General tab near the bottom.
  • Or if your app is under the source control to make it ignore the license file so any changes on a developer machine won't make it into the build machine or anywhere elsewhere.

 

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Kishor
Top achievements
Rank 2
answered on 01 Mar 2021, 10:13 AM

Hi Rumen,

Thanks for the prompt reply.

Details of issue further.

My application is running in SharePoint 2013 Production server with old dlls (2015.3.1111.45)

I have published all files in location (C:\Esub\WepApplication\Web\ ..All files including dlls)

And this is hosted in IIS 

So when I replace the latest version of telerik dlls(2020.3.1021.35)  in below location "C:\Esub\WepApplication\Web\bin\Telerik.Web.UI.dll" i am getting error.

"Cannot Load assebmly "Telerik.Web.UI, version=2015.3.1111.45, the located assembly's manifest definition does not match the assembly reference

 

Also when when I try to add old dll in bin folder (C:\Esub\WepApplication\Web\ bin)

same dll gets deployed automatically at below location when i refresh application home page.

C:\windows\Microsoft.Net\Framework\v4.0.30319\Temporary ASP.NET Files\_Layouts_esub\ee228841\6a3b82e\dl3\211cd89d.

But when i added latest telerik dll in bin folder then dll is not deployed in the given location.

May i know from where its reference is coming in the error.

To add further there is no safe control assembly added in web.config still its working for old dll.

Also in the solution no where version details are mention.

waiting for reply as i am stuck from long time .

0
Rumen
Telerik team
answered on 01 Mar 2021, 04:20 PM

Hi Kishor,

Assemblies for SharePoint have to be registered in the GAC and not deployed in the Bin Folder. That would not have any effect.

You wrote that you added the new DLL to the Bin folder and only then the error appears. Would it be that you has the old assemblies in the GAC, registered as SafeControls in the Web.config but not the new ones.

The gacutil is located at the "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX [xyz] Tools\" folder.
You can open a Command Prompt to that directory then register the assembly as follows:
It will deploy a copy of the Assembly to the "C:\Windows\Microsoft.NET\assembly\" folder. You will notice if you navigate to this folder if Telerik.Web.UI folder exists. If so, which versions are already deployed?
If you have it right, the next step is to check whether he has registered the Assemblies as SafeControls in the Web.config file with correct versions and there are no multiple versions declared.

You must also register the tagprefix on the page you places the controls into:

Command to list all Assemblies in the GAC: gacutil -l

Event better, list all assemblies into a TextFile: gacutil -l > "C:\gacAssemblies.txt"

Furthermore, when deploying the app, you can avoid copying the DLLs by changing the Copy Local: false. In the Assembly properties.

SharePoint always and always looks inside the GAC and this is the way to go.

You can also check this article from the docs: https://docs.telerik.com/devtools/aspnet-ajax/sharepoint/2013/installation-and-deployment/deploying-telerik-ui-for-asp.net-ajax

 

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
AsyncUpload
Asked by
Rajesh Krishnamohan
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Kishor
Top achievements
Rank 2
Rumen
Telerik team
Share this question
or