Last post Jun 23, 2014 12:26 AM by shyambabu.kolipaka
Jun 16, 2014 07:34 AM|shyambabu.kolipaka|LINK
we are using System.Web.HttpContext.Current.User.Identity.IsAuthenticated to authenticate the user to access few pages from our website. We hosted the website on Virtual machine. It is unable to authenticate
even I provide the correct virtual machine credentials.It is working with other system which is not vitual machine. So, Can any body help me to sort out this issue?
Jun 16, 2014 07:46 AM|PatriceSc|LINK
we are using System.Web.HttpContext.Current.User.Identity.IsAuthenticated to authenticate the user
Unclear. It tells if the user is authenticated or not. It doesn't authenticate the user as such. Also "I provide the correct virtual machine credentials" is not crystal clear. Which authentication method do you use for your site? Where do you provide those
credentials? Which credentials do you provide? (the user should provide its own credential, I'm not sure what you called "virtual machine credentials").
If you meant your app runs under a particular account which is defined on the VM, it is not enough to have IsAuthenticated being true. IsAuthenticated is true if you do know who is the user using the browser that access to the web site (either using Windows
integrated authentication or a login form).
Jun 16, 2014 08:32 AM|shyambabu.kolipaka|LINK
Thanks for reply.
The website's wen.config configured authentication as <authentication mode="Windows"/>. we have same website hosted on another machine(this is not virtual machine). when we are accessing that website IsAuthenticated is true If I provide the windows login
credentials of that machine.
As I said now the website is hosted on virtual machine. the website on virtual machine is unable through the "IsAuthenticated" if I give the virtual machine's windows authentication credentials.
So, Am I missing something to configure for websites authentication when it is hosted on virtual machines?
Jun 16, 2014 08:45 AM|PatriceSc|LINK
VMs are part of the domain ? They do have access to a domain controller ? What happens exactly when you provide a user credential (I'm still not sure what you call the "Windows login credentials of that machine"?). To me what should be provided is the credential
for whatever user that wants to log to the site. This is not a machine but a user that logs to the site. The machine can run web pages under its own identity but is is unrelated to the authenticated user. Try the Windows log and in particular the Security
log that might tell you what didn't worked when you try to log.
BTW have you succeeded in giving access to the Windows groups that are allowed to access this app ? (if not it would likely show for now you just can't access the domain from this VM).
We are using VMs but this is rather an admin side configuration and as a developper whatever they have done just works for us (basically I have almost no way to tell this is actually a VM and basically I never have to care wether or not this is VM, it just
works the same). At some point you'll perhaps have better help in an IIS admin forum at
http://forums.iis.net/ rather than in a development oriented forum.
Edit : going back to this "virtual machine's windows authentication credentials". Is this the same credentials that the one which is used on the non VM machine that works? Once again if you just want a replacement there should be no difference that is if
some user credentials allows to have access then the same user credential should be able to have access as well. It seems to me you might confuse the credentials under which the app runs and credentials used to know who is accessing the site through a browser.
Jun 23, 2014 12:26 AM|shyambabu.kolipaka|LINK
Thanks again for the reply...
This issue has been resolved by installing the Windows Authentication feature on IIS and enabling the windows Authentication on Authentication panel of website.