i was setting up Coldfusion2021 on IIS and found o...
# cfml-beginners
g
i was setting up Coldfusion2021 on IIS and found one directory which is also there and that was an asp.net code, now when i configured IIS using web configration tool, it included all the sites in IIS even the .net one now all my CF sites working but when i browse my asp.net i get 404 not found even on html file, i tried looking on google for this issue but every link is specifying something else, i tried most of them, none worked, is that IIS is too picky, i see the sc_scriop[ts and jakarta folders mapped there in the asp.net folder but as far as i know that should not make any difference, any clues
e
ASP.NET files should be using the IIS app_pool not Tomcat. So what happens when you go to WebRootDir for that site, you should see a bunch of aspx files. You need to open up the IIS Manager and click that site, then click handler mappings and map your aspx file as request path *.aspx module. https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/bya7fh0a(v=vs.100)?redirectedfrom=MSDN
g
thanks i updated my iis for one of the cf website is showing me this error , even the file do exists The web site you are accessing has experienced an unexpected error. Please contact the website administrator. The following information is meant for the website developer for debugging purposes.Error Occurred While Processing RequestFile not found: /default.cfm Resources: • Check the ColdFusion documentation to verify that you are using the correct syntax. • Search the Knowledge Base to find a solution to your problem. Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36Remote Address 10.159.41.106Referrer Date/Time 05-Aug-22 08:47 PMStack Trace
Copy code
coldfusion.runtime.TemplateNotFoundException: File not found: /default.cfm
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:165)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:231)
any idea what i am missing in IIS, it seems some permissions issue but not sure what is going wrong
e
there is IIS and then there is tomcat. Tomcat runs the coldfusion instance. The error above is tomcat. The one "asp.net" site needs to be configured to just run asp.net files and not use the iis bridge or mapping. right now you still have IIS passing traffic for that site to coldfusion, then coldfusion is trying to find the local index file to run, hence the error.
g
Still confused I separated both coldfusion and asp.net sites But this happens only with cf site
I dropped the asp.net site and recreated it That started working but the cf started having issues while they were almost untouched
e
Without having complete access to your logs, its hard to describe exactly what is happening. In short, You have ASP.net sites that the IIS handler should only use IIS for. You have ColdFusion sites, that the IIS handler should pass on to the Coldfusion (apache tomcat) instance. 99 percent of the time it comes down to a messed-up install as the installer should have been run "as administrator", which is one of those tiny caveats with Microsoft and whatever patch version is affecting UAC this week. So that being said, dump your logs.
g
ok, let me add those
"Error","ajp-nio-127.0.0.1-8020-exec-5","08/07/22","180009","","File not found: /default.cfm The specific sequence of files included or processed is: C:\inetpub\wwwroot\default.cfm'' "
from application.log of coldfusion file
and the file is in D:\myproject\folder1\default.cfm
here is the IIS Log
Copy code
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2022-08-07 17:00:09
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2022-08-07 17:00:08 10.159.41.106 GET /default.cfm Debug=Off&OpenType=Default&OpenID=0 443 - 10.159.41.106 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/104.0.0.0+Safari/537.36 - 200 0 0 259
2022-08-07 17:00:08 10.159.41.106 GET /favicon.ico - 443 - 10.159.41.106 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/104.0.0.0+Safari/537.36 <https://website.com/default.cfm?Debug=Off&OpenType=Default&OpenID=0> 404 0 2 16
e
Put your file in "C:\inetpub\wwwroot\" . This started out as many sites, now its down to your default site, on IIS, being placed upon "NOT BEST PRACTICE" C Drive default location.. Either you are trying to run coldfusion or .net files. CF/C/L/ML files are all coldfusion. IIS really is only acting like a proxy server, which if all you are using is Coldfusion, You really do not need. Install Apache HTTPd server, its faster, more secure, and uses far fewer resources than IIS. On a production server, you shoudl down the default site, and the IIS_ROOT should be on a separate drive. Really need to start by looking up "IIS Best practices" then follow it up with "COldfusion Lockdown guide". If its just a dev install running on your internal intranet without any kind of internet access and limited if any real access to your network then you are alright..