简体   繁体   中英

Update.exe not found, not a Squirrel-installed app, hosted on ISS

I have Created a simple WinForms app, and I am trying to implement auto-updater hosted on Microsoft's IIS I have an issue with always returning

Update.exe not found, not a Squirrel-installed app

I have checked the official documentation and implemented web.config file as described in link

In ISS I have created a virtual Directory with web.config and Releases folder that My Winform app targets "http://localhost/Downloads/Releases/" as can be seen bellow

When I debug the application it always returns beforementioned error when hosted on IIS, works fine when it targets the path on my drive.

I think that I am messing something up on the IIS side, Does anyone have a clue or a pointer, it will be much appreciated.

MyApp

Public Form1()
        {
            InitializeComponent();

            AddVErsionNUmber();

            CheckForUpdates().Wait();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void AddVErsionNUmber()
        {
            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);

            lblVersion.Text = fileVersionInfo.FileVersion;
        }

        private async Task CheckForUpdates()
        {
            using (var manager = new UpdateManager(@"http://localhost/Downloads/Releases/"))
            {
                await manager.UpdateApp();
            }

        }

My web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".nupkg" mimeType="application/zip" />
      <mimeMap fileExtension="." mimeType="text/plain" />
    </staticContent>
        <security>
            <access sslFlags="None" />
        </security>
    </system.webServer>
</configuration>

My ISS folder structure with appropriate resources

FolderStructure

文件夹结构

BrowsingFromIss

浏览自Iss

如果您在本地调试松鼠,则必须将 Updater.exe 复制粘贴到 bin 文件夹的上一级。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM