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
failed to initialize AppDomain /LM/W3SVC/1/ROOT Exception: System.Configuration.ConfigurationErrorsException
asp.net process id doesn't have permission to access GAC
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.
精彩评论