HTTP and HTTPS causes redirection Loop - http

I am making one Central Authentication server module (CAS). For that I am configuring web.config file. Since I have to integrate it with other Applications I don't want to write any code in code behind file. The configurations are
OS - Windows 7
IIS 7
Visual Studio 2005.
The server which hosts the cas application has the login page which authenticates the user. I am able to redirect to the cas login page at first time.
My problem is that I am not able to redirect to my own application page which is default.aspx hosted on my PC. The CAS server runs linux os and I am using Windows 7. I am getting redirect loop and after login from cas login module, I am not able to see my page. Firefox shows "waiting for servername" and "waiting for hostname" in status bar continuously. Can any body help me in solving this problem??? I am badly stuck here and very desperate to come out of this as soon as possible.
I am using form authentication mode in web.config. Or is it the problem with HTTP and HTTPS?

Sounds to me like the windows machines is not seeing the session as authenticated, but the CAS is seeing the session as authenticated. Therefore windows redirects to linux, which redirects to windows, which redirects to linux....
I think you see the picture.

Related

WebRequest.GetResponse() over SSL

I am having trouble calling an SSRS report server over SSL. I cannot figure out whether the issue is with my code or the configuration of either my web site or the SSRS site (both are under my control).
Below is some background. I am providing as much information as I can, because I don't know where the problem is. Some of it may not be relevant.
Web site (ASP.NET 4.0) and SSRS (2008 R2) are running on same server.
Everything works fine when both are running using http/port 80
Error returned by the SSRS url is "The remote server returned an error: (401) Unauthorized."
Certificate is fine, just created and installed it.
Certificate specified under https binding in IIS, and under SSL info for SSRS.
Web site uses anonymous authentication.
Application Pool Identity of web site is same domain user as SSRS service account. This same user is assigned to the "Browser" role in SSRS.
I have tried opening the HTTPS URL both with and without specify port 443
SSRS URL uses same sub domain as web site and both match the certificate
In my code, before calling GetResponse, I set Credentials to CredentialCache.DefaultCredentials. Also tried DefaultNetworkCredentials and leaving that line of code completely out.
Even though SSRS is running on the same server as the web site, I cannot "see" the SSRS site in IIS (seems weird and a mystery I haven't been able to solve). I do not see more than one version of IIS installed.
Nothing in SSRS logs (nothing, no indication that SSRS ever even got the request)
My intuition says this is a configuration setting somewhere, rather than a code issue, but I cannot figure it out. I've read a little about impersonation and wondering if that is what I need. I'd rather not bypass certificate validation unless that is the proper approach in circumstances such as this. If this is the problem, I want to do it properly.

What's causing "Windows Security" login prompt to occur for just one user?

Details:
ASP.NET webforms
.NET 4.0
Windows Authentication
IIS 6
Windows Server 2003 SP2
Only one user is having an issue connecting to this one virtual directory. He says he sees this login form in IE, Chrome, and Firefox. He uses his Windows credentials and is unable to login. He is able to access other websites hosted in other virtual directories on the same domain. No others are experiencing this issue. He says he was able to access the site just fine a few weeks ago. What could be causing this dialog box to appear for just this user for just this site no matter what browser he's using?
Since it's all of the user's web browsers, this points to something with the user's permissions on the server for that particular website.
If it worked before as the user states, perhaps you can ask your server admins if anything was changed regarding user permissions on the server a few weeks ago.
Another path to go down would be to see if the user (or desktop admins) has installed any software on his/her machine that would disallow or alter Windows authentication in the browser for this site. This is far more unlikely than a simple user permissions issue on the server since he/she can still access other protected websites with Windows authentication, but it might be worth asking about if you've run out of options.
Yet another unlikely possibility would be a rule change on the user's network's firewall that would somehow disallow this user's IP address and Windows authentication to this website. Again, super unlikely, but I wanted to cover the bases here.

Deploy ASP.NET to intranet server with host name,keeps asking me for credential

i am deploying an ASP.NET 4.0 Application to a production server .
The server is an intranet server. In the binding of the site, I assigned an IP Address and a port number and it works fine in the form http://xx.x.xx.x:888/. Then I would like our user to use a friendly URL to access to the website. So I asked our IT manager to assign a friendly URL to this url. the friendly URL is like this http://sitename.mycompanyname.ca:888.
The problem is when I try accessing the site with the friendly URL it keeps pop-asking me for my credential and never lets me get into the site. Thanks for your helping.
Server environment:
Windows 2008
IIS 7.5
Server and users are all in intranet.
*Update:
If I stop the site, it gives me another "Internet explorer cannot display the page" error. So I guess this site is taking care of the request for this host name
I found that I can browse this site using host name if I am on the production server.But it doesn't work if I try on another computer.
Just found that It doesn't work with IE 9 32 bit but it works with Chrome and firefox, which is very weird...
*
The site's authentication and authorization is like below
I don't see that you mentioned this, but did you try adding the port to your friendly URL? ie. http://sitename.mycompanyname.ca:888 ?
Let us know!
Ricky
Enable anonymous authentication. That's it ;)
http://technet.microsoft.com/nl-nl/library/cc770966%28v=ws.10%29.aspx

Anonymous Authentication in IIS over https does not fire a postback

I recently decided to change from using Windows Authentication for my internal web applications to Forms Authentication. I've not used the latter very much and one site explained you have to enable both Forms and Anonymous for this to work. The idea is to verify user passwords against an active directory then grant them access accordingly. I had this working just fine locally and when publishing to IIS 7.5 it still worked. It was just a basic Visual Studio project that would redirect to our homepage.
The problems arose when I tried accessing this same project securely with https, I included the full domain and it would load the new login page but when I clicked login it would do nothing. Since then I've scoured the web and found numerous mentions of this and that and tried many of them to no avail.
It was only later I created a blank project with a single button and one line of the code on the page to see if a post back had fired. After publishing I only enabled Anonymous Authentication in IIS and browsing to this basic test app using http when you clicked the button, false on the page changed to true - indicating a post back. Yet with https it just remains false. I think this may be why the active directory login wasn't working as it too had Anonymous enabled.
I'm still pretty new at the secure side of things but with the details passing over I have to use a secure connection just for the login then it can redirect to the usual applications we use internally.
I'd appreciate any thoughts you may have regarding this.
Thanks!
We use this configuration (anonymous IIS access, forms authentication, and https) successfully all of the time.
There are three things that you should do to track this issue down:
1) Verify that there are no javascript errors in the page that break the button (i.e. a javascript file not being delivered to the page)
2) Check the windows event logs for exceptions from asp.net/iis.
3) Install and run fiddler, select Fiddler Options... from the Tools menu, click on the HTTPS tab and ensure all of the checkboxes are checked, then run your website and look at the requests and responses, particularly when you press the button.

Visual Studio Localhost Redirect Problem Asp.net

I have a test site running on Visual Studio 2008. When I try to debug and it opens up the browser through localhost, I can this error"Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
However, when I open the site through IIS, it works fine.
Things I've Tried:
Clearing Cookies
in firefox you might be able to clear your cookies and authenticated session list. Last time this happened to me it was because i was authenticated with the wrong credentials. One page thought i was authenticated, the other knew i wasnt and i was being bounced back and forth.
Need more info here. Are you using Forms authentication? Is it possible your Login page is set incorrectly? Have you tried just setting Visual Studio to debug using IIS? Does that work OK? What about debugging with IE? Same behavior?
I believe the built-in development web server does not support all forms of authentication.

Resources