GridWeb が一時セッション ファイルを保存するパスを指定します
Contents
[
Hide
]
GridWeb セッション モードが ViewState の場合、一時セッション ファイルはアプリケーション ベース ディレクトリ内に格納されます。 Application Base Directory に書き込み権限がない可能性があるため、一時セッション ファイルをそこに保存しても問題ない場合があります。そのような場合、GridWeb はそのような例外をスローします。
[UnauthorizedAccessException: Access to
the path 'D:</span>inetpub</span>wwwroot</span>AsposeExcelTest</span>gwb_tempGridWeb1' is denied.]
上記の問題の解決策は、Application Base Directory への書き込みアクセス権を付与するか、GridWeb.SessionStorePath プロパティを使用して書き込みアクセス権を持つ GridWeb 一時セッション ファイル パスを変更することです。このパスは、アプリケーション ベース ディレクトリからの相対パスである必要があります。
GridWeb が一時セッション ファイルを保存するパスを指定します
次のサンプル コードは、GridWeb が一時セッション ファイルを格納するパスを指定します。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
GridWeb1.SessionStorePath = "mytempdir/session"; |