I am trying to set the PATH environment variable for a web app I am building in Azure in python. I tried to use something like os.environ.setdefault('PATH', 'pandoc-2.14.1-1-amd64.deb') locally, however this does not seem to work once uploaded. I have also tried setting the path in the configuration section on the azure portal, but get the following error:
I have seen posts like
setting the webapp %PATH% environment variable in azure.
The post recommends adding a file called applicationHost.xdt to the home/site directory, which should set the PATH variable automatically. However, I am unable to upload applicationHost.xdt to the files in the directory. This is either because the file UI interface no longer exists, or I am unable to access it. Has the ability to upload via the UI been discontinued?
The only other workaround I can think of is to use echo/cat in the Kudu bash shell to create the applicationHost.xdt manually. This is very tricky. Are there any online tools that, given an input of the contents of a file, create the bash script to generate that file from scratch?
You could add a App settings to you web app, like below:
Then, restart your web app, in Kudu console, you could check it.
Note: App setting names must be unique, so when you use PATH as key it is already configured while deploy so while using in App setting from portal use a different Key name.
As a workaround, you can achieve that through an XDT Transform (XML Document Transform).
Yes, you can use echo to create the same. Simple copy paste the content of the file to be inside single quote ' and stream it into the file already created using echo command.
/home>echo '<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<runtime xdt:Transform="InsertIfMissing">
<environmentVariables xdt:Transform="InsertIfMissing">
<add name="FOO" value="BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
<add name="PATH" value="%PATH%;%HOME%\BAR" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
</environmentVariables>
</runtime>
</system.webServer>
</configuration>' > applicationHost.xdt
Verify the contents using cat command
I am new to PhpStorm and try to connect the project to my existing folders and files on my FTP server. I configured the deployment settings first in the settings menu and for testing via "create project from existing files" in another project. Both ways, I can connect to my FTP server and can browse through the server folders.
But not all of the files are shown in PhpStorm. E.g. I can find the file index.php but not 2.bs-test.template.php in the developer folder (which exists on FileZilla but not for PhpStorm). Therefore, some folders are completely "empty" for PhpStorm and I cannot download and edit these files...
When I try to download the error "No files or folders found to process" occurs.
Does anyone know how to fix this problem?
Solution: In my case, some folders had suffixes like .../foldername [2]/....
PhpStorm is not able to read files in these folders with special suffixes like [2]. After I removed the suffixes the files appeared - without any changes in remote settings.
Presently I'm using phpDesigner 8. I like, it can create a "real remote" FTP project, phpDesigner not downloading all project files to local, it shows me the remote tree, and I download only the file, that I'd like to edit. When I save, the file automatically uploaded with FTP.
I'd like to do this with PhpStorm. I tried "New Project from Existing Files", then "Web server is on remote host, files are accessible via FTP/SFTP/FTPS". I turn on Tools/Deployment/Automatic Upload (always), and PhpStorm immediately uploads the saved files via FTP. This good. But I don't need a local copy any of the remote files. I need to download the remote files only to editor, not to locally, and saves to remote.
Is there any way to do this?
Is there any way to do this?
Well ... you cannot create 100% Remote FTP project -- because you still have to create actual project ... which has to be local. It can be completely empty (no actual project files) but it will still contain config files in .idea subfolder (e.g. your FTP details).
But yes -- once such empty project created -- just go to Settings/Preferences and configure Deployment.
Once it's properly set up -- go browse Remote Host and choose to edit file remotely -- IDE will download that file in temp location and upload it back as needed -- https://blog.jetbrains.com/phpstorm/2015/04/remote-edit-in-phpstorm-9-eap/.
NOTE: missing stuff when editing remotely -- https://stackoverflow.com/a/36850634/783119
I'm trying to insert the mercurial_keyring file with my username and password in the .hgrc file but it doesn't exist in my user directory on windows. I have tortoise hg installed and even checked if it was installed properly on the command prompt yet I still don't have the .hgrc folder.
Can anyone tell me what might be the reason to it?
Thanks
Because it's %USERPROFILE%\mercurial.ini
Mercurial reads configuration data from several files, if they exist.
These files do not exist by default and you will have to create the
appropriate configuration files yourself:
Local configuration is put into the per-repository /.hg/hgrc
file.
Global configuration like the username setting is typically put into:
%USERPROFILE%\mercurial.ini (on Windows)
The .hgrc files are not created automatically when you install Mercurial or TortoiseHg.
You will need to manually create it at the location you need whether that is within the repository's .hg folder or your own C:\Users\username\ folder.
You will probably need to use the command line to create the file as it's not usually possible to create filenames that start with . in Windows Explorer.
https://www.selenic.com/mercurial/hgrc.5.html
I am getting the following error trying to load a basic project template:
Error 12 Could not load the assembly file://\\psf\home\documents\visual studio 2010\Projects\WindowsPhonePivotApplication1\WindowsPhonePivotApplication1\obj\Debug\WindowsPhonePivotApplication1.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information. WindowsPhonePivotApplication1
I don't have the Security tab when I try and modify the DLL to unblock the assembly. Any advice?
Did you try copying this assembly locally? Currently it seems to be loaded from a network share. You will need to trust that network location if you want to work this way.
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "file:////\computername\sharename*" FullTrust -exclusive on
Check this KB for details... http://support.microsoft.com/kb/320268/
I just ran into this very same problem - trying to compile a Silverlight application inside Parallels Desktop 8 virtual machine on a Mac - where the SL output directory was located on the emulated drive (appears in Windows as a network drive).
Very simple fix. You can open up devenv.exe.config located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE and add this line inside the <Runtime> node:
<loadFromRemoteSources enabled="true"/>
e.g.
<?xml version ="1.0"?>
<configuration>
<configSections>
<section name="msbuildToolsets" type="Microsoft.Build.BuildEngine.ToolsetConfigurationSection, Microsoft.Build.Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
...
<runtime>
<loadFromRemoteSources enabled="true"/>
...
To edit the devenv.exe.config file you will also need to open NotePad as administrator. After doing the above I can compile my SL application inside Parallels Virtual Machine, but the above also applies to Silverlight applications hosted on a network drive.
I ran into this. These were the steps I took:
Downloaded a file, WP7PiChartsFromDBSOUP.dll, to my downloads folder (everything locally).
Copied this file to c:/Program Files/ referenced it and attempted to build.
Got this error message.
Removed the reference, and followed the steps to unblock.
Referenced and attempted to build: still same error.
Went back to c:/Program files and noted that the file was still blocked. Somehow my attempt to block didn't take. So I tried to unblock, closed the properties dialog, then reopened. Somehow my attempt to unblock didn't appear to be working.
Went to the downloads folder and unblocked the file that was downloaded to this location, tried to unblock, and it seemed to work. So I felt like I was out of the woods. I copied this file over the file in c:/Program Files and reference it in VS2010, closing and reopening VS2010.
Same error message. I rebooted the machine and tried again. Same error message. And I know this is gonna sound crazy, but I renamed the dll from that long name to PieChart.dll.
And it finally worked.
So, either there was a problem with the name, or maybe changing the name somehow caused the change in blocked status to kick in.
I had the same problem trying to build an application on parallels.
I just copied the whole project in a folder under c:/ and works
it seems that parallels shares certain folders (i.e. desktop, documents) between the OS running on the vm and your mac user home folder. because of that windows treats these folders as network shared folder and forbids you to access them.
It's on the General tab in file properties from explorer. Either via the DLL in question, or you can do it on the zip file before you extract if it was a download, there will be an unblock button at the bottom right.
Make sure it's from a trusted source.
I've tried many solutions also with coping file to external usb drive with FAT32 file format, and some other ideas. But finally I've found post by caliban here: Topic about this problem. He links to a program called Streams which helped solving this problem :)
caliban:
Run this line in the command line
streams -s -d directory
download Streams exe
Add to the project a text file named ServiceReferences.ClientConfig having the following contents:
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
Re-build the project.
If you still didn't get your answer, I just found the solution. You are saving the application into the network hardrive. So while creating the application, change the location to something like your local disk e.g.,
C:/Projects
Then you will be able to run it.
I had the same problem over VMWare using a mac to load windows 7, if you see the path it starts like a network path, that's why VS gives out about the security.
Take the entire folder project and put it in a physical path starting with C://program files... , then open and compile, it will work.
Right click on the dll and select properties. You should see a button to unblock the assembly.