Specify template applicationhost.config when launching iis express - iis-express

When launching iisexpress using iisexpress /path:D:\Foo /port:9000 how can I specify what file it uses as the template applicationhost.config file?
Currently it uses, C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config but I need to use a different one so that I can unlock/customize various sections.
I would prefer not to have to set each site up in ~/Documents/IISExpress/config/applicationhost.config.

Currently there is no option to provide custom template applicationhost.config file.
what is the issue in editing C:\Program Files (x86)\IIS Express\AppServer\applicationhost.config itself and doing your customizations?
If you don't want to edit that file, then you can make a copy of applicationhost.config at desired location and edit site information (path and port information ) and finally use '/config' command line switch as follows
iisexpress /config:<full-path-to-custom-applicationhost.config>

Related

PhpStorm Remote FTP "no files found"

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.

Where does Visual Studio copy the applicationhost.config file in the .vs folder from?

Visual Studio creates a hidden folder in the solution root of web projects named .vs. Inside there is a config sub-folder with an applicationhost.config file. If the .vs folder is missing Visual Studio will create it again either when I open the solution or maybe when I start the debugger.
I assume that this applicationhost.config file is being copied from some default location. I wish to find the source file and make some changes so that my preferred settings will be in effect by default.
I am currently using Visual Studio 2019 16.3.7.
Where does Visual Studio copy this file from?
I found applicationhost.config in these locations on my PC:
C:\Program Files (x86)\IIS Express\config\templates\PersonalWebServer
C:\Program Files\IIS Express\config\templates\PersonalWebServer
C:\Users\%USERNAME%\Documents\IISExpress\config
I altered each systematically and found that in my case Visual Studio 2019 is copying the file from path 1.
The applicationhost.config is copied from
%windir%\system32\inetsrv\config
You can get %windir% from the set command in a command window. (usually C:\windows)
From Microsoft Forum User lextm...aka Lex Li
You are encouraged to modify this file via appcmd.
http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/ Run
this command at an elevated command prompt is enough. To edit the file
directly, you need to elevate Notepad.exe and then open it. This is
not recommended unless you are quite familiar with the syntax. The
history folder contains the old copies of the config files, and
editing them does not make changes to current IIS settings.
The help documents iisexpress /? /config help states:
The full path to the applicationhost.config file. The default value is the IISExpress\config\applicationhost.config file that is located in the user's Documents folder.
Of course you can change the path to whatever using the argument as well.

How to change the default tnsnames.ora file path read by Visual Studio 2017

Visual studio 2017 by default reads the tnsnames.ora file from the installation path of the oracle developer tools for vs2017.
There is an option to search and then copy and replace the tns file in above default location with a different ora file in the machine. However the problem with this is, multiple tns files needs to be maintained in this case(because other oracle software reads the tns file from oracle client installation path).
VS 2017 Search and copy tnsnames.ora file window
Instead, is there a way to change the default tnsnames.ora path read by VS2017? (TNS_ADMIN and Path environment variables are already configured.)
I don't understand your problem. Simply delete the tnsnames.ora file from c:\Program Files (x86)\Oracle Developer Tools for VS2017\network\admin (just guessing the folder name) then VS will take it from location you specified in "other locations".
Or
Open a command line window
Navigate to c:\Program Files (x86)\Oracle Developer Tools for VS2017\network
Delete folder admin
Create a symbolic link with mklink /d "c:\Program Files (x86)\Oracle Developer Tools for VS2017\network\admin" "c:\app\client\...\product\12.2.0\client_1\network\admin"
I found that I had an issue with this step of Visual Studio 2017, it was trying to store it's tnsnames.ora in a directory that didn't exist, so I hunted and discovered that you can alter this via machine.config.
You'll want to open up RegEdit first and get the version number for the driver you are using (managed or unmanaged), you can do this by browsing under the oracle directory:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET.Managed\4.122.1.0
my version was 4.122.1.0, I then placed this in the following:
<oracle.manageddataaccess.client>
<version number="4.122.1.0">
<settings>
<setting name="TNS_ADMIN"value="C:\app\client\612851311\product\12.2.0\client_1\Network\Admin" />
</settings>
</version>
</oracle.manageddataaccess.client>
You will need to add this to your machine.config in the .net framework version you are using, for me it was:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
I hope this helps, yes you may want to use a symbolic links as suggested, as that you don't need duplicate files, or you may just want to change this to the directory you need.
restart your machine and you should be good.

Customize install-log location in Visual studio setup projects

The SetUp projects from Visual Studio will have their installation logs under temp folder with the name format like " %temp%\ .log "
Can I have some customization done here, so that these installation logs will go to a specific folder ?
You can change the location that MSI logs are written to by invoking MSIEXEC with the /L <logfilepath> argument. If you cannot change the command line arguments (such as if the MSI is invoked by a setup executable), edit the registry to change the default log location.

How to connect to source control server using TF command line utility

I'm trying to run a commands using Tf Command-Line Utility I'm getting errors when trying to connect to TFS server. I'm not sure what tf tool is expecting as far as parameters.
It tells me to connect to workspaces by running tf /collection:TeamProjectCollectionUrl'
To get the TeamProjectCollectionUrl I went into Visual Studio Team Explorer, looked at properties of a project and copied URL property. The url starts with vstfs://
You want to use the standard HTTP or HTTPS URL to specify your project collection. (This is the same URL that's shown in the connection dialog in Visual Studio.) For example:
http://tfs.contoso.com:8080/tfs/DefaultCollection
TFS installs on port 8080 by default, and (beginning in TFS 2010), the name of your project collection is the suffix.
Alternately, you shouldn't need to specify the project collection - if you run the tf resolve command from one of your working folders, it will determine the server information automatically. That is, if you have the workspace mapping:
$/Project/Source -> C:\Work\Source
If your current working directory is C:\Work\Source and run the tf command line client, it should locate your TFS workspace automatically.
1- Add "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE" path into Environment variable path.
2 - Create a batch file (simply copy and modify the below commands and save into file with ext .bat)
CLS
tf get $/Project/Source /recursive /force
Pause
exit
3- Copy .bat file and place into your local Mapped folder and run.

Resources