0

I am using Windows Authentication.

I have this in my code:

CultureInfo CultureInfoDateCulture = new CultureInfo("fr-FR");

CultureInfo provider = CultureInfo.InvariantCulture;
provider = new CultureInfo("fr-FR");
try
{
   startDateTime = DateTime.ParseExact(startDate, "d", provider);
   endDateTime = DateTime.ParseExact(endDate, "d", provider);
}
catch
{
   Alert("Insert Failed: Date Format is incorrect. Please make sure it is in the following format: Day/Month/Year i.e. 1/1/2012", "error", false);
}

This is the screen I get when I access the application over HTTPs (Edit: For some strange reason I am not able to get this image showing, the logon screen is the one where the user is asked to connect to the server)

enter image description here

How can I go around this? I do not want the user to be access to re-logon because of the above code, is it a matter of access permissions on the serveR?

UPDATE:

After using Chrome's developer tools to find out what files are trying to be accessed it turns out that a missing image was the reason for the user being ask to logon. For some reason, the server was returning a 403 error (instead of a 404 error, most probably because of security to not allow users to ping common files to see whether they exist). Once the image link was removed, it did not prompt for re-login any more. I thought the CultureInfo was the reason because this is the only code common used in those two pages and not in the others, however, the fault was of a jQuery DataPicker CSS file.

Ryan S
  • 3,210
  • 17
  • 48
  • 79
  • The login screen has nothing to do with HTTPS, it's permissions on the server. – James Oct 29 '12 at 09:59
  • @James I Agree, I forgot to mention I am using Windows Authentication, hence the user is required to logon OR he simply does not have access rights so he is not allowed. Whatever the case, which permissions need to be set? – Ryan S Oct 29 '12 at 10:00
  • You need to enable anonymous access to the application on IIS. – Andrei Oct 29 '12 at 10:01
  • @Andrei - What security consequences does this have? I am doing authentication manually anyway, but by doing this is it threatining the security of the system? – Ryan S Oct 29 '12 at 10:02
  • @RyanSammut have you configured your site for Windows Authentication in IIS? – James Oct 29 '12 at 10:11
  • @James - I am only getting the user name depending on what is logged in, but then I am checking whether the user has access with a database of access I have. – Ryan S Oct 29 '12 at 10:14
  • @RyanSammut that doesn't answer my question...also when does the login screen appear? Is it only when certain pages are accessed or is it just accessing the site in general? – James Oct 29 '12 at 10:16
  • @James Sorry for my answer, I should have said Yes :) and to answer your second one, this error is only evident on the pages where I have the code shown in the question. In the other pages this works fine. This is an internal web based application and not a public one. – Ryan S Oct 29 '12 at 10:21

1 Answers1

1

Could DataCulture be the reason why the user is asked to re-logon on HTTPS

No

Is it a matter of access permissions on the server?

Yes, authentication is purely related to the permissions granted by the server on the resource you are trying to access.

James
  • 80,725
  • 18
  • 167
  • 237
  • thanks very much for your answer. The problem was a broken link as indicated in the Updated section of my question. – Ryan S Oct 29 '12 at 14:12