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.
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

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