An Error Occurred While Downloading A Required File - wpf

I'm not sure if this is the right forum or not, since I have no idea what's causing this problem. I have a WPF application that was compiled into a setup project. After building the setup project, there are two files: setup.exe and [Program Name].msi. I put both files in the same directory in an ASP.NET website, served via IIS 7.5. Everything was working fine for about a week, until I started getting the error:
"An error occured while downloading a
required file. You may retry
downloading the file or cancel setup."
This happens when I click on a link on my website for the setup.exe file. After seeing this error, there's a tab labeled "Details" which I can click to display the message:
"An error occurred trying to download
'[website url for the .msi file]'. See
the setup log file located at
'C:\Users[username]\AppData\Local\Temp[some
alphanumeric
sequence].tmp\install.log' for more
information."
I looked at this file, but it just restates that there was a problem downloading the .msi file. Can anyone offer me some suggestions? I'm really stumped on this, and have no idea where to go...
Many thanks for the help!
Andrew
EDIT: This appears to be a problem with the computer that I'm downloading the program to. I tried downloading and installing the program on a different computer, and everything worked fine. Apparently, I must have changed some setting on my computer to cause this, although I'm not sure what that is...

So you're trying to download these files directly? Could the server be preventing the download of the .msi file type? How is the download taking place? Is it user initiated?

I was experiencing the same issue this morning and I finally figured out that it caused by either one (or both) of the following settings in IIS:
Compression: I had compression enabled for both static and dynamic files
Output Caching: I had bit Enable cache and Enable Kernel Cache enabled
I cleared all of the above check boxes and after that the setup.exe downloaded the MSI without a problem!

You connection was interrupted just try the preview command you type and also check your connection

Related

pgadmin 4 v4.28 keeps loading

I installed pgadmin 4 v4.28 and it keeps loading but does not open, I tried opening it as administrator and it still does not open. I had the older version previously but I have deleted PostgreSQL DB and pg admin properly before I install the above version. can you guys help me out on this? the link I have the screenshot of the problem.
Do the following steps to resolve this:
Open your registry editor.
Change the value of HKEY_CLASSES_ROOT\.js\Content Type from text/plain to text/javascript.
Restart the pgadmin server. You can do this by ending the pgadmin background task from the task manager.
UPDATED ANSWER
PGAdmin has been tracking this as bug 5996. In it, they recommend the following solution:
You can add the following lines to the "config_distro.py" and
restart the pgAdmin 4 server:
import mimetypes
mimetypes.add_type('text/javascript', '.js')
The above workaround should work for you.
They also mention:
In the next release, we're looking to include that into the code, so
users don't have to do it themselves.
But the answer to your question, the config_distro.py can be overwritten
in the subsequent upgrades.
pgAdmin does provide another option to set the settings in the
config_system.py file which is intended for system administrator to
include settings and which is outside of the pgAdmin installation.
Please refer https://www.pgadmin.org/docs/pgadmin4/4.28/config_py.html
for more details.
PREVIOUS ANSWER
Another answer had comments asking what caused this/how the author figured it out.
For posterity, this is documented in the FAQ:
When I launch pgAdmin 4 v4.28 or later on Windows, the loading page
never closes. Why?
pgAdmin 4 v4.28 includes additional security features, one of which is
intended to prevent security issues caused by Content Sniffing.
Unfortunately some Windows systems are misconfigured such that this
causes Javascripts used by pgAdmin to fail to load. Opening the
developer tools on your browser will show an error similar to this:
> Refused to execute script from
> 'http://127.0.0.1:57313/static/vendor/require/require.min.js?ver=42800'
> because its MIME type ('text/plain') is not executable, and strict
> MIME type checking is enabled.
>
> (index):39 Uncaught ReferenceError: require is not defined at
> (index):39
This will occur when the value of the registry key at
HKEY_CLASSES_ROOT\.js\Content Type is set to text/plain. To resolve
the issue, use the Registry Editor and reset the value of
HKEY_CLASSES_ROOT\.js\Content Type to:
text/javascript
Finally, restart the pgAdmin server.
Interestingly enough, GoLang, TensorBoard, Django, and many others have had issues filed regarding this same problem. Browsers are refusing to load content because the browser thinks it is being transferred as 'text/plain', based on the registry configuration.
Edited on 25 May 2022 (New Link for pgadmin4 download)
You all have great answers...but then on the experience i just had, the simplest way, which worked for me right away is to install the new version of pgadmin4 without necessarily uninstall the existing one.
That is what i did and i was able to still see all my databases and tables unchanged and untempered.
Just run the installation and you are good to go
You can also downgrade your PgAdmin. I didn't want to change anything in registry editor. So I downloaded and installed pgadmin4-3.6. It works fine on Windows 10 (x64).
I just upgraded PG Admin from v4.28 to V4.29 and it resolved my issue. One can download the latest version from here for Linux, here for Windows and here for Mac.
This is similar to vialy's recomendation. Thanks Vialy's for your input it save my day... :)
I had the same issue with pgAdmin 4.28 using Chrome Browser on windows 10. It started working after I switched to Edge Browser.

How to install and run VB.NET Application to another computer

I had this problem on how to install my vb.net application i published a while ago. After i published the vb.net project, i copied the file and tried to install to another computer but, this error was shown.
Cannot download the application. The application is missing required files. Contact application vendor for assistance.
Can anybody help me please.
I need to run this application to other computers connected to my PC as the database server.
Just-In-Time Error when running the application to another computer
This error occurs when one or more of the files listed in the application manifest cannot be found on the server. I would suggest you open the application manifest in a text editor and verify that you have uploaded all the deployment's dependent files and also check manually if the ClickOnce Install Source is correct.
If you need more information for this case then read this

Installshield The specified File key not found in the File table

I've packaged my WinForms app with the Visual Studio Installshield Limited Edition wizard.
When installing the app, I get this error during installation.
Error 2715. The specified File key ('myappname.xml_serializa') not found in the File table
Any ideas from anyone? I'm completely loss on this one.
In your installer project directory, open the *.isl file and search for the text in your error message, myappname.xml_serializa. It will most likely be in there quite a few times. Either remove it or correct all instances of it.
I had a similar problem recently and found out that it didn't find the key because I was not adding the .primaryoutput file on the section Specify Application Data -> Files. Check if you are adding all the necessary files for your setup before creating the installer. The installer will be created even if it doesn't have all the files, but it won't execute properly.
Hope this helps
Changing the *.isl file resolved our issue. I found that we had changed the .NET framework of a project and when we removed the project output from the Installshield using the prompt it did not update this file so when we added the output again it now contained two outputs. OUTPUT and OUTPUT1. Hope this helps
This is what worked for me: The project in my case was readonly as it was connected to TFS. If you are working offline, make sure you make the project files writable. (Uncheck Read Only at the folder level)
This worked for me:
In your setup project double-click Project Assistant.
Click on Application Files.
Select file(s) with the file extension that was reported in the error message(s).
Click on Delete.
Repeat for any files as needed.
Go back to setup project in Solution Explorer.
Click on Rebuild

Issue Signing xap file in post build event on TFS Build

We have a silverlight(5) project, the source in TFS (2010) and Continuous Integration build has been setup and working fine. However, we are now at the stage where we are trying to release it to some users to get them using it and give feedback. I've set up the code so that it checks for updates and if there are any it downloads the latest xap file. However this requires the xap file to be signed. No problem when doing this from our dev machines, but when it comes to the automated build it fails, with the message
Xap packaging failed. Cannot locate the signing tool SignTool.exe.
I've tried numerous things to get the signtool to be recoginised and can't. However, we don't actually need this on the CI build, so I've then tried a second tack which is to make the postbuild event conditional on being run in VisualStudio. Followed various suggestions here on SO but can't gett them to work.
The post build event is
if "$(BuildingInsideVisualStudio)" == "true" (
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "$(SolutionDir)castle.pfx" "$(TargetDir)Castle.xap"
copy "$(TargetDir)Castle.xap" "$(SolutionDir)Castle.Web\ClientBin"
)
still no joy. Have tried multiple variations of this, but keep getting the same message from the automated build.
So can anyone help with either a) getting the signing tool to be recoginised on the build server or b) getting the automated build to skip the postbuild event?
Found the problem in the end...
I had been putting in place some features so the app would download and install the latest xap file. This requires it to be signed. As this wasn't working I followed some instructions on signing a xap file, not realising that one of the other developers here had put in place the code I described above in the post build event.
I had mistakenly thought that this was created as a result of me checking the 'Sign The Xap File' check box.
So first issue was that other developer had not shared his pfx file with us to add to our certificate stores.
Second, and main issue, was that we then had two attempts at signing going on. The one via the check box and the one via the post build event. I removed the check box and it worked fine.
The issue with the check box is that it expects the SignTool.exe to be in a particular location. On our development boxes with full VS it is where it is looking for it, but on the build server it wasn't. Think it may also have something to do with 64bit machines.
By using only the build event (once you have the correct certificates installed) you can specify explicitly the location that the signtool is going to be, and if necessary install the windows sdk to that location.
This is the top result in Google for this error so updating it with my steps to resolve.
The above didnt work for me but performing the steps below should fix it.
Install the Windows 8.1 SDK on the build server (Windows 2008 R2 for me)
Adding the Windows SDK BIN directory (that contains signtool.exe, on my server) to the Environment PATH variable - e.g. c:\program files (x86)\Windows Kits\8.1\bin - note: Do not add quotes around this
Restart all the Visual Studio Team Foundation services in services.msc after you add the file path to the PATH variable as it needs to reload these before building

Silverlight XAP File not being downloaded

Wow. The feature that shows related questions WHILE making the questions is very nice. Unfortunately, none of the questions addressed my problem, nor did any of my searches worked. I did find several questions with the same problem I'm having, but none of the solutions have worked for me.
My development laptop is WinXP with IIS 5.1. I'm developing a Silverlight 4 application. Everything was working 100% perfectly, even without registering MIME Types in IIS. Last Thursday, VS.NET stopped debugging my application and the area where Silverlight was supposed to show was being left blank and there were no java errors shown by Internet Explorer 8. I got the same behavior in Firefox 4. If I right-clicked on the blank area, the usual Silverlight context menu showed up and I could see the settings.
Using Fiddler I noticed that the browser makes the request to the correct file, but it looked like the server either hangs or did not respond with the file stream. With this information I browsed my virtual directory using the browser and tried downloading the file with a right-click/save-as, but the browser just hanged waiting for a response from the server.
Tweaking the source code I noticed that, if I comment some code (any code at random, no code specifically, as long as no compile time error shows up), the application starts showing the log-in page correctly and I can download the XAP file correctly again. If I un-comment the code, the log-in stops working again and I cannot download the XAP file anymore.
I already tried registering MIME types in IIS (and double and triple checking I was writing the entries correctly), double and triple checking that the XAP file address was correct, tried changing the XAP extension to ZIP, and reinstalling Silverlight 4 Tools for VS.NET 2010.
At some time I thought it might be something about the XAP file size, which sits at 512K working or not. So I placed a 30MB file in the same directory as the XAP file. However, when I try to download the 30MB file, the download starts successfully.
For example, using directory browsing, the file shows 523587 bytes in length. This can be downloaded normally. If I un-comment whatever code I commented, the file shows 524194 bytes and the download stops working.
One last thing, I checked the Even Viewer and noticed an error thrown by ASP.NET. "aspnet_wp.exe (PID: 2100) stopped unexpectedly." Googled about this error and most hits took me to a virus and several tools for its removal. Tried the tools as well and all of them reported not finding any indication of the virus.

Resources