开发者

Downloading exe.config file from clickonce with WebClient class problem

开发者 https://www.devze.com 2023-01-23 12:44 出处:网络
I\'m downloading from clickonce server new versions of files by my autoupdater.However, any time downloading cycle comes over MyApplication.exe.config file on the server webClient.DownloadFile(remoteF

I'm downloading from clickonce server new versions of files by my autoupdater. However, any time downloading cycle comes over MyApplication.exe.config file on the server webClient.DownloadFile(remoteFile, localFile) throws a System.Net.WebException with code 500 (internal server error or something like that). At the same time application event log renders few entries from asp.net, like

  1. failed to initialize AppDomain /LM/W3SVC/1/ROOT Exception: System.Configuration.ConfigurationErrorsException

  2. asp.net process id doesn't have permission to access GAC

  3. aspnet_wp.exe stoped.

But the cycle continues successfully for all other files.

Does it somehow figures that it is config file for a web server, since asp.net is .NET framework itself and "knows" 开发者_StackOverflow中文版about .config file?


As was already mentioned in the other answer, IIS will not serve .config files. Where my answer is different is the proposed work around: ClickOnce has an option to use .deploy files, where all your file names have a .deploy extension appended to them. This neatly gets around the IIS config transfer problem.


IIS, by default, does not serve up .config files. Do you have access to the IIS configuration on the ClickOnce server, so that you can see if .config is disallowed in the request filtering module?

In IIS 7, it's in Request Filtering in the IIS section. I'll see if I can find where that's configured in IIS 6.

0

精彩评论

暂无评论...
验证码 换一张
取 消