Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Can't host ClickOnce app in IIS because it won't download the config files
 

Can't host ClickOnce app in IIS because it won't download the config files

Hi,

I have built a ClickOnce application where I have unchecked the use deploy extension because I was previously getting an error when I was updating the app using mage: "my.exe.deploy is not a valid entry point". I have everything working now without using the deploy extension but when I host it in IIS, it gives me a 403.1 Forbidden error. That makes sense because config files are not allowed to be downloaded by IIS.I would like to override this behavior and allow my application config file to be downloaded. I have found an example on several posts but it doesn't work. I am running II6 on W2K3. Any ideas on how to allow *.config to be downloaded?

Here's the example that doesn't work:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpHandlers>
<remove verb="*" path="*.config" />
<add verb="*" path="web.config" type="System.Web.HttpForbiddenHandler" />

</httpHandlers>
</system.web>
</configuration>

Thanks,
Mike

blog - http://www.codesmartnothard.com
MikeDouglas  Monday, June 22, 2009 12:49 PM
Hi RobinDotNet,

Thanks for the reply. I agree that the work around wasn't ideal. Using mage, it wouldn't let me update the manifest when the assemblies had the .deploy extension. It turns out I was missing the GenerateDeploymentManifest task. This looks like itwill let me update the files and rename the files to .deploy and it will work. I'm still testing but it is looking promising. Here's a great post outlining all of the steps.
http://hakanforss.spaces.live.com/blog/cns!27CCB0417E50BA2!1635.entry

Thanks,
Mike
blog - http://www.codesmartnothard.com
  • Marked As Answer byMikeDouglas Tuesday, June 23, 2009 3:18 AM
  •  
MikeDouglas  Tuesday, June 23, 2009 3:18 AM
Hello, MikeDouglas,

Mage should not make you uncheck the deploy option. If you don't have the deploy option selected, and the files renaming as .deploy, you will find it very difficult to find anyone who will install your application, because their firewall will most likely stop any .dll or .exe files.

And for God's sake, I wouldn't try to figure a workaround on your webserver for this; you'll open up yourself to all kinds of security risks.

Just my two cents' worth.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Tuesday, June 23, 2009 12:38 AM
Hi RobinDotNet,

Thanks for the reply. I agree that the work around wasn't ideal. Using mage, it wouldn't let me update the manifest when the assemblies had the .deploy extension. It turns out I was missing the GenerateDeploymentManifest task. This looks like itwill let me update the files and rename the files to .deploy and it will work. I'm still testing but it is looking promising. Here's a great post outlining all of the steps.
http://hakanforss.spaces.live.com/blog/cns!27CCB0417E50BA2!1635.entry

Thanks,
Mike
blog - http://www.codesmartnothard.com
  • Marked As Answer byMikeDouglas Tuesday, June 23, 2009 3:18 AM
  •  
MikeDouglas  Tuesday, June 23, 2009 3:18 AM

You can use google to search for other answers

Custom Search

More Threads

• What is the best way to handle multiple dependencies among managed .EXEs and DLLs in setups in VS2005?
• Moving ClickOnce Deployment Location
• help: update for setup
• Help needed with deployment scenario
• Publishing a windows application to a sharepoint website
• Global assembly cache error while publishing
• USERPROFILE variable blank
• How can I overwrite the previous clickOnce deployment (rather than piling on new ones)?
• How to identify already installed version of same application
• Logging in ClickOnce - looking for a general advice