MojoPortal and certificates

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/5/2014 1:52:55 AM
Gravatar
Total Posts 83

MojoPortal and certificates

Hi,

We have a MojoPortal website, this website only got 1 page that is not protected my login(username/password). To protect the content we now need to implement a certificate(SSL), this is done at our host to pay a specific price / year. The question is if there is any thing we should know about MojoPortal and certificates before we buy this certificate?

Not only the username/password is used but also the upload and download of files. Its important that also this part is protected by the SSL, could this be a problem?

BestRegards

12/5/2014 7:42:54 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

should be fine so long as it is a real ssl certificate that matches your domain name and not some shared ssl scheme that some hosts offer where you have to use a shared domain for secure pages that is different from the site domain, that kind of funky thing won't work.

once it is working I would go to site settings and check the box to require ssl on all pages. since relative urls are used it should then also use ssl for file uploads and downloads

see also Use SSL, and Configuring SSL in mojoPortal

note for example that we use ssl on this site and our demo site

12/8/2014 3:57:36 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, yes, I have read those links and it looks to be strait forward.

In this case the host will order a specific certificate for our domain to Thawte, this will be installed on a shared server(multiple other websites on the same server). From what I read, this is no problem, right?

12/8/2014 7:21:07 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

if you mean a wild card certificate that will be used for multiple hostname sites within the same domain, that should work fine, we use the same wild card cert for this site and demo.mojoportal.com.

 

12/8/2014 7:26:31 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

No, from what I understand my host the certificate will be specific to www or just http. Will this works? And what should be the best choise? www?

12/8/2014 7:38:42 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

the only concern with multiple ssl certificates is that you can only bind one certificate to a given ip address. with a wildcard domain cert each host within the domain can use the same ip address and same certificate. But if the sites each need different certificates then they each need their own ip address as well.

whether you prefer somedomain or www.somedomain is entirely up to you but it must match the certificate and it is probably best not to change it for already established sites. On this site we have a wildcard domain that supports both mojoportal.com or www.mojoportal.com, it matches both since it is a wildcard but we force it to www if a request without www comes in. But if it were not a wildcard then the site would not be accessible using any variant that does not match the certificate, that is if the certificate is specifically for www.somedomain.com and a request for https://somedomain.com comes in IIS cannot serve the page because it does not have a certificate that matches the request. probably in that case a cname dns record can point somedomain.com to www.somedomain.com to solve it

12/8/2014 9:45:18 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks! I do however think that I dont have a choise in this case, I need to specify the exact URL so it will be with the www.

Im still not sure if the certificate offered by my host will work with MojoPortal? This is what thay say :

SSL certificate of type Thawtes SSL 123 including priviate ipv4-address. Its not possible to change hostname after the order have been placed and it will be paid per year. It is only possible to choose www or no www, no wildcard.

The ordered certificate will be installed on to the server where my webpage is installed. This is a multi host environment(many other webpage on the same server) but this certificate will be bought and used only for one specific mojoportal webpage.

Will this work?

12/8/2014 10:10:47 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

so they are saying the don't offer wild card certificate, that means you must order your certificate to exactly match your desired host name

please understand that nothing about mojoportal is connected to or can affect your ssl certificate, that is all handled by IIS, not by mojoportal code. all mojoportal can do or does is to detect the setting you provide telling it whether ssl is available and if it is then it can detect a request that is not using https and redirect it to use https. other than that nothing in mojoportal is doing anything directly at the protocol level, that is all handled by IIS web server. So mojoPortal is no different than any other web application, ssl is not handled at the web application level other than redirect logic. There is no concept of a certificate that will or won't work with mojoPortal, it is separate from mojoPortal, we don't code against the protocol level, we don't do the encrypting of traffic between the web server and the web browser using the certificate, that is all the web server responsibility.

12/10/2014 4:30:21 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thank! One last question, is it possible to redirect http to www with mojoportal? I asking becouse I will only get a certificate for the www version of the URL.

12/10/2014 7:35:27 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

I posted a link about forcing the preferred host name in my previous answers on this thread.

1/9/2015 9:29:27 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Works great BUT could I also add the https:// in the beginning of my www in this AllowForcingPreferredHostName? Right now it seems to only rederict from http://mywebpage.se to http://www.mywebpage.se.

I could try but I read that if it is wrong I will have to revert it with SQL script.

1/9/2015 9:34:16 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

host name and protocol are 2 different things, (http:// or https:// are the protocol part of the url) you cannot enter the protocol as part of the host name for preferred host name setting.

If you set the site setting to require ssl on all pages it should force redirect to https

1/9/2015 9:48:06 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Okay I get it, I have made the changes but when clicking the login link (https://www.mysitet.se/Secure/Login.aspx?returnurl=%2f) I get the following exception in the webbrowser(Chrome) :

 

This webpage has a redirect loop
The webpage at https://www.mysite.se/Secure/Login.aspx?returnurl=%2f has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Learn more about this problem.
Error code: ERR_TOO_MANY_REDIRECTS
 

 

 

1/9/2015 10:00:10 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

that will happen if you put an incorrect preferred host name, that is why we hide that option by default.

if you fixed it in the db you need to clear the cache, ie touch web.config

before entering a preferred host name you must make sure that a direct request for that host name works, and it must be just the host name entered and no other parts of the url nor  / characters

1/9/2015 10:08:41 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

also by default the redirect to a preferred host name is done with a 301 permanent redirect. web browsers cache those which is another reason to avoid putting something incorrect. even if you fix it you may have trouble clearing the web browser cache and the web browser having once been redirected now has the cached redirect and it redirects itself. ie can be particularly stubborn once it caches a 301 redirect.

1/12/2015 1:54:08 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

This is all I got in the PreferredHostName

www.sitename.se (sitename switched to the correct one).

All I needed to do to get it working was changing the SSLIsAvailable so false again.

1/15/2015 7:26:05 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

This is the current status : 

  1. Certificate ordered and installed on webhost
  2. Set redirect preferred name to www.orbitsupport.se and no more or less
  3. Test that redirect works, and it does, if I type http:\\orbitsupport.se it will change it to www.orbitsupport.se
  4. Copy web.config from server
  5. Activate the SSLIsAvailable in web.config
  6. Copy new web.config to server
  7. Load first page(no login or register form), works great
  8. Click on login link that redirects to a page with a login form
  9. Get the following in browser

    This webpage has a redirect loop
    The webpage at https://www.mysite.se/Secure/Login.aspx?returnurl=%2f has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
    Learn more about this problem.
    Error code: ERR_TOO_MANY_REDIRECTS
  10. If I remove the SSLIsAvailable from the web.config every thing works great again becides the https. So right now I have to run the page without the certificate. Could you give me any hint where to look to solve this problem?

 

 

MojoPortal Logg

2015-01-14 01:01:34,041 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 01:03:15,692 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 01:13:21,019 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-14 01:13:21,034 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-14 02:51:58,340 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 02:51:58,620 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 02:51:58,636 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 04:39:40,926 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 04:39:41,082 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 04:39:41,113 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 06:35:58,475 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 06:45:24,856 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 06:45:25,059 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 06:45:25,059 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 07:46:41,405 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 07:48:40,233 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 07:48:40,451 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 07:48:40,467 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 08:06:28,041 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 08:12:10,765 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 08:12:11,077 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 08:12:11,077 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 08:16:26,907 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-14 08:16:26,922 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-14 10:00:24,907 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 11:13:13,147 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 11:13:14,286 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 11:13:14,286 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 13:53:41,011 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 14:37:26,932 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 14:37:27,120 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 14:37:27,135 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 15:18:24,809 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 15:18:25,246 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 15:18:25,246 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 15:50:12,137 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 16:00:17,927 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-14 16:00:17,927 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-14 17:38:20,380 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 19:22:16,019 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 19:27:42,508 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 19:27:42,508 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 19:50:10,921 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-14 19:59:58,979 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-14 19:59:59,557 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-14 19:59:59,666 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-14 20:00:15,032 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-14 20:00:15,032 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-14 23:00:57,162 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 01:25:24,842 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 01:25:25,310 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 01:25:25,310 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 01:25:25,544 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-15 01:25:27,291 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-15 04:31:11,290 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 06:51:27,425 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 06:51:27,956 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 06:51:27,971 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 06:51:28,096 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-15 06:51:28,861 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-15 09:12:40,585 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 09:12:40,881 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 09:12:40,881 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 12:13:38,316 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 12:19:01,933 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 12:19:01,948 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 13:20:27,217 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 13:20:27,545 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 13:20:27,638 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 13:25:45,131 INFO 192.168.10.100 - sv-SE - /Admin/SiteSettings.aspx - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 13:25:45,306 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 13:25:50,732 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 13:25:51,044 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 13:25:51,075 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 13:26:27,674 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 13:26:35,475 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 13:26:35,771 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 13:26:35,771 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 13:26:58,030 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 13:26:58,233 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 13:26:58,264 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-15 13:27:36,484 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 13:27:36,661 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-15 13:27:41,996 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-15 13:27:42,371 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-15 13:27:42,371 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 

 

1/15/2015 7:33:36 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

when you click the login link it tries to go to a secure page, ie if configured as SSLIsAvailable the login page is protected with a redirect to https

if that is not working it means either your certificate is not installed or it does not match the preferred host name.

1/15/2015 9:09:37 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, the certificate are set to common name : www.orbitsupport.se we could choose just orbitsupport.se. Becouse its a certificate I supose that the https:\\ is implicit.

The certificate are from Thawte.com and are installed on the host. 

Is there any other way to check if https is working for www.orbitsupport.se?

1/15/2015 9:42:28 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

"Is there any other way to check if https is working for www.orbitsupport.se?"

just type in the url https://www.orbitsupport.se 

it does seem to be working for me when I try your site.

however https://orbitsupport.se does not work and you will not be able to redirect requests for that to https://www.orbitsupport.se because IIS will fail on that request since no matching certificate is found, therefore mojoportal code is never reached before IIS throws an error.

however requests for http://orbitsupport.se should be able to redirect to https://www.orbitsupport.se

only other thing that could cause a problem is if your host is doing some weird proxying

as stated before 301 redirects can be cached by the browser so you may want to try different browsers and machines to make sure whether it is working or not, cached redirects in the browser with bad settings can be causing the problem.

1/16/2015 3:02:31 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

I have tried the following : 

https://www.orbitsupport.se/
https://www.orbitsupport.se/Default.aspx
https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx

And all of them works just fine and the login will work just fine so the certificate seems to be installed as it should. The problem are that I need to redirect all trafic from http to https and to do this I need to turn on the SSLIsAvailable.

When SSLIsAvailable is turned on and I go to http://orbitsupport.se the page will reload http://www.orbitsupport.se but it will ignore the https. This is becouse the page is not forcing https at this point, if I however click the login link I will get the same redirection exception as before but I can see that it is no forcing https(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2f) and thats correct.

So I do still not get why I get a redirection exception but I will talk with the host and see if there is something strange there.

 

1/16/2015 8:06:55 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

SSLIsAvailable = true does a few things

it will force ssl on pages we know need to be secure such as login, register, user profile

it will surface new setting in page settings for "Force SSL" which can be used to force specific pages to use https

it will surface a new setting in Site Settings for "Force SSL on All Pages"

to secure other pages you would want to check that box in site settings, but I would not do that if you still get a redirect error on login link because that will just force that error site wide.

if mojoportal cannot detect whether the current request is a secure request then it can get in a redirect loop because it it redirects to https but it still detects it as a not secure request so it just redirects again and again. This can happen if there is a proxy server that prevents the web server from seeing the real request correctly. Definitely only your host can help with that.

But again, if you are still getting a redirect problem I think it can also be a browser cache issue. Did you try another web browser or machine to verify?

 

1/16/2015 8:45:03 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

if you find out that it is a proxy server, some proxy servers have a way to indicate to the web server whether it is a secure request often using a server variable, but you would have to know if that is the case and what the server variable is. Wehave logic to check for some config settings that can be set if one knows the name of a server variable that indicates if it is a secure request.

public static bool IsSecureRequest()
        {
            if((HttpContext.Current != null)&&(HttpContext.Current.Request != null))
            {
                // default this works when the SSL certificate is installed in the site but not when using load balancers or other proxy server
                if (HttpContext.Current.Request.IsSecureConnection) { return true; } 

                if (WebConfigSettings.SecureConnectionServerVariableForPresenceCheck.Length > 0)
                {
                    if (HttpContext.Current.Request.ServerVariables[WebConfigSettings.SecureConnectionServerVariableForPresenceCheck] != null) { return true; }
                }

                if ((WebConfigSettings.SecureConnectionServerVariableForValueCheck.Length > 0) && (WebConfigSettings.SecureConnectionServerVariableSecureValue.Length > 0))
                {
                    if (HttpContext.Current.Request.ServerVariables[WebConfigSettings.SecureConnectionServerVariableForValueCheck] != null)
                    {
                        if (HttpContext.Current.Request.ServerVariables[WebConfigSettings.SecureConnectionServerVariableForValueCheck] == WebConfigSettings.SecureConnectionServerVariableSecureValue) { return true; }
                    }
                }

            }
            

            return false;
        }

the problem is with a proxy server the certificate is not installed in IIS, the proxy sits in front of IIS and passes the request without ssl to the web server but keeps it encrypted between the proxy server and the web browser. In this case since the web server is not securing the request, from its point of view  it is not a secure request because this line of code will always be false:

HttpContext.Current.Request.IsSecureConnection

thus it tries to redirect again and again and it never sees a secure request from its point of view

whereas with a certificate installed directly in IIS that line would return true for a secure request

1/16/2015 9:03:52 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

I just remembered we have a built in page to show server variables. What I would do is login as admin, then in one browser tab visit

https://www.orbitsupport.se/DevAdmin/ServerVariables.aspx

and in another tab visit

http://www.orbitsupport.se/DevAdmin/ServerVariables.aspx

then carefully compare the 2 pages, what you are looking for is either a variable that appears only on the secure version or a variable that appears in both cases but has a different value on the secure one.

if you find something I may be able to help you solve this problem.

1/16/2015 9:34:17 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, my user are administrater(role member of Administrators) but I do not have access to that page?

1/16/2015 9:38:55 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

it is disabled by default put this in user.config then touch Web.config, then you should be able to get there

<add key="EnableDeveloperMenuInAdminMenu" value="true" />

after that you will also find it under Administration > Advanced Tools > Developer Tools > Server Variables

1/16/2015 9:46:54 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

I added it to the regular web.config but that did not work. I dont have a user.config right now so I will have to fix this next week.

1/16/2015 10:55:31 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

don't add it to Web.config because it already exists there, if you are not using a user.config file then you can change the value of the existing setting to true in Web.config

if the setting exists more than once in Web.config, as it does since you added it, the one closer to the bottom of the file wins

1/19/2015 7:09:18 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

I have now tried this and this is what I get : 

HTTPS

ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE:sv,en-US;q=0.8,en;q=0.6 HTTP_COOKIE:ASP.NET_SessionId=ucb3t1mjzbtvafqxmd50lcgb; .mojochangeme=C00E3C9FF7F6780019D035A8F53098CAEC94A707FE2F7E5307ACEE26A686E63496830E7992632B8B917A33D3E37CE43480DBEAAB00D830E17C361749E49D433F0EDEE5FC0884C2D588971E9A2D912EA33A610B03FC01D409BC956B8E473B2C9E58D85DBA73C21EC558B2E4B51141C017E7095D33B914773176BF05B9FC602F0C2A0E5E8F; www.orbitsupport.seportalroles1=D3778135405850EC6C71B67099610EEB28C04E9058B12E54F4ADBD1404CCC196C5BFBA8EE270A4ABC76174E279EA619F9612181C35DDFC3193C8B61503B4D692EDFAA17AAD37F7E3F54F5C9AB7E7886372BD40A8B237EA282391214833F4E09FBAF6863639C92183DDC1E8E026D9A2757DB536ECE6D52E20C67EB6FA0545F01506BB4772876872D806A2A3A89FC30F8A9030F08D921465EAC2938D1C379D60FCEEE85E58DDCEF6FD2076A709217244E95ED0627907E4F95966E603577859D931D1A8DDDFD4B2A1BD44233953AC341572D81BF5A6630B21F960561A9E0A1D5BF762929A98FA46DBCAAEFDAC8D403E306B75F6D1691ECA6B0CF2FB229265C04C7768668FCB HTTP_HOST:www.orbitsupport.se HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 HTTP_REMOTE_ADDR:85.197.150.56 HTTP_LOCAL_ADDR:109.235.170.27 HTTP_X_FORWARDED_FOR:85.197.150.56 HTTP_X_FORWARDED_PROTO:https HTTP_HTTPS:on
ALL_RAW Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate, sdch Accept-Language: sv,en-US;q=0.8,en;q=0.6 Cookie: ASP.NET_SessionId=ucb3t1mjzbtvafqxmd50lcgb; .mojochangeme=C00E3C9FF7F6780019D035A8F53098CAEC94A707FE2F7E5307ACEE26A686E63496830E7992632B8B917A33D3E37CE43480DBEAAB00D830E17C361749E49D433F0EDEE5FC0884C2D588971E9A2D912EA33A610B03FC01D409BC956B8E473B2C9E58D85DBA73C21EC558B2E4B51141C017E7095D33B914773176BF05B9FC602F0C2A0E5E8F; www.orbitsupport.seportalroles1=D3778135405850EC6C71B67099610EEB28C04E9058B12E54F4ADBD1404CCC196C5BFBA8EE270A4ABC76174E279EA619F9612181C35DDFC3193C8B61503B4D692EDFAA17AAD37F7E3F54F5C9AB7E7886372BD40A8B237EA282391214833F4E09FBAF6863639C92183DDC1E8E026D9A2757DB536ECE6D52E20C67EB6FA0545F01506BB4772876872D806A2A3A89FC30F8A9030F08D921465EAC2938D1C379D60FCEEE85E58DDCEF6FD2076A709217244E95ED0627907E4F95966E603577859D931D1A8DDDFD4B2A1BD44233953AC341572D81BF5A6630B21F960561A9E0A1D5BF762929A98FA46DBCAAEFDAC8D403E306B75F6D1691ECA6B0CF2FB229265C04C7768668FCB Host: www.orbitsupport.se User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 Remote-Addr: 85.197.150.56 Local-Addr: 109.235.170.27 X-FORWARDED-FOR: 85.197.150.56 X_FORWARDED_PROTO: https HTTPS: on

HTTP

ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE:sv,en-US;q=0.8,en;q=0.6 HTTP_COOKIE:ASP.NET_SessionId=ucb3t1mjzbtvafqxmd50lcgb; .mojochangeme=C00E3C9FF7F6780019D035A8F53098CAEC94A707FE2F7E5307ACEE26A686E63496830E7992632B8B917A33D3E37CE43480DBEAAB00D830E17C361749E49D433F0EDEE5FC0884C2D588971E9A2D912EA33A610B03FC01D409BC956B8E473B2C9E58D85DBA73C21EC558B2E4B51141C017E7095D33B914773176BF05B9FC602F0C2A0E5E8F; www.orbitsupport.seportalroles1=D3778135405850EC6C71B67099610EEB28C04E9058B12E54F4ADBD1404CCC196C5BFBA8EE270A4ABC76174E279EA619F9612181C35DDFC3193C8B61503B4D692EDFAA17AAD37F7E3F54F5C9AB7E7886372BD40A8B237EA282391214833F4E09FBAF6863639C92183DDC1E8E026D9A2757DB536ECE6D52E20C67EB6FA0545F01506BB4772876872D806A2A3A89FC30F8A9030F08D921465EAC2938D1C379D60FCEEE85E58DDCEF6FD2076A709217244E95ED0627907E4F95966E603577859D931D1A8DDDFD4B2A1BD44233953AC341572D81BF5A6630B21F960561A9E0A1D5BF762929A98FA46DBCAAEFDAC8D403E306B75F6D1691ECA6B0CF2FB229265C04C7768668FCB HTTP_HOST:www.orbitsupport.se HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 HTTP_REMOTE_ADDR:85.197.150.56 HTTP_LOCAL_ADDR:109.235.170.27
ALL_RAW Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate, sdch Accept-Language: sv,en-US;q=0.8,en;q=0.6 Cookie: ASP.NET_SessionId=ucb3t1mjzbtvafqxmd50lcgb; .mojochangeme=C00E3C9FF7F6780019D035A8F53098CAEC94A707FE2F7E5307ACEE26A686E63496830E7992632B8B917A33D3E37CE43480DBEAAB00D830E17C361749E49D433F0EDEE5FC0884C2D588971E9A2D912EA33A610B03FC01D409BC956B8E473B2C9E58D85DBA73C21EC558B2E4B51141C017E7095D33B914773176BF05B9FC602F0C2A0E5E8F; www.orbitsupport.seportalroles1=D3778135405850EC6C71B67099610EEB28C04E9058B12E54F4ADBD1404CCC196C5BFBA8EE270A4ABC76174E279EA619F9612181C35DDFC3193C8B61503B4D692EDFAA17AAD37F7E3F54F5C9AB7E7886372BD40A8B237EA282391214833F4E09FBAF6863639C92183DDC1E8E026D9A2757DB536ECE6D52E20C67EB6FA0545F01506BB4772876872D806A2A3A89FC30F8A9030F08D921465EAC2938D1C379D60FCEEE85E58DDCEF6FD2076A709217244E95ED0627907E4F95966E603577859D931D1A8DDDFD4B2A1BD44233953AC341572D81BF5A6630B21F960561A9E0A1D5BF762929A98FA46DBCAAEFDAC8D403E306B75F6D1691ECA6B0CF2FB229265C04C7768668FCB Host: www.orbitsupport.se User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 Remote-Addr: 85.197.150.56 Local-Addr: 109.235.170.27
 

HTTPS

LOCAL_ADDR 192.168.10.91

HTTP

LOCAL_ADDR 192.168.10.94

 

HTTPS

HTTP_X_FORWARDED_FOR 85.197.150.56
HTTP_X_FORWARDED_PROTO https
HTTP_HTTPS on

HTTP

[Missing]

 

Does this say you anything?

 

1/19/2015 9:03:24 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

The host saw no problems with the certificate so they created a .htaccess file with the following : 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.(.)$ [NC]
RewriteCond %{HTTP:HTTPS} !on
RewriteRule . https://www.%{HTTP_HOST}%{REQUEST_URI} [R,L]

Now it works, but mojoPortal are still set to not use https(available) it thats a problem?

 

1/19/2015 9:37:55 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Okay, no upload is working this this .htaccess file in place? If I remove it the upload works again?

1/19/2015 9:57:25 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

I don't know about the htacess, I would remove that.

Based on the server variables I think you can solve it by adding this in Web.config appSettings section

<add key="SecureConnectionServerVariableForPresenceCheck" value="HTTP_HTTPS" />

This setting tells mojoPortal to look for that server variable and if it exists then it is a secure request.

Hope that helps,

Joe

1/20/2015 1:11:52 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

- Removed the .htaccess file
- Added SecureConnectionServerVariableForPresenceCheck according to your post
- Set SSLIsAvailable to true
 

Same thing as before ; orbitsupport.se redirects to www.orbitsupport, when clicking the login link I get the ERR_TOO_MANY_REDIRECTS again and its now on https(as expected).

I try to turn off the SSLIsAvailable again and this lets me open the login form again but without redirection to https. I can manually type in https and it works.

This seems to be crazy hard to get working.

To me it looks like MojoPortal is ending upp redirecting becouse of some setting.

This is how the dev page looks like now : 

HTTPS

ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE:sv,en-US;q=0.8,en;q=0.6 HTTP_COOKIE:ASP.NET_SessionId=myvk4okwmf4xrz3usit21sto; returnurl1=http://www.orbitsupport.se/; .mojochangeme=AFC022BD9D230B6160973B4265C3A48BDEADDCC9B7083C01985429251DCD0523D2861A42FBB5F77AE6C6DD14473BED9856AC863A11808728C670E4AB311C2E6F30C13D332FEA8ACF8AD795B5BCB737460AD7673621163FAF19D51731CDF8D380DC9353A20F6130F7D076780A665459362EC5A8251C8DABC58A92CFA618DDFB6BE482CAFF; www.orbitsupport.seportalroles1=CC9AEB526898F60249B18B279AE56E96E470AB99E0E7A3C454D2CAFBE2A8BE26C70CF59D8ABD4D2573A65E6FCDE96D6A29E0AEA2A6874022FF99260B4AEFCF280D41B4F4E7DE558437F5C3ADFF630BD25DB19A2DC3A16B63807269A9A359A12B24CC71714D42098A8BA0191D02EE829501014061F3AD21108150978A3036D19D0627857A5B9F8F2506FFEA4EC0E2027CA9394034BFD6D2BEE0234C001926D6303C56CFD43E9CC9312B534966AE5962D8C90194ABD379DB82CD5BF14F6493C3C1AACBD11E54B9A1A379EB677D7CFC3083F1F648C674DB0366998D9AA83406945A791B891822BF52DAA5CA2C7CC415611CBF18502F4A8D8D1C4DC5F9E593F2A2A8B671933B HTTP_HOST:www.orbitsupport.se HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 HTTP_REMOTE_ADDR:85.197.150.56 HTTP_LOCAL_ADDR:109.235.170.27 HTTP_X_FORWARDED_FOR:85.197.150.56 HTTP_X_FORWARDED_PROTO:https HTTP_HTTPS:on
ALL_RAW Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate, sdch Accept-Language: sv,en-US;q=0.8,en;q=0.6 Cookie: ASP.NET_SessionId=myvk4okwmf4xrz3usit21sto; returnurl1=http://www.orbitsupport.se/; .mojochangeme=AFC022BD9D230B6160973B4265C3A48BDEADDCC9B7083C01985429251DCD0523D2861A42FBB5F77AE6C6DD14473BED9856AC863A11808728C670E4AB311C2E6F30C13D332FEA8ACF8AD795B5BCB737460AD7673621163FAF19D51731CDF8D380DC9353A20F6130F7D076780A665459362EC5A8251C8DABC58A92CFA618DDFB6BE482CAFF; www.orbitsupport.seportalroles1=CC9AEB526898F60249B18B279AE56E96E470AB99E0E7A3C454D2CAFBE2A8BE26C70CF59D8ABD4D2573A65E6FCDE96D6A29E0AEA2A6874022FF99260B4AEFCF280D41B4F4E7DE558437F5C3ADFF630BD25DB19A2DC3A16B63807269A9A359A12B24CC71714D42098A8BA0191D02EE829501014061F3AD21108150978A3036D19D0627857A5B9F8F2506FFEA4EC0E2027CA9394034BFD6D2BEE0234C001926D6303C56CFD43E9CC9312B534966AE5962D8C90194ABD379DB82CD5BF14F6493C3C1AACBD11E54B9A1A379EB677D7CFC3083F1F648C674DB0366998D9AA83406945A791B891822BF52DAA5CA2C7CC415611CBF18502F4A8D8D1C4DC5F9E593F2A2A8B671933B Host: www.orbitsupport.se User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 Remote-Addr: 85.197.150.56 Local-Addr: 109.235.170.27 X-FORWARDED-FOR: 85.197.150.56 X_FORWARDED_PROTO: https HTTPS: on

HTTP

ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE:sv,en-US;q=0.8,en;q=0.6 HTTP_COOKIE:ASP.NET_SessionId=myvk4okwmf4xrz3usit21sto; returnurl1=http://www.orbitsupport.se/; .mojochangeme=AFC022BD9D230B6160973B4265C3A48BDEADDCC9B7083C01985429251DCD0523D2861A42FBB5F77AE6C6DD14473BED9856AC863A11808728C670E4AB311C2E6F30C13D332FEA8ACF8AD795B5BCB737460AD7673621163FAF19D51731CDF8D380DC9353A20F6130F7D076780A665459362EC5A8251C8DABC58A92CFA618DDFB6BE482CAFF; www.orbitsupport.seportalroles1=CC9AEB526898F60249B18B279AE56E96E470AB99E0E7A3C454D2CAFBE2A8BE26C70CF59D8ABD4D2573A65E6FCDE96D6A29E0AEA2A6874022FF99260B4AEFCF280D41B4F4E7DE558437F5C3ADFF630BD25DB19A2DC3A16B63807269A9A359A12B24CC71714D42098A8BA0191D02EE829501014061F3AD21108150978A3036D19D0627857A5B9F8F2506FFEA4EC0E2027CA9394034BFD6D2BEE0234C001926D6303C56CFD43E9CC9312B534966AE5962D8C90194ABD379DB82CD5BF14F6493C3C1AACBD11E54B9A1A379EB677D7CFC3083F1F648C674DB0366998D9AA83406945A791B891822BF52DAA5CA2C7CC415611CBF18502F4A8D8D1C4DC5F9E593F2A2A8B671933B HTTP_HOST:www.orbitsupport.se HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 HTTP_REMOTE_ADDR:85.197.150.56 HTTP_LOCAL_ADDR:109.235.170.27
ALL_RAW Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate, sdch Accept-Language: sv,en-US;q=0.8,en;q=0.6 Cookie: ASP.NET_SessionId=myvk4okwmf4xrz3usit21sto; returnurl1=http://www.orbitsupport.se/; .mojochangeme=AFC022BD9D230B6160973B4265C3A48BDEADDCC9B7083C01985429251DCD0523D2861A42FBB5F77AE6C6DD14473BED9856AC863A11808728C670E4AB311C2E6F30C13D332FEA8ACF8AD795B5BCB737460AD7673621163FAF19D51731CDF8D380DC9353A20F6130F7D076780A665459362EC5A8251C8DABC58A92CFA618DDFB6BE482CAFF; www.orbitsupport.seportalroles1=CC9AEB526898F60249B18B279AE56E96E470AB99E0E7A3C454D2CAFBE2A8BE26C70CF59D8ABD4D2573A65E6FCDE96D6A29E0AEA2A6874022FF99260B4AEFCF280D41B4F4E7DE558437F5C3ADFF630BD25DB19A2DC3A16B63807269A9A359A12B24CC71714D42098A8BA0191D02EE829501014061F3AD21108150978A3036D19D0627857A5B9F8F2506FFEA4EC0E2027CA9394034BFD6D2BEE0234C001926D6303C56CFD43E9CC9312B534966AE5962D8C90194ABD379DB82CD5BF14F6493C3C1AACBD11E54B9A1A379EB677D7CFC3083F1F648C674DB0366998D9AA83406945A791B891822BF52DAA5CA2C7CC415611CBF18502F4A8D8D1C4DC5F9E593F2A2A8B671933B Host: www.orbitsupport.se User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 Remote-Addr: 85.197.150.56 Local-Addr: 109.235.170.27

HTTPS

REMOTE_PORT 65526

HTTP

REMOTE_PORT 22272

HTTPS

HTTP_X_FORWARDED_FOR 85.197.150.56
HTTP_X_FORWARDED_PROTO https
HTTP_HTTPS on

HTTP

Missing

1/20/2015 7:09:17 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

That setting should have solved it, if it didn't I have no idea why not.  I've done my best to help you.

Maybe you should use the htaccess file and ask your host to help modify it so it doesn't break file uploads.

1/22/2015 2:01:25 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

This is vary frustrating, Here I am, with a certificat that cost me 150 EUR and I can´t use it. I have got the response from my host and they says that there is nothing wrong with the certificate and the .htaccess was correct. They suggest that I should look in to the code why the upload is not working with the .htaccess file in place. The problem is that MojoPortal do not logg anything? The websites just sits there and at the end it freezes chrome.

What should I do? I need MojoPortal to work with the certificate.

1/22/2015 7:04:40 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

First back up and understand, ssl certificates work in the transport layer not the application layer. mojoPortal code does not use the certificate or interact with it. mojoPortal code runs on the web server and the certificate is not even installed on the web server but on another server.

your certificate is working and mojoPortal is not preventing it, the only issue is mojoPortal cannot do the redirecting from insecure to secure requests in your setup as it can when the certificate is installed on the web server.  So you must use other external means to handle that.

mojoPortal does log all unhandled errors, so nothing in the log tells me the file upload is not even reaching mojoPortal code but is blocked by the proxy or the htaccess in  some way before ever reaching mojoPortal.  I think you should press that with the host.

Finally, I have spent a lot of my time trying to help you and I am not your employee and my time is valuable and I am certainly out at least $150 of value on my end too. I did not sell you your ssl certificate nor the use of the proxy server that came with it.

I tried my best to help but there was never a guarantee that mojoPortal could do the redirecting with this proxy server ssl setup, and it is not my fault nor fault in mojoPortal code.  

1/22/2015 7:16:52 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

though it would be more ideal to do the redirect from the server side or from the proxy itself, you could also try to do it from javascript by putting this in the head section of the layout.master file of the skin

<script>
if (window.location.protocol != "https:")
    window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
    </script>

1/23/2015 7:39:13 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks! Of cource MojoPortal have any obligations to me, Im just telling my problem. Im greatfull for all the work that you put in to this project!

I changed the javascript to this : 

<script>
        if(window.location.href.indexOf("produkter.aspx") > -1 || window.location.href.indexOf("support.aspx") > -1)
        {
            if (window.location.protocol == "https:")
                window.location.href = "http:" + window.location.href.substring(window.location.protocol.length);
        }
        else
        {
            if (window.location.protocol != "https:")
                window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
        }
    </script>

 

This will demand https for all pages but 2 where upload and download is done. Maybe this is good in a way to make the size smaller of the traffic? The only problem is that its notiscable that a reload of the page is done so the webpage gets a bit slower.

I will continue talking with the host, at this point they only says that there is nothing wrong with the certificate or the installation of it but I have to try.

Thanks again for the help.

 

 

1/23/2015 7:59:23 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

Actually, when I said it was not a problem in mojoPortal code, I may have been wrong, when I reviewed the code it was not doing what I thought it was doing.

Possibly if you upgrade to mojoportal 2.4.0.8 and then replace the mojoPortal.Web.dll in the bin folder with the patched one in this zip it might just fix it. I'm not able to patch older versions.

1/26/2015 1:52:51 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, Im doing a backup of my site right now then I will try a update. Will I have to change the skin aswell when going from 2.4.0.0?

I will be using these files in the update : 

mojoportal-2-4-0-8-mysqldatalayer-GPL.zip
mojoportal-2-4-0-8-ssl-proxy-patch.zip

 

1/26/2015 9:34:37 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

there are no skin changes from 2.4.0.0 to 2.4.0.8

mojoportal-2-4-0-8-mysqldatalayer-GPL.zip is only the data layer, if you are using MySql, you would start with 

mojoportal-2-4-0-8-mssql-net45-deploymentfiles.zip

extract that locally

then extract the the mysqldata layer and copy the contents of the bin and setup folders into the previously extracted package for mssql to replace the data dlls with the corresponding mysql ones

then extract the patch to replace the mojoPortal.Web.dll

then copy any customizations from your current Web.config file into the new one, machinekey, connectionstring, and any other custom changes you have made

then your local package is ready to deploy

1/26/2015 9:44:46 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, that sounds like what Im are doing now BUT with a small change. I copy the entire website to my local computer, set up the new version as you described and now Im about to copy the new over the old. This will overrite most files but there are there are files like skin and uploaded files that will remain. Hope this is okay.

1/26/2015 9:52:57 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

there is nothing in the package that will overwrite your skins or uploaded files

the package only has skins in the /Data/skins folder, when the first site is created the skins get copied to /Data/Sites/[SiteID]/skins and then we never touch those files during upgrades, the only skins that ever get updated during upgrades are the ones under /Data/skins which are not used by any site but are just a catalog of skins copied to a new site when a new site is created

 

1/27/2015 5:21:51 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Okay, hade some technical problems but I have now done the following : 

  1. Download my website
  2. Export MySQL database
  3. Download new version of MojoPortal and unpack
  4. Download and copy MySQL package
  5. Download and copy Language package
  6. Download your patch dll and copy
  7. Compare old and new web.config and set corsponding settings in new web.config
  8. Copy new version over my website and replace all
  9. Upload website
  10. Run the /Setup/Default.aspx (updating 2.4.0.1 - 2.4.0.8, no errors)
  11. Visting the website (Take forever to load(about 5 min)) and try login(success)
  12. Notice that my javascript is still in place so download master file and remove and then upload again.
  13. Change the SSLIsAvailable to True in web.config
  14. Visit webpage again (Still vary slow)
  15. Click login and get the same exception as before : ERR_TOO_MANY_REDIRECTS

This is the log from today 

2015-01-27 11:55:03,705 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 11:55:05,125 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 11:55:05,141 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 11:55:05,297 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-27 11:55:05,889 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-27 11:58:50,984 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 11:58:52,684 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 11:58:52,684 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:02:16,843 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:02:19,324 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:02:19,339 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:09:22,227 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-27 12:09:22,312 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-27 12:09:22,055 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-27 12:09:33,763 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:09:35,214 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:09:35,229 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:10:04,846 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:10:05,642 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:10:05,673 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:16:39,045 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-27 12:16:39,370 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Global.asax.cs Application_End 
2015-01-27 12:16:49,185 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:16:49,700 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:16:49,700 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:18:03,888 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:18:04,434 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:18:04,450 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 12:18:12,161 INFO (null) - (null) - (null) - mojoPortal.Web.Global - Application Started. 
2015-01-27 12:18:12,816 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task 
2015-01-27 12:18:12,847 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 

System information

Systeminformation

mojoPortal Version2.4.0.8 MySQL
Operating SystemMicrosoft Windows NT 6.1.7601 Service Pack 1
ASP.NET Information4.0.30319.18444 Running in Full Trust
Serverns tidszon:W. Europe Standard Time
Serverns lokala tid:(GMT 1) 2015-01-27 12:21:00
Tiden nu i Greenwich (sk. GMT eller UTC):2015-01-27 11:21:00

Version av funktion  [Hjälp]

Funktion Schemaversion
blog 2.6.1.7
contactform 0.0.0.6
eventcalendar 0.0.0.6
feed-manager 1.0.1.1
forums 2.2.0.5
imagegallery 0.0.0.8
kdmediaplayer 1.0.0.1
linksmodule 1.0.0.9
pollfeature-byChristianFredh 0.0.0.5
sharedfiles 1.0.0.0
surveyfeature 1.8.0.0
webstore 0.0.7.3

So, it is still not working and now it is also extremely slow. If I manually type in HTTPS it works as before.

 

1/27/2015 8:01:14 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

do you still have this in Web.config? you need this:

<add key="SecureConnectionServerVariableForPresenceCheck" value="HTTP_HTTPS" />

with that setting our IsSecureRequest function should return true on proxied secure requests

the only thing I fixed was that our ForceSSL function was not even checking the IsSecureRequest function which I thought it was, if it checks that and it is true it should not redirect

1/27/2015 8:40:16 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Sorry missed that.

Now it works a bit better. When going to the startpage it is using http, thats okay for now. When entering the login page it will redirect to https and when the login are done we remain on the https. If I change to http it is not redirecting back to https, I supose that I have to set this on every page. The problem now is that the upload are not working again when on https, I choose file and it states "uploading" forever, nothing happens? I supose I have to turn off https for the upload pages but how?

1/27/2015 9:01:37 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Hi again,

I have tested some more and have notice that a shield is shown to the top right cornor in Chrome when hitting the upload button. It says that the webpage tries to load unsecured scripts. I can choose to load them anyway and if I do, the webpage is reloaded, when choosing a file to upload I get "Oops something went wrong uploading, you may want to contact the site administrator an error was probably logged.". This is what the log says : 

 

2015-01-27 15:40:25,599 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread 
2015-01-27 15:44:01,851 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - deserialized IndexWriterTask task 
2015-01-27 15:44:01,882 INFO (null) - (null) - (null) - mojoPortal.SearchIndex.IndexWriterTask - Queued IndexWriterTask on a new thread 
2015-01-27 15:49:13,259 ERROR 192.168.10.100 - sv-SE - / - mojoPortal.Web.Global -  Referrer(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2f) useragent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
System.Web.UI.ViewStateException: Invalid viewstate. 
    Client IP: 192.168.10.100
    Port: 28585
    Referer: https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2f
    Path: /Default.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    ViewState: c1vKLAPuPDmpoUQNn3KWnSzVNH4C0Fzdk18VS7tNzkcARsl9WQ+Dnxh/uLUhxV9hYtU00LnL9Sxz5DHGJL2cLrtX8R/sdkwLZMJi4k06y1seNDpuae4s/FQB8ImmJsXYCn14VPi9gtqeJWStRQO4TMB/Qw3WywLU434gxFn1zqxdHPn+RiwcH1D+C+x/4DoeATFjUyCJ5m1hyVkyKQcgJmUDOfrwyXJz2DAzSkYuDvyu1WKOWhVwR3cJCSA5QBp/2xoHCzFBRIuMFBsVsAAvjwqSL5MWH7DTeMkxqdnJ9+L5OY51NQ0rgUNkKZ/K5LGArdaCUOphye5dKka1g3MTxrTLkXe+1feqkWfvjD8SkTv+aufOgRscN7qNOprsW+mv9MgDvSlAJBLNh3EB4MSwxt/4PAMwsfm1Shk0cyytbjVzqsSqxRUfq8WQVrVhB5I0qklo5H2Xeko2HIgzI3K3hWiB7xE1C0Db19QBOS3O1rbsRgtC/e2GXuSUK2xbTHza3QXuYmzfv6H5J7dcCrLuxEzpYV1lQslFS9Xto4pn/3FIL3z7LQtksa7p+HNtkAoBR30boM+BrYBZcLl/i0cnnbq5M/Vr7b9mKcoft3LVpzIoJdbmq7caFBZJsRfT3fVQIETxQOktl+zzSyIpabjs1yFF+Ra1+OntAcVgIq4ImrMF+XTHn3mWHvwB7b4gbAq52Cu8gQX...
2015-01-27 15:49:32,516 ERROR 192.168.10.100 - sv-SE - / - mojoPortal.Web.Global -  Referrer(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2f) useragent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
System.Web.UI.ViewStateException: Invalid viewstate. 
    Client IP: 192.168.10.100
    Port: 56189
    Referer: https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2f
    Path: /Default.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    ViewState: 25hXWLXUQ9WDI4OJDE1/MM3wddsI7uX/9cvEmK2tU3nYAqLbsXWZE1E3aGgwkyWYIcFT3Lb3GuDpg683sd+A5DMekIuQsTcNNN1BH3SD5JCNOk/Zs608oyq+tEw+AdVyytYnFcfra7U5fZ8IIe6TR8NsNrD2IvEzKiLryqtO+Jjq5djwCmflOJVpW89bbTLJcXRMTCON/h/984EaaeLYLQQwubONPrCOxb8puICYH6rgnlXVR5jsDbWcIKAuU6noOoqH2PHAcw+FsNfXN1zpDAGLRcupHYrEoQaK4K/E2lEMuLMs5mtESl2r7W/w+Lxunnz0L1WFF2Fh79F6gcZkaoL+L3nDT3KUUJQYnDuvk9th3Tow+ZgpqbpGjMj+ZS90Dxiyx5UaQ29DMmx8tFgplVELf8WsH9XpAtDwZLq0GPlYNJms9+PnMj6X59hEKdu1Q4mS3OVGinwS+w3u5TK535x6vfKSeFoKfeqyI7QTlHznIQ6hAcSxL9i68yXdPGdiBWhyCZZVfCpM6I9TGoY+V9OHiDUliClS9vSG264RojnwZe7geWyNcoz1xCrcpo5XdfqYY8gNOT4KkVJkzUTdNU3TW7s+NTxhKAcmj2ZUTiYS78XFSBZkiFX1UfdlUGBoiiVVMLXD4LFyOEdTkI+p9wtsK3hq9STZF6eCkFQ0VOyKZ7cj4JhjZhXIfV+wd3xpj9kvXxQ...
2015-01-27 15:50:51,293 ERROR 192.168.10.100 - sv-SE - / - mojoPortal.Web.Global -  Referrer(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx) useragent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
System.Web.UI.ViewStateException: Invalid viewstate. 
    Client IP: 192.168.10.100
    Port: 35032
    Referer: https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx
    Path: /Default.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    ViewState: ObS8S/F+bQhaOvOKzpuL6Awmf63XiZnVdGXQBtRkSXlrSGXC+K5LSy1R1/wJGTSeQ/2oBEgN1wmOw5ABVe7zTUEr5hLgW4W2tkdAd/1I6Knz3qH7sCpdXie7g0PhIwTkecKMDlbAo/fKgTudjthv0e4FqO+rBHNME4zmYvNH0vhBNJwJQLSWjhGUjxWbC/dAd7WE3pdEclUuxlw04zcAPAJZ9utcbirr6+8yWiGqsCCgi0PbrGehXF32S5tPMvtswO0rspMOGhybMd/bhPwKqGQqeG4jIA90814Bx5xIRoiVbh4iJBQKgHG58oxmN/F3Jy6+AQonCQUp5h8TJAdtrGdkCLMaEfRWqWLxP+NQvMGZmDssAXaYLwNgETU4KYfzbppeOPx5BgWKTC/mxo0odal3LG0Qv3Bf1nhkSTdqA5cRkAvaLxOkyrpA8xUlRi7VlVSlFkqJ5nSK+G1a+GONRanMbbMco0Vg6UMZoWLdmLoGUid1EN5NXack7lvEtsVStx5DcmyCZ3apMBMEbrlruYvFWP+kk49npvF/qnY2L7atfltOpR1+M4TzlPdokYNxlgNf5oSgCDO5CF3Nygu+d/Er8+5cFc4rzNUCrGRO9fqGHfTgT/F1hsv66Rs7K+mORxSb4XjqkmrsmKJXsFA5vWzCYpn6J64Tc0POxzLmgvzkXJAkSWK5YtsB85r...
2015-01-27 15:51:10,784 ERROR 192.168.10.100 - sv-SE - / - mojoPortal.Web.Global -  Referrer(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx) useragent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
System.Web.UI.ViewStateException: Invalid viewstate. 
    Client IP: 192.168.10.100
    Port: 29733
    Referer: https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx
    Path: /Default.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    ViewState: IacRSy+Up4oGvClUDLDfoMdZlVCpUEpQKN8MGgd/nmZVjuzZDZr4B6FSsImMFhShCqTbCNk90xgdVMaNgLw7gLh+jCJwcXtYwhT/0Z3WsvSLXFa4HN9UYvgxN3VAjRjRy2u/bHdBN4fjI4+NoP3rFgHn+KfyIfX5afQo8Nx8fK5Yx54WBA9cMYfSlIEzIJXzjwRlNXf9pTqiy9dJxSsiUVKqYAevP6pPK/L7D+sI6Kt5NCzfwq51z5R2/UTX2/uXZZCCZ+UAncqN+tTWZOioF/u+q+8/8S82qErxF/3g+IbapUBljKxntgPavtE6z1pFIF4jrVUlYeWMwSsaI6U/w6YYVmRsMvqKI3hANZFEku0Jst4bCeZFuzbaZ+3oAS3f4n63LkcXCZxS+Ir4xm1ar5iutBMJt1Qe0avIgHTjR+buYbSjdSl6+uC9Qoo+zeWkl6/yHpRs/1Fxb6BAxqANLPLwWq3sR0yCMrTmnF1UhxKtHr466h4zf+rIt6e7ebFwzMJb1m+RChZNhZU2LaND5XGSV07TPxmSBw81hqwY/q2/YzlZArp/bSMxmHvRgIZSR0Ss1im7hVlPr+H3hv3YU1zyvsywyE22oQKVTMEdaRzqF27iTKLastUcRjZLSpxGWXATYhnAv58EQGBhYi2dSDWf2rwbhP6WU07Njn9wLhfnmei2H5/RDIyzgzF...
2015-01-27 15:51:37,650 ERROR 192.168.10.100 - sv-SE - / - mojoPortal.Web.Global -  Referrer(https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx) useragent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 
System.Web.UI.ViewStateException: Invalid viewstate. 
    Client IP: 192.168.10.100
    Port: 7058
    Referer: https://www.orbitsupport.se/Secure/Login.aspx?returnurl=%2fDefault.aspx
    Path: /Default.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    ViewState: KRF71dtDGrbZouVcwbp47ZD5q5sSP8vAGemUUyXmtPJCNrPRcwGK35WxqGvpskoX/abl7TmAtETvbWE21BYtx/Z/QGt3ngsumQ0jjjY2l/SN1hNCzxjQdbCFWoh98Ivoi37hsesM21biC/9NepM9jVOBQWuyvX711UNdWJ1Au+gwqLb+dezBIdD3tMsa9l0gyAPfu9H4a+x+rUI/y08pI52dQ7c6Q5MCnBz5j6NkKt5dRnYk+FId7AUeLx5ig9wC4rKEFk6IwDeNwmwx2PP584l0RzC4ohuyADzlZEs4jSikFIINGxJxDpqKavzDNhtLKeRt6yffxtwq0luNc2VW2WGCx+W6Woc9jzTL0+gAGvIEKQwieC4CndKhq9nvg9hJEH2kxuReSUBmgf308QWjeoDtEochoY8VvRAWdfXmUEgh9uCINAHfVicNREI4R0HCMqcYdMrwV8W+hWYe6gRgGUWxt8cP7h6bqTY0hbrPTue4rACBcfm6l0lheZR8varlma9BW5mINGEqRC/VhIH9KjwB9+kJXpaaLHVoRyv9vhaGQWmDmj8kSBKQ0yRM/tM4TblqkozYeA6Pi3ZRt/WNsMlTw+UGpwmswlpbBVdbF3RrUq5zxQ/W/mH9OZmQAmEutqE2/rukAO4VmOADUr/BkKN9Sht5Ug7vfBglJWTaj9SAZwBpjvEifTxs77yi...

 

1/27/2015 9:07:05 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

nothing in the log you posted is related to file uploads at all.

first step is to find out what the insecure content is caused by and fix it

1/27/2015 9:47:51 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

This is what chrome sais

Mixed Content: The page at 'https://www.orbitsupport.se/produkter.aspx' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.orbitsupport.se/SharedFiles/upload.ashx?pageid=3&mid=5'. This request has been blocked; the content must be served over HTTPS.

This is done in jquery.min.js. 

1/27/2015 10:10:57 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

I see, this is another issue with using the proxy server.

when we build the url for the file uploader javascript we use SiteRoot, but since the web server is not really getting an https request but is getting an http request then SiteRoot starts with http

I can probably fix this and post an updated patch of mojoPortal.Web.dll

stand by, I will post a link shortly and then you can replace that one file

1/27/2015 10:15:44 AM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

ok, I've updated the patch with changes that I think should fix this

download it again and replace the mojoPortal.Web.dll in your /bin folder and see if it solves the problem

1/27/2015 12:02:28 PM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Great, it works! Good job!

Now I need to force https on all pages. The start page could go on regular http if possible. So I set the force all pages to SSL in settings but http is still working and it is not redirected?

1/27/2015 12:16:08 PM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

Setting "Require SSL on All Pages" to checked from site settings should work. I would check that setting again to make sure it stuck.

There is really no good reason to make your home page not use ssl, it is better to make the whole site use it.

1/27/2015 12:37:24 PM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks, it did work now :)

There is only one problem left, the webpage is vary vary slow after the update. Every time I visit a new page it take about 2-3 min, next time I visit the same page it is down to 2-3 sec.

When looking at the Network tab in the Chrome Dev toolbox I can see that the aspx is taking almost all the time. The webpage was a lot faster before the update, any idea?

1/27/2015 12:59:37 PM
Gravatar
Total Posts 18439

Re: MojoPortal and certificates

nothing changed in recent versions of mojoPortal that would affect performance and there have not been any other reports of it being slower after upgrading. the last few releases have only been small maintenance updates.

slow startup is a very common issue with asp.net in general, the asp.net compiler has to compile all the .aspx, .ascx, and .resx files as it encounters the use of them in a request so when the files all get replaced during upgrades it has to do a lot of that. normally after visiting a page with each feature it should be warmed up and faster. all that compilation happens down below the windows folder in the temporary asp.net files

when the application has been shut down or restarted it also has to re-compile some things, for low traffic sites people sometimes use an external service to ping the pages of a site periodically to keep the application awake because by default IIS will shut down an application that has not received a web request in the past 20 minutes

you mentioned using the language pak, that adds a lot of resx files in the App_GlobalResources folder which is a lot more files to compile during startup. My advice is keep only the English files and the files for specific languages that you are targeting. Keep in mind also that adding or removing files from that folder forces it to recompile again and causes another temporary slow down.

another thing that can impact performance is if you have <compilation debug="true" in Web.config, that should always be false in production.

That is all I really know about that, but if you continue to have questions please use a new thread, this thread has already deviated way outside its original topic to a lot of tangential things.

1/28/2015 2:11:59 AM
Gravatar
Total Posts 83

Re: MojoPortal and certificates

Thanks for all your help!!

You must sign in to post in the forums. This thread is closed to new posts.