Hi
I am use GroupDoc viewer in website in asp.net.Currently i heard about rotation function is enable in viewer,it very useful.
Here i explain my need.
I am create one website,in that user register and login any time,So based on userid i will create one temp folder
For E.x
if user ‘a’ login and it id is U001 and following is temp folder
C:\inetpub\wwwroot\website\UF\U001
if user ‘b’ login and it id is U002 and following is temp folder
C:\inetpub\wwwroot\website\UF\U002
Currently i am use this temp folder for store file and view using iframe(only pdf can view).GroupDoc view more than 50 format,so i try GroupDoc viewer.
What support team told me ,need to set 'SetRootStoragePath ’ in global.asax page in Application_Start method.So what happen here,all file store in same place and view to different user.But i cant delete this file once user logout.
So i try to create separate folder based on userid and i point to SetRootStoragePath to separate folder based on userid(above i mention folder).So i set SetRootStoragePath in aspx page,bcz i get user id in aspx page,so first i create that folder path
Dim viewPath As String = Server.MapPath(“.”) & “\UF”
Try
If Not Directory.Exists(viewPath) Then
Directory.CreateDirectory(viewPath)
End If
Catch ex As Exception
End Try
viewPath = viewPath & "" & Session(“userid”)
Try
If Not Directory.Exists(viewPath) Then
Directory.CreateDirectory(viewPath)
End If
Catch ex As Exception
End Try
Groupdocs.Web.UI.Viewer.SetRootStoragePath(viewPath)
So now filesave path is viewPath
like this
if user ‘a’ login
C:\inetpub\wwwroot\website\UF\U001
if user ‘b’ login
C:\inetpub\wwwroot\website\UF\U002
Finally file save in separate folder and gropdoc viewer create temp,processing,cache folder and png,js file.Once user logout i can delete folder based on userid who log out.
But what i face,one time can view ,next time cant view,it show path error.
Server Error in ‘/webFT_LoadMore’ Application.
Value cannot be null.
Parameter name: path2
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: path2
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18056
Regards
Aravind