Not able to save file deployed on jetty server - webstorm

I have deployed my webapplication on a jetty server, and I am trying to edit those deployed files using WebStorm 8.0.4. But I am unable to save the edited files and getting the following error:

Try turning the 'safe write' feature (Settings/General, 'Use safe writes') off - does it help? It creates a temporary copy of a file: creates a separate temp file, deletes the original and then renames. With this option the original file permissions may be lost, this causes problems, especially when working on remote drives.

Follow these steps.
Open C:\Users\YourUserName\.m2\repository (If you use maven)
Find org folder and Navigate org\eclipse\jetty\jetty-webapp\yourJettyVersion
There will be a .jar file.
Open it with winrar or some program like winrar.
Navigate org\eclipse\jetty\webapp
Find webdefault.xml and Open it with any text editor.
Search useFileMappedBuffer parameter in file
You will see a param value.
Change it to false.
Save and Exit.
I'm sorry for any English mistakes.

Related

Creation of the virtual directory failed with error: cannot write configuration file applicationhost.config

I'm just simply trying to open up a VS 2017 project. When I open the solution, I get the following error message:
Creation of the virtual directory http://localhost:58051/failed with the error: Filename: \?\C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config Error: Cannot write configuration file
I've checked the folders along the file path and they are not encrypted. All the folders along the file path have a black box for the Read Only attribute. When I go to the config folder and clear out the black box for the Read Only attribute and Apply the setting, I find if I exit and go back to the same folder, the black box reappears for the Read Only attribute. I've read that the black box doesn't really mean the Read Only attribute has been turned on. If the Read Only attribute was actually turned on, I should expect to see a check mark instead. However, this doesn't explain why I can't open the solution.
After I click the OK Button to the VS Error message, VS just says the solution is "(unavailable)" in the Solution Explorer.
Any help would be greatly appreciated.
I too had this problem with my project files located on OneDrive. The way I resolved it was I renamed the applicationhost.config file located in the ".vs\config" directory of your root project directory then reloaded the web project. This will create a new applicationhost.config file.
I had the same error message sharing a project between 2 machines via OneDrive and fixed it as follows:
1 - Closed VS.Net
2 - Opened [myappnamefolder].vs\config\applicationhost.config in Notepad
3 - Searched the open file for the filename in my error message (In your case C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config ).
It was found under system.applicationHost, sites, site name, application path, virtualDirectory - physicalPath
4 - Amended the physicalPath value to point to the valid path of the project's config file as above.
5 - Saved the applicationhost.config file
My paths were different because I had different home user directories on each machine. (User A & User B)
I have resolved this error with this way mention as below:
STEP 1:
Go to on that path
C:\Users\navz\OneDrive\Documents\IISExpress\config
STEP2:
When you reach on this folder "config"
in this folder we can see "applicationhost" file
STEP3:
Close the Visual studio existing project and delete the applicationhost file(see on Step 2 path)
Then open the existing project again, it will be reloaded automatically and work properly.
Had same problem then looked into vs\config\applicationhost.config and it was encrypted. I unencrypted file and solution loaded with no problems.
I've had this problem several times using VS 2017 with Onedrive. Resolved it by renaming the application.config and having VS recreate it. Just as well could have edited line in the file. See the Diff below as an example.
The config file is located in something like C:\Code\MyProject\.vs\config\.
I just encountered this error. I followed the steps in this answer: https://stackoverflow.com/a/50508207/1166163
When I tried to save my changes I realised TFS had marked the file as read-only, preventing VS from updating the value. Removing the read-only attribute fixed the problem.
None of the above worked for me. I ended up deleting and recloning the repo that was giving me problems. It then opened up just fine.
Windows 10 Defender was causing this for me. When I disabled control folder access it worked again. Odd, because it had been working with that setting on for a while.
my drives were different - but the main codebase was shared between the two machines - so on one it was in the d drive - so i mapped the parent subdirectory on the second machine to be the d drive ... which resulted in the same paths then on both ... i just had to open the solution from the d drive on the second machine

Unable to open SAS EG Project

I can't open my SAS EG Project with the error message :
"Unable to open file ...abc.egp as valid project file"
This is happen because when my hard disk is full and I was trying to save the project, so it wouldn't let EG to finish writing the project changes.
I've tried to clear the history but no luck.
Thanks
I suspect your SAS EG file might be irreversibly corrupt, so the focus is then on recovery of the file or its content.
If your disk drive is NTFS based, you might be able to recover the file. Check for previous versions in the file properties.
Also, what was the structure of your file inside? If it was a code driven program, then you can make a copy of the file, change extension to "zip" and then unzip the file or look inside for its contents. SAS EG projects are just ZIP archives with XML maps and related SAS code.
The last option is to see if you have logging enabled in your SAS EG. If you do, then all the code you run on that date would be available in your logs, so you can recover the code from the logs.
Regards,
Vasilij

Cannot save file in WebStorm 9

I have been using the same workflow for months to add a new page in my ASP .NET site, but all of a sudden I am getting problems with trying to save a .ascx file inside of WebStorm.
I created the .ascx page in VS and then saved it. I then go over to WebStorm to start developing and I cannot save any of these new files. I get this error:
Following errors occurred on attepmt to save files:
C:\...\Management\Management.ascx___jb_bak___ (Access is denied)
I don't get what this file is and why it can't be saved... The jb makes it seem like a JetBrains file, but this file doesn't actually exist in the filesystem. All the other files I have had work just fine. Its just this new file all of a sudden.
What does this error even mean.. there is no valuable information
This error happened to me everytime I used Nodemon to start Webpack on a separate process. The problem was fixed by disabling "Safe write" in "Settings", as VyvIT suggested.
Hello to Developers using Jetbrains products!
I had this problem today and I think it was for the webstorm but I check my E: drive that I was developing on.
The problem was with my hard drive that changed to read-only.
I changed my drive to C and it solved.
Check your drive that you are using. That might be the problem.
You need to change your security options for user in Windows:
Right Click
The Folder > Properties > Security Tab
Click on
Edit to change Permissions > Select User

Why does my web-app work offline in Firefox, but not on iPad?

I recently wrote a few scripts for Javascript which I am trying to run as a native app on my iPad in offline mode.
The scripts do nothing complex, simply run off a bunch of prompts and generate a document.write() based on the information the user has entered.
So I set up my own little website to host the scripts on and went about setting up an application cache. I am new to this sort of thing however from what I gather, I have followed instructions correctly. To set up my app cache, I did the following:
Added the following two lines to my .htaccess file:
AddType text/cache-manifest .manifest
AddType text/manifest .manifest
Made a new file called "generator.manifest", which has the following lines:
CACHE MANIFEST
generator.html
answergenerator.js
And added in to my generator.html file:
Apart from a few functions used to prompt some iOS features, all I have in my generator.html file is this:
along with the other stock standard html tags.
That is my appcache setup. The generator.manifest file is in the exact same directory as the generator.html file.
When I enter Firefox and go to my site, I can run the script, allow it to cache files for offline usage (Firefox comes up with a prompt), and then run the script in offline mode.
HOWEVER, whenever I try to do this on my iPad (4.2.1), I simply get the error: "Generator could not be opened because it is not connected to the Internet."
Where have I gone wrong? Can someone help me fix this please?
A huge thanks in advance,
Haz.
You might look at this answer. iOS does seem to have some issues. I found that I had to power cycle my iPad (in addition to clearing open Safari's) before it would recognize the appcache.

Access denied when updating config file in ProgramData directory. How do I fix this?

I can't seem to update my configuration file in c:\ProgramData\appname\config.ini. I keep getting an access denied error. Seems the ini code fails to be able to delete the existing .ini file when trying to update it with the new file. Funny thing is that I have other programs I've written that share the same code but don't have this problem. This is troubling.
Comparing my working program with this non working program, I noticed that when I click on the security tab for the ini file, I see that my user name [Scott] is not listed under "Group or Usernames" like in the working program's ini file. Also, the non working one has a shield next to Delete and Rename (when right click on filename) while the working one does not have this. How can I set the permissions? The setup file for both projects is identical and when I create the folder and copy the program file in Isso Setup, no permissions are set (read only flag is not set, hidden is not set, and System is not set).
Why am I getting this and how come my other program install and works fine? Installer runs as administrator and does the access permission prompting. What do I need to do?
This is because your program was not run as an administrator. You have to either run your program as an administrator or move your .ini file and any other files you wish to update during the duration of the program to a location like C:\Users\\AppData\Local\. Note that for the latter option you will have to update your program likewise.
To run your program as an administrator right-click on ur program (or shortcut) and click Run as Administrator.