Solved

Switch to a different default website

Posted on 2004-09-17
25
248 Views
Last Modified: 2008-02-01
Okay - i first asked this question in the coldfusion section but I believe the problem is with IIS possibly.  Background:  
I have installed ColdfusionMX and am using IIS as the web server.  I understand how to change a default site but for some reason I am getting a windows authentication login before it will show the new site.  I have made sure that the index.cfm is at the top of the list and I have changed where IIS points for the new site.  Here is where the problem may be:
The past webmaster turned off the localhost to force everyone to the IP address outside.  I don't understand enough about IIS to even know you could turn off localhost -or even why you would?

If anyone has run into this problem and found a fix - I would greatly appreciate your input.
Thanks!
Aimee
0
Comment
Question by:ahillman
  • 13
  • 12
25 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 12086947
Hi Aimee,

I presume you would like to allow public access and do not require user authentication.  If so, here's what you need to do:

- go to Internet Information Services (Control Panel -> Administrative Tools -> Internet Services Manager)

- expand the Internet Information Services tree and the server tree, right click your website and select 'Properties'

- in the properties window, under the 'Directory Security' tab, click 'Edit' beside 'Enable anonymous access and edit the authentication methods for this resource'

- in the Authentication Methods window, make sure that the 'Anonymous access' box is checked and that none of the 'Authenticated access' boxes is checked

- click 'Edit' beside 'Account used for anonymous access' - the default account is IUSR_<servername>, you can use that or select a different one, but make sure that account has appropriate NTFS permissions to access your web page files and folders wherever they are located.

- go back to the 'Directory Security' tab on the website Properties window, click 'Edit' beside 'Grant or deny access to this resource using IP addresses or internet domain names'

- in the IP Address and Domain Name Restrictions window, beside 'By default, all computers will be:' select the 'Granted Access' radio button and remove any exceptions listed in the 'Except those listed below:' field.

These steps should allow public access to your website without a required log in and will allow make sure there are no access restrictions based on IP address.  Let me know if this solves the problem.
0
 

Author Comment

by:ahillman
ID: 12087234
Thank you for your quick response - All of the steps you listed I went through and double checked my settings. The only difference was the authenticated acces windows integrated access was marked, I unchecked this.  Now the site just comes up to a can not be displayed page with in the address bar is the ip address of the webserve and then my index.cfm url.  I placed the Authenticated acces check mark back onto the windows integrated authentication and then I of course get the windows login again and then my site is viewable after logging in.
What is strange is if i have index.htm as the beginning page then I get that page no problem - its like IIS doesn't recognize my .cfm extensions even though they are listed in the IIS application mappings to the correct directory.

Any other thoughts?
Thank you.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12087279
Just to confirm that I have this right:  if you go directly to index.cfm as the default page, it doesn't appear, but if you arrive through the IWA log in or an index.htm page, then the index.cfm page displays properly?
0
 

Author Comment

by:ahillman
ID: 12087309
Not sure what the IWA stands - but I believe yes.

Maybe I am trying to view wrong -
I am going through IIS and opening my website - I right click on the index.cfm and go to browse.  From there I get the windows login authentication or if I click on an index.html (test page) then it opens right up and no windows login.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12087408
sorry, IWA + Integrated Windows Authentication.

"Maybe I am trying to view wrong -
I am going through IIS and opening my website - I right click on the index.cfm and go to browse.  From there I get the windows login authentication or if I click on an index.html (test page) then it opens right up and no windows login."

If you click on an html page on your hard drive, it will automatically open in your browser.  In such a case, you're just looking at the web page on its own, not via the website.  Similarly, if you try to look at a .cfm (or .php or .asp) page the same way, your browser can't open them, because it needs the web server (with ColdFusion, PHP or ASP installed) to serve those pages, ie. your browser cannot read them on its own as it can read html pages.

Therefore, it's important to make sure you browse your website/web pages via the web server, ie. open your browser and then input your website (or server name or 'localhost' into the address bar).
0
 

Author Comment

by:ahillman
ID: 12087458
okay - thinking out lout here:  I am working on my web server - I closed out IIS - have the old site currently set as the default website - opened up IE went to File open and browsed to my index.cfm page - that opens up the editor I created it in.  Then I try just opening IE and typing in the http://ip address/mysitename/index.cfm.  pops up windows authentication login.

0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12087499
What happens if you enter your username and password?  Does the index.cfm page display properly?

What happens if you disable Integrated Windows Authentication in your website configuration and then browse to http://ip_address/sitename/index.cfm?
0
 

Author Comment

by:ahillman
ID: 12087523
If I enter the username and password then it opens to the index.cfm page.

If disabled integrated windows auth. :
You are not authorized to view this page
You do not have permission to view this directory or page using the credentials you supplied.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12087999
Have you checked the NTFS permissions for your website files and folders?  Make sure that the Anonymous Access user (probably IUSR_<servername>) has permissons to access the website files & folders.  The Anonymous user must also have 'log on locally' permissions.
0
 

Author Comment

by:ahillman
ID: 12088015
If those were incorrect wouldn't the current .asp site have problems being viewed?
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12088047
Yes, but I wanted to confirm anyway as this really seems like a permissions problem.
0
 

Author Comment

by:ahillman
ID: 12088100
I agree.  The IUSR is the same for both sites.  This is a 2000 Server that is being used for the Web server.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 33

Expert Comment

by:humeniuk
ID: 12088158
If the NTFS permissions are ok, here are some other things to check:

- IUSR account should be included in the Guests group on the computer (you can also try adding it to the Users group to see if that allows access).

- confirm that the 'Allow IIS to control password' box is checked in the Anonymous User Account configuration in Authentication Methods (under the Directory Security tab in website properties as above)
0
 

Author Comment

by:ahillman
ID: 12091211
I double checked the IUSR account and it is in the Guest s group and I even tried adding it to the users group but that didn't resolve the issue.  I double checked the permissions to the web site folder and it is web shared with read and script execute rights.  Its like a bad dream...
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12091659
<< Its like a bad dream... >>
I've had dreams like that   :-)

The strange thing is that it's clearly configured properly and can serve the .cfm page when it wants to.  Unless someone has a better suggestion, you should consider uninstalling/reinstalling IIS (at least, that's what I would do  at this point).
0
 

Author Comment

by:ahillman
ID: 12101778
Even if the .asp site is being viewed properly?  Don't forget the last Web person here disabled localhost.  The reason being to always use the full IP address.  Could this be causing a problem?
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12101841
I'm just not sure how localhost was disabled.  Can you get to your site with 127.0.0.1 on the server machine?

Perhaps you should check your hosts file and see if there are any entries there.  You should only see:
127.0.0.1  localhost
0
 

Author Comment

by:ahillman
ID: 12102165
I can get to it but I still have to login.  How do I check my hosts file?
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12102453
Location of the hosts file:

Windows XP = C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K = C:\WINNT\SYSTEM32\DRIVERS\ETC
Win 98\ME = C:\WINDOWS

You can open it/edit it in notepad or another text editor.
0
 

Author Comment

by:ahillman
ID: 12102642
All looks good there.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12103053
It still looks like a permissions problem to me.  It appears that the server is configured properly, because you can see html asp and cfm pages provided that you use Integrated Windows Auth, otherwise you get this error message "You are not authorized to view this page. You do not have permission to view this directory or page using the credentials you supplied" for cfm, but you can see html and asp.  The implication is that there is a permission problem relating to the cfm files or something in the CF server.  

Perhaps there is an executable file of some sort that needs to be accessed in order to serve the pages and its NTFS permissions don't allow the IUSR account access.  I don't know enough about ColdFusion to know where else to look, but I did look up the instructions for configuring ColdFusion Server to work with IIS.  It appears that in the configuration that there is an executable (iscf.dll - default location: c:\cfusion\bin\iscf.dll) that is used to map the files with the cfm extension to the ColdFusion server.  Since you can see the cfm files when you log on, perhaps you need to adjust the NTFS permissions for iscf.dll in order to allow the IUSR account to access it.

(long pause)

OK, I tested this theory with PHP.  Using PHP, IIS is configured to use php.exe to process files with a .php extension.  So, I checked the permissions there.  The permissions there were configured to allow everyone full access.  I changed the permissions to restrict the file to the admin account only.  When I went to the page, the login screen appears.  If I put in the admin account name/password, I am able to see the file, otherwise, I can't.  I then shut off Integrated Windows Authentication and tried again and got the same error message that you get.  In other words, I was able to duplicate your ColdFusion problem with PHP by changing the permissions.

So, here's what you should try:

In Internet Information Services, right click your website and select properties.  Under the Home Directory tab, click 'configuration'.  In the Application Configuration window, scroll down the list of extensions until you find .cfm and see what executable file/path it refers to.  According to Macromedia, it should be something like c:\cfusion\bin\iscf.dll, but whatever it is, make sure that file allows the IUSR account full access (or you can even give 'Everyone' full permissions for test purposes).  In fact, you may want to set those same permissions for the whole cfusion directory as the executable may refer to other files within that folder.

I'll keep my fingers crossed until I hear back.
0
 

Author Comment

by:ahillman
ID: 12103166
Well, we have found that the .cfm files will load in IE properly before the application mapping extensions are added to IIS.  However, without the extensions, the applications within cold fusion don't work.  Once we add those application extensions, we are right back to being prompted to log in.  We tried adding full control to the website directory and the cold fusion directory, and we are still prompted to log in. At this point, do you think this sounds more like a cold fusion problem than an IIS problem? You have been very helpful!  Either way - I am giving you the points just for your determination!
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 250 total points
ID: 12103518
<< At this point, do you think this sounds more like a cold fusion problem than an IIS problem? >>
Unfortunately, I don't know enough about CF to say where the problem might be in the CF config.  However, given everything we've covered, I don't see how it could be an IIS problem.  The only additional thing I would suggest would be to make sure that the CF folder permissions are inherited by the CF executable that is associated with the .cfm extension in IIS (ie. so that the file has the Everyone/All permissions as well as the folder - it probably does, but it's worth a look).

<< You have been very helpful!  Either way - I am giving you the points just for your determination! >>
Thank you.  Alas, I'd rather know that it's working than get the points  :-)

You may want to post about this in the Cold Fusion TA.  If so, refer to this question so that the CF experts there know what ground has been covered.
0
 

Author Comment

by:ahillman
ID: 12103695
Sounds good to me - thanks so much for your help.  Nothing more frustrating than not finding an answer!  If you have an email address in your profile I would be happy to let you know the resolution when one is found.
0
 
LVL 33

Expert Comment

by:humeniuk
ID: 12103789
I do and please let me know.  I will be interested to hear about it.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now