現在、ActiveDirectoryが構築されているネットワークにおいて
ClickOnceを利用してアプリケーションを配置しようと考えております。
ClickOnceは
・インストールモードをオフラインでも利用できるモード
・共有フォルダを利用しての配布
で配置しようとしております。
配布先のクライアントの環境はWindows7Pro(32bit)です。
すでにAdministrator権限にて一度インストール(アプリケーションの配置)を行っており、
したがって必要な動作環境(ランタイムや.NETFramworkは)や
配置したいアプリケーションもインストールできていることは確認しております。
その状態で(動作環境は入った状態で)、PowerUsers権限のユーザでログインしなおして
そのPowerUsersにもアプリケーションの配置を行おうとした場合に下記のエラーが発生しました。
-------------------------------------------------------------------------------------------------------------------------------------------------------
プラットフォームのバージョン情報
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.269
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.269 (RTMGDR.030319-2600)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
ソース
配置の URL : file://10.4.1.4/SalesManagementSystem/application/TopMenu.application
エラーの概要
以下はエラーの概要です。これらのエラーの詳細はログに一覧表示されています。
* \\10.4.1.4\SalesManagementSystem\application\TopMenu.application のライセンス認証により例外が発生しました。 次の失敗メッセージが検出されました:
+ 構成システムを初期化できませんでした。
+ 構成ファイルの読み込み中にエラーが発生しました。: パス 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config' へのアクセスが拒否されました。 (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config)
+ パス 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config' へのアクセスが拒否されました。
コンポーネント ストア トランザクションの失敗の概要
トランザクション エラーは検出されませんでした。
警告
この操作中に警告は発生しませんでした。
操作の進行状況
* [2012/06/15 10:31:34] : \\10.4.1.4\SalesManagementSystem\application\TopMenu.application のライセンス認証が開始されました。
エラーの詳細
この操作中に次のエラーが検出されました。
* [2012/06/15 10:31:34] System.Configuration.ConfigurationErrorsException
- 構成システムを初期化できませんでした。
- ソース: System.Configuration
- スタック トレース:
場所 System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
場所 System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
場所 System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
場所 System.Configuration.ConfigurationManager.GetSection(String sectionName)
場所 System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
場所 System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
場所 System.Diagnostics.DiagnosticsConfiguration.Initialize()
場所 System.Diagnostics.DiagnosticsConfiguration.get_Sources()
場所 System.Diagnostics.TraceSource.Initialize()
場所 System.Net.Logging.InitializeLogging()
場所 System.Net.Logging.get_On()
場所 System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
場所 System.Net.WebRequest.Create(Uri requestUri)
場所 System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
場所 System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
場所 System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
場所 System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
場所 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
場所 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
場所 System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
場所 System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- 内部例外 ---
System.Configuration.ConfigurationErrorsException
- 構成ファイルの読み込み中にエラーが発生しました。: パス 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config' へのアクセスが拒否されました。 (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config)
- ソース: System.Configuration
- スタック トレース:
場所 System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
場所 System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
場所 System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
場所 System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- 内部例外 ---
System.UnauthorizedAccessException
- パス 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config' へのアクセスが拒否されました。
- ソース: mscorlib
- スタック トレース:
場所 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
場所 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
場所 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
場所 System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName)
場所 System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions)
場所 System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName)
場所 System.Configuration.ClientConfigurationHost.OpenStreamForRead(String streamName)
場所 System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
コンポーネント ストア トランザクションの詳細
トランザクション情報はありません。
-------------------------------------------------------------------------------------------------------------------------------------------------------
例えば、このPowerUsersをAdministratorsのグループに入れてやると、上記のエラーは発生せず、問題無くインストールできます。
また、他のクライアントについて、OSがWindowsXPSP3(32bit)のものは
PowerUsersであっても問題無くインストールできます。
Windows7のPowerUsersにおいて発生している現象だと思われます。
解決に向けて、どなたかアドバイス頂けないでしょうか?
自分なりに調べたところ、UACの影響でWindows7のPowerUsersの内容が
WindowsXPのころと変わっているようで(これが原因?)
また、回避方法としてClickOnceアプリケーションを管理者として実行しようとしても
仕組み上かなり難しい(というか不可能?)のようで、八方ふさがりの状態です。
必要な情報があれば、調べますので、アドバイスお待ちしております。
よろしくお願い致します。
解決致しました。
単純にmachine.configファイルにUsersの読み取り実行権限が付与されていないことが原因でした。
ツイート | ![]() |