Can I change port used while HTTPS access???

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
8/20/2005 8:37:02 AM
Gravatar
Total Posts 25

Can I change port used while HTTPS access???

I have SSL (https://) enabled on my hosting only through port 472. Although I prefer to use http and http without additional port specs, this is my hosting standard.

Where I can change port used in mojoPortal - I have seen that it explicitly shows port :80 currently in URL, hope this is somewhere changeable ... :-)

Petr

8/20/2005 10:48:46 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

Try changing this Web.config setting:

MapAlternatePort

to false
8/20/2005 11:10:00 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

this seems to be more bad than with "true" - gives me "Page cannot be displayed"

as I sed, my hosting requires EXPLICIT port :472 to be used in URL; with mapping enabled, I see this url:

https://mixworx.net:80/2005/Secure/Login.aspx

but I want to have :472 instead of :80, so where I can config this? Nothing in web.config seems like "SSLAlternatePort"  :-)

Petr

 

8/20/2005 11:30:26 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

I think that is a bug in some code we put in there to make things work through a proxy.

I just commited a change to svn that may fix it if you can get the latest code and build it.

There are 2 new web.config settings

MapAlternateSSLPort

you should set to true

and

AlternateSSLPort

you should set to your port 472 I guess.

Joe
8/20/2005 11:44:53 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

ok thanks a lot!

this means for me a chance to try SVN :-)

Petr

8/21/2005 12:40:25 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

Hello Joe,

I have successfully checked-out latest source, (surprisingly) successfully rebuilded Release by
"Visual C# Standard" package (do you know that its possible???, lot of warnings, but no error)
and deployed to local folder by UnleashIt fr?om where I am syncing with ftp through TotalCommander for now.
(I do not clean target ftp, simply add/replace new files, update CultureCZE.config and web.config according to newest ones.)

But  server return Http errorr 500 and currentlog.txt says this:
(My shared hosting uses Win2k3 IIS and MSSQL 2k.)

2005-08-21 12:29:59,516 [2956] INFO  mojoPortal.Web.Global [(null)] - Global.asax.cs Application_Start
2005-08-21 12:30:02,063 [2956] ERROR mojoPortal.Web.Global [(null)] - www.mixworx.net
System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
   at System.Net.Dns.GetHostByName(String hostName)
   at System.Net.Dns.Resolve(String hostName)
   at Npgsql.NpgsqlClosedState.ResolveIPHost(String HostName)
   at Npgsql.NpgsqlClosedState.Open(NpgsqlConnector context)
   at Npgsql.NpgsqlConnector.Open()
   at Npgsql.NpgsqlConnectorPool.GetNonPooledConnector(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection)
   at Npgsql.NpgsqlConnection.Open()
   at mojoPortal.Data.NpgsqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, NpgsqlParameter[] commandParameters)
   at mojoPortal.Data.dbPortal.FriendlyUrl_GetByUrl(String HostName, String FriendlyUrl)
   at mojoPortal.Business.FriendlyUrl.GetFriendlyUrl(String HostName, String FriendlyUrl)
   at mojoPortal.Business.FriendlyUrl..ctor(String HostName, String FriendlyUrl)
   at mojoPortal.Web.SiteUtils.RewriteUrl(HttpApplication app)
   at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
   at System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2005-08-21 12:35:05,848 [2956] INFO  mojoPortal.Web.Global [(null)] - Global.asax.cs Application_End
2005-08-21 12:35:23,567 [3892] INFO  mojoPortal.Web.Global [(null)] - Global.asax.cs Application_Start
2005-08-21 12:35:23,645 [3892] DEBUG mojoPortal.Web.Global [(null)] - Global.asax.cs Application_BeginRequest
2005-08-21 12:35:23,645 [3892] DEBUG mojoPortal.Web.Global [(null)] - Application_BeginRequest culture = Czech (Czech Republic)
2005-08-21 12:35:23,692 [3892] DEBUG mojoPortal.Web.Global [(null)] - Global.asax.cs GetSiteSettings
2005-08-21 12:35:26,286 [3892] ERROR mojoPortal.Web.Global [(null)] - www.mixworx.net
System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found
   at mojoPortal.Web.Global.GetSiteSettings()
   at mojoPortal.Web.Global.Application_BeginRequest(Object sender, EventArgs e)
   at System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

(latest try is with UrlRewriting disabled, I tried almost all, disabling alternate ports, ... simply I dont know what can cause this kind of error ....)

can you help me?

Petr

8/21/2005 2:38:46 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???


The problem is it is checked into svn configured for using PostgreSQL, it is easy to change it to use either MS SQL or MySQL, all you do is change the reference in the business layer.

In VS.NET you need to look at the references under the mojoPortal.Business project and remove the reference to PostgreSQLData then right click references and choose add reference, in the dialog box, go to the projects tab and choose MSSQLData, then rebuild the solution.
8/21/2005 2:45:35 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

Good morning Joe, thanks, I will rebuild imeediatelly.

One question:
I have opened solution into VC#Standard , switched config to Release
and ReBuild, Deploy ... no problem

Need I VS.NET patches for class library "web"project only for editing/debugging source?

tnx, Petr

8/21/2005 3:17:03 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

You just need to configure it for debugging ASP.NET

Right click the web project and choose properties, then click  Configuration Properties > Debugging
Set Enable ASP.NET debugging to true
enter http://localhost/mojoportal/Default.aspx for the Start Page

now change Debug Mode to URL and enter http://localhost/mojoportal/Default.aspx for Start Url

click Apply/OK

right click the web project again and choose set as  startup project

You also need to create a Virtual Directory mojoportal pointing to the web folder under your default web site in IIS

Now you can use F5 or Play button to start debugging (put build in debug mode)

also in Unleash It make sure you add a file mask for .htm and .html or it won't deploy those files.

the project is set as a class library rather than a web project to avoid problems with svn

you may also want to review this info to add some things so that it is easy to add .aspx and .ascx to the project for your own development
8/21/2005 3:41:26 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

thanks, I have reviewed all docs atleast twice, but ...

Unfortunatelly I am now working on my wifes WinXP Home notebook, so to run IIS there are few tweaks needed, debugging against mono isnt yet possible, right?

Some progress with my deployment, but currentlog still says this:

2005-08-21 15:37:44,996 [5504] ERROR mojoPortal.Web.Global [(null)] - www.mixworx.net
System.Web.HttpException: DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name Target.
at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName)
at System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts)
at System.Web.UI.DataBinder.Eval(Object container, String expression)
at ASP.Links_ascx.__DataBind__control3(Object sender, EventArgs e) in e:\wwwdata\rdje1276\www\2005\Modules\Links.ascx:line 6
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBind()
at System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.BaseDataList.DataBind()
at mojoPortal.Web.LinksModule.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()

...property with the name Target - it is related to Links module changes I have seen in CultureCZE ?

(it seems there is missing field in table? are DB update scripts in-line with current code poste to SVN too?)

Petr

8/21/2005 4:02:01 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

In the MSSQLData folder there is a script for the upgrade to the next release, upgradefrom20050710to.sql
run that then re-run the script to create all stored procs 3mojoPortal.MSSQL.CreateStoredProcedures.sql

That should get you past this error.

No reason you can't debug as long as you have IIS and Developer tool. On Windows we are not using mono but .NET 1.1. I compile on windows against .NET 1.1 and then deploy to a mono machine and it works fine but if you are using Windows for deployment target you have no need of mono for anything.
8/21/2005 4:02:56 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

Joe, hope I have found field type in source (nvarchar[20]), so I will try to correct db now.

edit:

Thanks, yes, things are not as easy... I will do through scripts.

NOTE:

With Rainbow, I have never reached this level of understanding, never successfuly compiled the beast, never have so good online support, never have up-and-running localized portal less than 24 hours from "first contact".

mojoPortal is great, everything works like a charm!

8/21/2005 5:50:02 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

oh, little trouble at my internet connection side....
As I started stored procedures (re)creating script, connection was lost during this process,
so my question is:

Are database maintenance scripts fully recoverable itself from this kind of trouble?
Are maintenance transactioned at some small step level?
Can I hope that simply restarting script again does "remaining" undone steps correctly, or that some warning will be shown in case of inconsistency?

Yes, I will rerun script  again right now, simply I want to be SURE and hope all new deployers want it too :-)
 
Petr

8/21/2005 6:22:53 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

The MS SQL upgrade script is mostly transacted so you should be able to try and run it again.

You can always run the stored procedure script over and over as many times as you want, it replaces the procedures every time so it should never fail, though you may get one warning about dependency you can ignore it.
8/21/2005 6:48:18 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

OK, seems that runing SP script again already does not warn .... instead, I have result, which says that language was changed to Czech, who knows ....

But BIG progres happened! 10 minutes ago I have successfully started mojoPortal again,
signing up through SSL?:-)

web.config contains this:


At first attempt, I leaved "MapAlternatePort" at "false", which was not good. I am?only little confused WHY is it setup that way ...

BUT, there is (and was before) trouble when I want to show MemberList.aspx. Before I have always custom error page shown, but now I can see?following message. This trouble exist only in MemberList until now. Relates to database COLLATION which is well know problem while localizing?any DB projects. While playing with RainbowPortal, I have changed my database default collation to "SQL_Latin1_General_CP1_CI_AS" as "quite most neutral" and required by them ...

Error report is here:

Server Error in '/2005' Application.
--------------------------------------------------------------------------------

Cannot resolve collation conflict for equal to operation.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot resolve collation conflict for equal to operation.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException: Cannot resolve collation conflict for equal to operation.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +44
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
mojoPortal.Data.SqlHelper.ExecuteDataset(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +147
mojoPortal.Data.SqlHelper.ExecuteDataset(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +88
mojoPortal.Data.dbPortal.SiteUser_GetUserListPage(Int32 SiteID, Int32 PageNumber, Int32 PageSize, String UserNameBeginsWith) +703
mojoPortal.Business.SiteUser.GetUserListPage(Int32 SiteID, Int32 PageNumber, Int32 PageSize, String UserNameBeginsWith) +13
mojoPortal.Web.MemberList.PopulateControsl() +55
mojoPortal.Web.MemberList.Page_Load(Object sender, EventArgs e) +519
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750





--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
8/21/2005 6:56:42 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

BTW, why this method name? :-))

mojoPortal.Web.MemberList.PopulateControsl() +55

8/21/2005 7:13:06 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

Uuhg.. Its because the table creation script has the COLLATE SQL_Latin1_General_CP1_CI_AS on every table

I try to remember to remove them but every time I re-create the script MS SQL puts it back in there.

You should be able to use whatever collation you want but because my machine is setup with latin it does that every time I generate the table scripts.

You will need to remove that from every table create statement and re-create the tables.

Or

I will do that to my copy in just a few minutes and commit to svn if you want to wait as few minutes
8/21/2005 7:15:51 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

I've commited the corrected script. If you re-create the tables you don't need to run the upgrade script becuase the latest table scripts have all the changes.
8/21/2005 7:20:07 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

>BTW, why this method name? :-))
mojoPortal.Web.MemberList.PopulateControsl()

Its UI code thats what it does, it populate UI controls

> MapAlternatePort
is used in proxy situatuations like at my hosting company grokthis.net they give me my own instance of apache2 running on port 8046 and they map port 80 requests to it using a proxy server, anytime using any non standard ports it should be true, in your case you are only using non standard for ssl but you still need true.
8/21/2005 7:36:10 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

Hmm, now I dont know if you understood me, or if we understand ourself at all :-) ...

My default DB collation ***ALREADY IS*** "SQL_Latin1_General_CP1_CI_AS" and as I know, Rainbow developers removed all explicit collation settings in scripts too.

In mojoPotal, are you doing things the same way? I understand that I can have only one default DATABASE collation, fortunatelly changeable for each one hosetd (against MSSQL7?). Sometimes, there may be trouble with default SERVER colaltion, so app must be well written for neutrality, OK (In my case, I could not remember, but my hosting provider has Czech_CI_AS as SERVER default..., We MUST hope OK?). Tables are created without explicit collation, so inheriting DATABASE default, OK?.

I dont want to have "Czech_CI_AS" or anything special colaltion setup at least on CORE mojoPortal tables. I want in future to be able to store and handle (of course, mainly SORT) MULTILANGUAGE CONTENT in some usable way too. As I know SQLServer (very little..) it is possible to specify col¨lation at QUERY RESULT LEVEL, which seems for me as best case. To be exact, I think that this is even required at PRESENTATION layer queries at all, handling all internal DB processes as fast as possible using fastest BINARY collation...

!!! oh "mea culpa" - my favourite colaltion is of course anything BINARY, no case/accent sensitivity at table level... (but I have database setup as is, as it required Rainbow....)

Excuse me that long post about this issuse, but it is IHMO essential for proper culture neutrality on mojo, and I want to discuss it ASAP ...

thanks for your great support,
Petr

8/21/2005 7:43:19 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

>>BTW, why this method name? :-))
>mojoPortal.Web.MemberList.PopulateControsl()

>Its UI code thats what it does, it populate UI controls

 OK, but why are you populating "Controsl" ...

(excuse me, I am trying to regulary eat "own dog food" as you like; and may be today I have overload you ...)

Petr


8/21/2005 7:50:06 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

So you are saying that even if you re-create the tables they will have latin collation because of your db default even though the server is Czech?

I'm not sure what else to suggest, the table script is the only place I know of any sql collation settings for mojoportal and now they are removed which is good, now it is neutral.

If I were you I would try getting the db default back to Czech for your db and re-create the tables using the neutral script and see if that helps. If you find something in the mojoportal code that is causing this please let me know and I'm happy to make it more neutral but as fars as I know the collation in the table creation script was the only non-neutral sql in the code.

No problem with long thread I definitely want to resolve any localization issues that can be identified in the code.
Maybe we should continue on a new thread in the Localization forum, name it Czech Localization? It will be easier for others to find since this thread started about SSL and ports.

I am actually working all day to localize the date picker and just got it working with cs-CZ so you can let me know if that looks right. You can test it by posting a blog and check the datepicker  (assuming you are using cs-CZ as the culture setting in the Web.config) and let me know if it localizes to Czech or not.

Thanks,

Joe
8/21/2005 7:51:30 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???

Doh! I didn't notice the typo, thanks I'll fix that, I guess if I look at it long enough I stop seeing it
8/21/2005 8:20:17 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

OK, I will start new thread in Localization.

Here only last question about SECURITY:

If I am signed-ni as admin, or as member of admin (or any content/(something secured) editable) ROLE, then I probably want to have whole(?) portal session to go through SSL (even at regular pages there may be and are some admin links, may be LABELS, too) ... or I am wrong ???
Currentlly signed, I can go even to Admin pages through http://... OK, I can setup SSL requirement at PAGE level (although when I tried this right now, it seems nothing was changed ...:-(

Can be SSL requirement related to ROLE, or atleast particular USER too? Have this any meaning? (IMHO, it can simplify and decouple this setting from pages, but I really dont know where to use it ... only that it can be POSSIBILITY to users to be SURE about its secured session, no-compromise)

IMHO,  security is the key to be able (AT ALL) deploy at least simple start-up site allowing users registration with assured appropriate security level for THEM.

This relates to USER IDENTITY shown through public HTTP:// ...  Are in mojoPortal by design ALL E-MAIL fields hidden or processed throu some scrambling? Currently I see my registration email visible together with WELCOME string...

Will be able to register new user even without NOT SHOWING HIS E-MAIL anywhere, if he dont like this?

Thanks for all,
Petr

 

8/21/2005 8:36:36 AM
Gravatar
Total Posts 18439

Re: Can I change port used while HTTPS access???


Currently SSL can be configured at the site level or page level.

I don't think it makes sense to configure it at the role level. The purpose of using ssl to secure content from packet sniffing.  If one role sees the same content and that role is not setup for ssl the content is not secured.  It would only add complexity not value.

No one else can see your email address when they login, are you worried about someone looking over your shoulder and seeing it? Or are you concerned of someone getting your email address by sniffing packets?

I am considering changing to diplay user name instead of email.
8/21/2005 9:48:33 AM
Gravatar
Total Posts 25

Re: Can I change port used while HTTPS access???

packet sniffing, of course, especially in wireless networks. Although I have at home TKIP encryption on WIFI, my internet connection goes through CDMA/EVDO (where I dont know how strong?security is) and even anywhere on the way to my?web application ...; I am not so paranoid about my own usage, but users may be?far more lamers in security and I want to avoid as much as possible any possibility to disclose its identitiy, to steal its emails, or something similar ...?BY mojoPortal. (Although their have this already stolen by anything else, of course....... - but, take security?THE requirement, please, we will have better sleeping :-)

Again SSL issue - seems there any caching changes things slightly.... currently I am signed as admin and I am not able to go to any link, even unsecured ones contains https/:port and mojo looks as freezing somewhere ... I have this config (without this, it seemed to froze some minutes before... - i have wirelles switch with NAT between internet connection provider, no proxy, but at their side there are some issues - CDMA, dynamically assigned and changed IPs ... grrrr, but nothing bad seen on other secured sites)

Hope I will look at source ASAP too, to free you from that long debate with me :-))) We have late evening, so I must thank you?today for all your invaluable support, Joe. I believe that all occured issues are not architectural flaws, only keyboard and fingers dropouts :-)

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