none
ClickOnce Could not download 'setup.exe' from http://ServerName/mywinapp/

    Question

  • Hi,

    I migrated my windows application from VS 2k8 to VS2010, I changed the Target framework to .NET Framework 4.0 from the Advanced Compiler Settings then I tried to publish it to the server as clickonce application runs online only, I'm getting the following build output message.

    Could not download 'Setup.exe' from http://ServerName/mywinapp/

    Could not download 'dotnetfx40client/dotNetFx40_Client_x86_x64.exe' from http://ServerName/mywinapp/

    After publishing I tried to run the application on my development machine it works fine, when I try to run it on a different machine even the server (where the application has been published) it doesn't work, I'm getting Page cannot be found error (See below) everytime I try to click the Run button the web address in the address bar after clicking Run button is http://ServerName/mywinapp/Setup.exe

    I found this link but it didn't work http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/353a03ae-badd-49d4-8f13-6b9680ee1f9b/

    any other ideas?

    appreciate all the help, Thank you

    The page cannot be found

    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    Please try the following:

    • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
    • Click the Back button to try another link.

    HTTP Error 404 - File or directory not found.
    Internet Information Services (IIS)


    Technical Information (for support personnel)

    • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
    • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.

     

     


    Codernater
    Tuesday, February 08, 2011 3:41 AM

Answers

  • if I browse on the setup.exe with Execute Permissions set to Scripts and Executables it will give HTTP Error 404!

    If I change the Execute permissions to Scripts only and Browse on it it works by showing the Run dialog box!!!


    Codernater
    • Marked as answer by Codernater Friday, February 11, 2011 2:58 PM
    Thursday, February 10, 2011 9:58 PM

All replies

  • Here is an update on the status of this issue.

    First Let me list the specs:

    -Windows Server 2003 Standard Edition Service Pack 2

    -IIS 6

    I'm still having the issue about Could not download 'setup.exe' everytime I publish clickonce application. Then i realized that the file setup.exe it's being written on the server.

    If I go on the IIS and open properties dialog box for my application name (under Default Web Site) and change Execute permissions to Scripts only, the user won't receive the 404 Error and will be able to proceed with the download and have the application loaded.

    If I try to publish a new version with the Execute Permissions set to Scripts Only the publish method from Visual Studio will error out basically not allowing me to write the files to the server because It's Scripts only.

    When I change the Execute Permissions to Scripts and Executables my publish method from Visual Studio will succeed but again with the error Could not download 'setup.exe', I gotta also make sure to go back to the IIS and change the Execute Permissions to Scripts Only in order for the user to run the applicaton!

    I don't know what's triggering this behavior!

    Thanks

     

     

     


    Codernater
    Tuesday, February 08, 2011 8:59 PM
  • Hi Codenater,

    Base on your description, I am not sure why it happens, but it maybe ralated to the server. It seems that you have solved the problem about "The page cannot be found".

    You can refer to this link, http://www.windows-tech.info/3/a6964c8cd8c72b8c.php, but I do not know whether it can help you. And I will do more research on it. Thanks.

    Sincerely,
    Vin Jin


    Vin Jin [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 09, 2011 8:32 AM
  • First, you need to check the MIME type for ClickOnce deployment. Here is a blog written by one of Microsoft MVP.

    Do you use IE to run the ClickOnce app? If you are using some other web browser such as Google chrome, you might see this error. If you use firefox, you need to install Microsoft .NET Framework Assistant extension.

    > Could not download 'dotnetfx40client/dotNetFx40_Client_x86_x64.exe' from http://ServerName/mywinapp/

    This seems it needs to install .net framework 4.0. I should mention that .net 4.0 is different from .net 2.0. It uses the new .net core. If you target your app to .net 4.0 without using any new feature of it, you are still told to install .net 4.0. What about if you target to .net 3.5 or older version and uncheck .net 4.0 prere checkbox? 

    Sincerely,
    lqian2
    Previous MSFT


    Senior Technical Consultant. Helping Others, Grow Yourself!
    Wednesday, February 09, 2011 2:21 PM
  • Unpropose it please! This is just a troubleshooting step not an actual answer. I am still waiting for customer's clarify. 
    Senior Technical Consultant. Helping Others, Grow Yourself!
    Thursday, February 10, 2011 1:37 AM
  • Hi Myexp,

    I've been ruminating on your post. I no longer have an IIS 6 machine so I can't check the server settings for my C/O deployments.

    The message you're getting that it can't download those files is probably happening in the publish step from VS where it tests to see if it can retrieve the files. I think you can turn this off, but I wouldn't recommend it, because it helps highlight when you have a problem. (Like now.) I assume you are selecting "retrieve prerequisites from same place as application" and not "retrieve prerequisites from vendor".

    There's nothing in the upgrade to VS2010/.NET 4 that I can think of that would cause these kinds of problems. I've done upgrades to .NET 4 and haven't had any of these kinds of problems. I do think it's some setting on your web server.

    You could install IIS on your client computer and publish to it and test it. Or publish to a file share and test it there.

    You might want to post your question in the IIS Forums. http://forums.iis.net  The only thing I remember having an issue with on my webserver is enabling static content and having the IIS Metabase and compatibility something or other selected. Not much help, but I'm not an IIS expert.

    Good luck.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 10, 2011 2:16 AM
    Moderator
  • I notice you said the deployed server also meet that error. Here is another suggestion. Look into IIS and find the setup.exe, right click it and “Browse”. What happen then?

    Sincerely,
    lqian2
    Previous MSFT


    Senior Technical Consultant. Helping Others, Grow Yourself!
    Thursday, February 10, 2011 2:31 AM
  • The issue was with one of the prerequisites, Windows Installer 4.5 I changed it to Windows Installer 3.1 and it worked.

    Now if the user's machine doesn't have Windows Installer 3.1 and .NET Framework 4.0 and the user click the Run button of the Publish.htm the Setup.exe won't run, it will show HTTP Error 404 I have to go back to the IIS 6 and change the execute permissions to scripts only!

    Once the user download the prerequisites and I change the excecute permissions on IIS to Scripts and executables it will work, little improvement there from before. I still would like to see that the Run setup.exe will run on the user's computer especially if the computer doesn't have any of the prerequisites.

    Any ideas?

    Thanks again


    Codernater

    • Marked as answer by Codernater Thursday, February 10, 2011 9:29 PM
    • Unmarked as answer by Codernater Thursday, February 10, 2011 9:44 PM
    • Edited by Codernater Thursday, February 10, 2011 9:53 PM I thought question was answered
    Thursday, February 10, 2011 9:29 PM
  • if I browse on the setup.exe with Execute Permissions set to Scripts and Executables it will give HTTP Error 404!

    If I change the Execute permissions to Scripts only and Browse on it it works by showing the Run dialog box!!!


    Codernater
    • Marked as answer by Codernater Friday, February 11, 2011 2:58 PM
    Thursday, February 10, 2011 9:58 PM
  • Hi Codenater,

    >If I change the Execute permissions to Scripts only and Browse on it it works by showing the Run dialog box!!!

    It seems that it works for you now. If it works, please mark it as answer, thanks.

    Sincerely,
    Vin Jin


    Vin Jin [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 11, 2011 8:03 AM
  • i have same problem, 

    when i want to publish my project to another server, i see and it is same when browsing directory and click setup.exe,

    clickonce search exe on my desktop etc.

     

    HAS ANYONE KNOWS THIS ISSUE'S ANSWERRRRRRRRRRRRRRRR???????????????

     

     

    The page cannot be found

    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    Please try the following:

    • Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    • If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
    • Click the Back button to try another link.

    HTTP Error 404 - File or directory not found.
    Internet Information Services (IIS)


    Technical Information (for support personnel)

    • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
    • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site SetupCommon Administrative Tasks, andAbout Custom Error Messages.
    Thursday, March 31, 2011 3:29 PM