Issue while enable SSL in NopCommerce v3.80 - c#

I have been using nop commerce v3.80.
They have provide an option to enable ssl in admin.
While enabling ssl in admin->store->enablessl option
I have been getting error like
This page isn’t working.
Redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
Even I tried redirection URL in web.config, but getting the same error. Can anyone suggest me to rectify this issue...!

First of all i say because it may happen sometimes 😉 do you set ssl certificate and bindg in iis?
...
And here is the solution, try to check Force ssl for all pages on settings,and then restsrt nopcommerce and your problem will solve.
If it doesn't work, try clear your browser cache and history or use incognito page, if the problem solved with incognito,it means your browser caches and histories should be clear.

Related

Localhost Redirected you too many times DotNetNuke

I have a DotNetNuke application I am trying to setup on localhost.
The application was working fine until I tried to change database connection. After reverting back the changes I made in conenctionStrings, I am getting error whenever I try to run it. The error is
The localhost page isn’t working
localhost redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
Well, obiously I tried clearing cookies and also tried on multiple browsers but getting same result. Page is not working.
What can be the possible reason ?
Without seeing any source code the best answer I can give you is this, something in your code if forcing a redirect to iteself, which then forces another redirect to itself, etc.
It would basically by the same as doing this,
void DoSomething() {
// Infinite loop, activate!
DoSomething();
}
If you provide some source code or a link to it in the question I could give you a more detailed solution, but as the question stands this is the best I can do.
I had this issue a while ago, setting the trust level to full trust (in web.config) solved it for me.
Happy DNNing!
Michael

HTTP redirecting to HTTPS automatically in ASP.NET MVC

I am facing a problem in running my application in localhost, I added rewrite rule to my web.config to redirect all my http site to https because I added ssl certificate but that was for online version. In localhost I commented out my rewrite rule in web.config still it is redirecting my http://localhost to https://localhost due to which my site is not running locally and I am not able to work.
Any help will be appreciated.
I fixed the issue by a hit and trial method but it worked perfectly for me. What I did was that I changed the port number for example it was http://localhost:5722 previously I just changed the port number to http://localhost:5729 and it started working :)
Browser put 301 in cache :
If you use "301 Moved Permanently" your browser (like Chrome and Firefox) put in cache with no expiry date that http://localhost need to be redirected to https://localhost.
To force browser re-fetch, you can :
open your DevTools, check Disable cache ;
clear you Browsing History
cache ;
To control cache from server : If you want to control 301 cache from server you can use Cache-Control Expires http header.
To cancel a 301 on server : If you want do undo 301 on your website, just do another 301 to redirect back again : Your browser will re-fetch the old cached url to confirm that the old redirect isn't still there.
Change redirct type : You can use 302 or 307 http redirect (no cache) but it's not the best SEO practice...
try to rebuild the project, and make sure that you comment in the web.config like this example :
<!-- some text -->
hope this helps

GET https://www.google-analytics.com/ga.js net::ERR_TIMED_OUT

When I'm Accessing my Site with Google Maps, The Maps load so slow and then this error Shows up. GET https://www.google-analytics.com/ga.js net::ERR_TIMED_OUT
Tried clearing my Cache and Browsing in Incognito Window but all show the same error
Tried in Other browser like Firefox but same error shows
Did someone encountered the same error before?
Please Help me , Thanks
I had this problem, solved by disabling the HTTPS Everywhere browser extension, which I believe is forcing the downloading of the ga.js through https from where it is not necessarily available.
This might be related to Firewall blocking google-analytics.com

SqlMembershipProvider not able to login with frames or iframes only in Internet Explorer

I am using SqlMembershipProvider with asp.net and it works fine until I try to use iframes or frames.
When I login without them, I have no issues but if I wrap our website from our customer's site, and try to login, it just flashes and comes back to the original site with all the fields cleared.
I can duplicate this easily with our site on IE 8 and 9 but I have no issues with firefox or chrome.
Is there another way of accomplishing this or getting around it?
====== EDIT ======
Our clients are calling our 'portal' from their website and would like to integrate our portal into it seamlessly as if it is part of their site.
We thought we could accomplish this with an iframe wrapping our portal from their site but I am not having any luck with it working with the login, from what I have read it's a cross domain cookie problem(?).
Hope this helps clarify things some...
You can use FormsAuthentication.SetAuthCookie, and pass the initial credentials in the URL in encrypted way,
This question will strongly help you in internet explorer, other broesers ar OK,
Cookie blocked/not saved in IFRAME in Internet Explorer
I have tested with Chrome, Firefox, Opera (Will give a warning first time), it is working perfectly, no problem, but with IE, you need to see the question that I have provided.
Internet Explorer won't send cookies through IFRAMES unless you specify a P3P header.
The easiest way of doing this, is indicating a custom HTTP header in your Web.config:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="P3P" value='CP="CAO PSA OUR"'/>
This way you do not have to mess in your code with this stuff.
This HTTP header is called Compact P3P, and it should do the trick because I have been in the same situation than you before.
I am afraid that maybe the Safari browser it is a little bit trickier, since Safari won't send the cookies unless the user interacts with the IFRAME content as seen here: Iframe, cross-domain cookies, p3p policy, and safari with error: A required anti-forgery token was not supplied or was invalid . What would probably be not a big problem in your case.
Cheers.
If it's an option to install a subdomain in the DNS and add host headers to IIS, you could try to circumvent cross-domain security by setting up the subdomain to point at your site.
[top] example.com # customerIP => [iframe] portal.example.com # yourIP
Make sure the domains are shared by putting this JavaScript in your code:
document.domain = "example.com"

.NET Cookies still working even tho' I have disabled cookies in browser. How?

I am trying to disable cookies in my browser, and check that they are disabled in my .Net web app.
One on page I am storing a cookie like this:
HttpResponse response = HttpContext.Current.Response;
response.Cookies[cookieKey].Value = cookieValue.ToString();
On another page, I am retrieving the cookie like this:
cookieValue = request.Cookies[cookieKey].Value;
I am trying to disable cookies in my browser to make the above code fail but I can't seem to do that. I am using Internet Explorer 7 and 8. (I am working with these 2 browsers because IE7 is my company's current standard and IE8 is the future company standard).
In both of these browsers, I went to Internet Options > Privacy > Advanced, and checked override cookie handling, and blocked both 1st and 3rd party cookies (also deleted any existing cookies/history/temp files).
After doing that, I would expect the above code to not work, but it still works. I can still set and retrieve values from the cookie. Any idea why? I thought maybe the cookies aren't actually getting disabled, but if I go to hotmail.com, it gives me an error message saying "Your browser must allow cookies before you can use Windows Live ID." so I don't know.
Why do cookies still work when visiting my ASP.Net site?
Updated 5/14/2012:
It appears that the cookie settings in the privacy tab are ignored on local intranet sites (I don't know if that is normal or not) so this was giving me problems. I did however figure out a different way to disable cookies (which I needed for testing purposes), even for intranet sites. In IE8, I went to Tools > Developer Tools > Cache > Disable Cookies. This worked as expected and i could complete my testing. However I still have not found a solution for IE7.
Are you running the website locally?
I had a similar question I asked on SuperUser.
From what I can tell, Sparky was correct. localhost / 127.0.0.1 will always accept cookies regardless of your settings.

Categories

Resources