Symlink created with mklink not working with IIS7.5 -- Windows 7 - iis

So while in my IIS root directory (c:\inetpub\wwwroot) I've created a symlink to a network drive using:
mdlink /D truthuniversal "U:\Truth Universal Full Site\public"
The symlink was created just fine, and if I issue the cd truthuniversal command, while in the IIS root dir, I do indeed end up in the "U:\Truth Universal Full Site\public" directory area.
My problem is that when I type:
http://localhost/truthuniversal
in my browser's address bar IIS does not serve the index page which resides in the public directory. Instead, I get the following error:
Server Error in Application "DEFAULT WEB SITE"
Internet Information Services 7.5
Error Summary
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Please advise.
-TU

You need to create a virtual directory mapping to that directory in IIS in order for it to serve up the page. In IIS, right click on "Default Website", then click "Add Virtual Directory". Also, doing this, there is no reason why you even need the symlink. Just map it to the target to begin with.

I agree that virtual directory in IIS may be what you want, but if you want to minimize IIS maintenance, consider this:
Instead of directory symbolic link: mklink /D
try directory junction: mklink /J
This worked for me and the web apps are able to write to the same directory.
mklink /J App_Data d:\shared\App_Data
worked for me on Windows Server 2008 R2.

Related

IIS always search file in the wrong directory

On my PC (Windows 10) I wrote a new website (VB windows forms, .aspx files).
If I run the site from inside Visual Studio 2019, all OK, it starts and run correctly.
Now I need to have this site always "ON", I installed IIS, configured a "new website", name, directory and so on. I configured the new website in IIS to the directory where I develop, not in wwwroot.
Nothing works: I always have a 404 error.
To simplyfy everything I wrote a simple .HTML file, "prova.html", I placed it in the real website directory, and I tested it with Firefox: http://127.0.0.1/test.html.
Still 404:
URL requested http://127.0.0.1:80/prova.html
Physical path C:\inetpub\wwwroot\prova.html
It seems that IIS ALWAYS searches the file in the wrong path, but I configured the correct directory where the file is.
Of course if I place my test file in "inetpub\wwwroot ..." IIS finds and opens the file.
Any suggestion?
You can refer to the following steps to deploy the project in IIS:
Right click on your project and select publish:
Then add the site in IIS:
Solved ... installing IIS I didn't install the .NET part ... I feel very stupid.

IIS Map Network Drive to Virtual Directory

I'm working on setting up a Drupal 8 Site on IIS. On Linux, we commonly have a network share that all Load Balanced Nodes can access, and then a symlink to connect the directory /sites/default/files to that share. I need the same for IIS.
Things that didn't work:
1) Virtual Directory in IIS: We authenticated with a user on the AD, and we were able to load all files (i.e. the images on the site appear). However for some reason, Drupal couldn't see it and also created a folder "files" in the same directory, through the front end and IMCE I can only write to that folder and not the Virtual Directory. If someone knows a resolution here that would be helpful.
2) Regular Shortcut: Same problem as above. Drupal doesn't see the shortcut since it's actually named files.lnk when created through the file browser. It creates another folder ./files and refers to that instead of the shortcut.
3) Hard Links: I tried running this command `cmd /c mklink /J D:\inetpub\wwwroot\\web\sites\default\files "\\Public Files\files" and it simply stated "Local Volumes are required to complete this operation"
4) Soft Links: Changing up the switch on the previous command to cmd /c mklink /d D:\inetpub\wwwroot\<site_dir>\web\sites\default\files "\\<share>\Public Files\files" works, but I'm only getting HTTP 401 errors in Chrome, even though I've allowed the Local Group IIS_IUSRS to have full control, plus opening it up to almost every user.

CF 11. 'ColdFusion is not defined' error using ColdFusion.Ajax.submitForm

Just re-installed everything on new laptop after old one crashed. Upgraded from CF9 to CF11 in the process. Running IIS on Windows 10. Local site is working fine, except when it comes to submitting a form with ajax.
ColdFusion.Ajax.submitForm('registerForm', '/register_action.cfm', callback,errorHandler);
I have <cfajaximport> at the top.
I have an IIS virtual CFIDE directory
pointing to C:\ColdFusion2016\cfusion\wwwroot\CFIDE
Mapping in CFAdmin is correct
There was not issue with CF9. But I notice CF11 has its scripts directory OUTSIDE the CFIDE directory on the same level (directory named "cf_scripts"), whereas CF9 has the scripts INSIDE the CFIDE directory.
Before I stuff things up, has anyone any pointers in the right direction?
SOLUTION
For the benefit of others, I did the following:
CFAdministrator Default ScriptSrc directory: /CF_SCRIPTS
IIS Virtual Directory: CF_SCRIPTS pointing to C:\ColdFusion2016\cfusion\wwwroot\cf_scripts\scripts\
Create a virtual directory in IIS that points to that scripts folder.
In the ColdFusion administrator, under the Server > Settings tab, make sure the Default ScriptSrc Directory name matches the IIS virtual directory name you created.

How to get freb.xsl file in IIS_FailureTrace directory

I am running IIS on Windows Server 2012 R2. I follow the follow steps to enable 'failed request tracing' in IIS:
http://blogs.msdn.com/b/kishorerajendran/archive/2015/05/08/iis-failed-request-tracing.aspx
I get a fr000001.xml file in my 'DataDir\Logs\IIS_FailureTrac directory, but there is no freb.xsl file. I tried go to IE and do http://localhost, that does not help.
How can I get the freb.xsl file?
On Windows Server 2008 R2, I completely deleted the W3SVC1 folder in C:\inetpub\logs\FailedReqLogFiles\ .Then I requested again the page with my error. The folder W3SVC1 was recreated, and this time it contained my failed request .xml as well as freb.xsl. (if that doesn't work, you could be lucky, try from a dos prompt, from c:\, dir freb.xsl /s. I've got multiple copies of it for iis, iisexpress, multiple web sites, etc... it's in My Documents\IISExpress\TraceLogFiles for example)

Coldfusion 10, IIS 7.5 - Getting a 404 even though file exists

I'm getting a 404 even though the page exists on disk.
I've ran the Web Server Configuration Tool and rebooted several times.
Handler mapping for .cfm files (configuration tool seems to have worked):
C:\ColdFusion10\config\wsconfig\1\isapi_redirect.dll
Virtual Paths:
root/index.cfm <- works
root/dan.cfm <- doesn't work
Server:
Windows 2008 R2, IIS 7.5 and Coldfusion 10
Rest of my configuration:
Update 1
NTFS Security Information on /wsconfig/1 folder:
Answer - TLDR
Map a virtual directory named "jakarta" to CFUSION INSTALL\config\wsconfig{instance id}
No need to add APPPool permissions to folder...
Right click on the website and add a mapped virtual directory named "jakarta" to C:\Coldfusion10\config\wsconfig{instance id} (in my case, it was \1 )

Resources