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.
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();
}
}
<?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>
FolderStructure
BrowsingFromIss
如果您在本地调试松鼠,则必须将 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.