|
Posted by Rolando Ramirez on April 27, 2006, 10:22 am
Please log in for more thread options
I'm having trouble with authentication when using aliases in the "hosts"
file (located at C:\WINDOWS\system32\drivers\etc) wich point to "127.0.0.1".
Sql Server:
=======
All of these sentences work:
osql -E -d pubs -Q "select * from authors" -S localhost
osql -E -d pubs -Q "select * from authors" -S 127.0.0.1
osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheIPAdress]
osql -E -d pubs -Q "select * from authors" -S [ReplaceWithTheDNSName]
but this doesn't work:
osql -E -d pubs -Q "select * from authors" -S [ReplaceWithMyAlias]
it returns "Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection."
I found a workaround which is to register the alias in the "SQL Server
Client Network Utility"
WebSite using NTLM Authentication:
==========================
Loading a page in IE
This two addresses just load the page
http://localhost/MySite/default.aspx http://[ReplaceWithTheDNSName]/MySite/default.aspx
the next two show a window asking for credentials and after the credentials
are entered the page is loaded
http://127.0.0.1/MySite/default.aspx http://[ReplaceWithTheIPAdress]/MySite/default.aspx
but the one using the alias shows a window asking for credentials BUT after
the credentials are entered the page is NOT loaded and "unahutorized" error
message is display
http://[ReplaceWithMyAlias]/MySite/default.aspx
the same problem shows up when calling a WebService from a net client
program.
What's going on ? Why aliases to the local machine doesn't work ? I've also
tried creating the alias to the IP address instead of the loopback IP
address with same results.
|