A4D, NTK and file uploads

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

A4D, NTK and file uploads

by B. Perkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We're moving our Active4D Shell from ITK to NTK. In testing, almost
everything is working well except for file uploads. I've been able to
upload really small files, but larger files fail. The ITK shell code
didn't do anything special for file uploads, so I'm not sure what I
might need to do differently for NTK.

If anyone has been down this path can you offer any advice?

Thanks,

Brad Perkins

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: A4D, NTK and file uploads

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> We're moving our Active4D Shell from ITK to NTK. In testing, almost  
> everything is working well except for file uploads. I've been able  
> to upload really small files, but larger files fail. The ITK shell  
> code didn't do anything special for file uploads, so I'm not sure  
> what I might need to do differently for NTK.

I assume you have upped the 'max request size' in Active4D.ini? What  
are you doing in A4D_ITK_ReceiveCallback?

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: A4D, NTK and file uploads

by B. Perkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aparajita Fishman wrote:
>> We're moving our Active4D Shell from ITK to NTK. In testing, almost
>> everything is working well except for file uploads. I've been able to
>> upload really small files, but larger files fail. The ITK shell code
>> didn't do anything special for file uploads, so I'm not sure what I
>> might need to do differently for NTK.
>
> I assume you have upped the 'max request size' in Active4D.ini?
Yes, but the value is unchanged from our ITK shell. It is set to 2049.
> What are you doing in A4D_ITK_ReceiveCallback?
Basically the same thing that the ITK shell code did, but compensating
for the differences in ITK and NTK. I added a bunch of logging
yesterday, and think I noticed a pattern shortly before I left
yesterday. What appears to be happening is that the NTK client socket
starts processing the request but loses its endpoint before everything
is processed.

I'm going to debug this more this morning, and if I don't solve it I'll
post my code.

FWIW, normal page serving and processing is working great.

-- Brad

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: A4D, NTK and file uploads

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> What are you doing in A4D_ITK_ReceiveCallback?
> Basically the same thing that the ITK shell code did, but  
> compensating for the differences in ITK and NTK. I added a bunch of  
> logging yesterday, and think I noticed a pattern shortly before I  
> left yesterday. What appears to be happening is that the NTK client  
> socket starts processing the request but loses its endpoint before  
> everything is processed.

You could always ask Rob Lavaux for help, I'm sure he'll have  
something useful to say.

Regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: A4D, NTK and file uploads

by B. Perkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aparajita Fishman wrote:

>>> What are you doing in A4D_ITK_ReceiveCallback?
>> Basically the same thing that the ITK shell code did, but
>> compensating for the differences in ITK and NTK. I added a bunch of
>> logging yesterday, and think I noticed a pattern shortly before I
>> left yesterday. What appears to be happening is that the NTK client
>> socket starts processing the request but loses its endpoint before
>> everything is processed.
>
> You could always ask Rob Lavaux for help, I'm sure he'll have
> something useful to say.
I'm in touch with Rob on this. He's been very helpful so far.

-- Brad

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

SSL Access using A4D?

by Mike Erickson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All

I am in crunch time today, finally going live.    Is there some trick  
to getting SSL access working with A4D pages.   Up to this point, I  
have done all my local testing (and on test server) using standard  
HTTP request.

I _THOUGHT_ that when I moved live to the server where we have a valid  
ssl cert, etc. I could just change

http://www.domain.com/mypage.a4d

to

https://www.domain.com/mypage.a4d

and all would still work as it did before.    However, when I do this,  
I receive an error

404 Not Found

The requested url /signup.a4d was not found on this server.

file not found
_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by B. Perkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mike,

The easiest way to do this is to put Apache in front of A4D. A4D will
serve on an alternate port, for example 8080. You set up rewrite rules
to reverse proxy incoming A4D requests. I think the Wiki on the A4D
sites has some more info re: setup.

If you are already doing that then most likely you need to make sure
that your server's virtual host configurations for port 443 point to the
rewrite rules. I recently moved three hosts on our server to https, and
got bit by that. :)

hth,

Brad Perkins

Mike Erickson wrote:

> Hello All
>
> I am in crunch time today, finally going live.    Is there some trick
> to getting SSL access working with A4D pages.   Up to this point, I
> have done all my local testing (and on test server) using standard
> HTTP request.
>
> I _THOUGHT_ that when I moved live to the server where we have a valid
> ssl cert, etc. I could just change
>
> http://www.domain.com/mypage.a4d
>
> to
>
> https://www.domain.com/mypage.a4d
>
> and all would still work as it did before.    However, when I do this,
> I receive an error
>
> 404 Not Found
>
> The requested url /signup.a4d was not found on this server.
>
> file not found
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>
>


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Mike Erickson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brad

I cant find ANY of this information in the A4D documentation?   Is  
this something that is new?

Mike Erickson
Automated Solutions Group

On Apr 15, 2008, at 11:27 AM, Brad Perkins wrote:

> Mike,
>
> The easiest way to do this is to put Apache in front of A4D. A4D  
> will serve on an alternate port, for example 8080. You set up  
> rewrite rules to reverse proxy incoming A4D requests. I think the  
> Wiki on the A4D sites has some more info re: setup.
>
> If you are already doing that then most likely you need to make sure  
> that your server's virtual host configurations for port 443 point to  
> the rewrite rules. I recently moved three hosts on our server to  
> https, and got bit by that. :)
>
> hth,
>
> Brad Perkins
>
> Mike Erickson wrote:
>> Hello All
>>
>> I am in crunch time today, finally going live.    Is there some  
>> trick to getting SSL access working with A4D pages.   Up to this  
>> point, I have done all my local testing (and on test server) using  
>> standard HTTP request.
>>
>> I _THOUGHT_ that when I moved live to the server where we have a  
>> valid ssl cert, etc. I could just change
>>
>> http://www.domain.com/mypage.a4d
>>
>> to
>>
>> https://www.domain.com/mypage.a4d
>>
>> and all would still work as it did before.    However, when I do  
>> this, I receive an error
>>
>> 404 Not Found
>>
>> The requested url /signup.a4d was not found on this server.
>>
>> file not found
>> _______________________________________________
>> Active4D-dev mailing list
>> Active4D-dev@...
>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>>
>>
>
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Thomas DeMeo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

There are no quickie fixes here that I know of. If you don't want to  
get into using Apache and rewrite rules,  I handled this by using a  
wrapper library method to handle all URL references.

        method "href"($vt_InURL)
                /*
                receive a relative URL and returns an absolute URL with appropriate  
prefix (http or https)
                This is used for all hrefs to facilitate easy use of SSL
                */
                case of
                  :(get request info("*host port")="80")
                        $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
                  :(get request info("*host port")="443")
                        $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
                else
                        If(get request info("*secure")="0")
                                $vt_OutURL:="http://"+get request info("*host")+":"+get request  
info("*host port")+"/"+$vt_InURL
                        Else
                                $vt_OutURL:="https://"+get request info("*host")+":"+get request  
info("*host port")+"/"+$vt_InURL
                        End if
                end case
                       
                return($vt_OutURL)
               
        end method

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Mike Erickson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom

How did you use this "deeper" in the code, etc.    Where did you place  
this routine (and where did you call it).

Regards

Mike Erickson
Automated Solutions Group

On Apr 15, 2008, at 12:11 PM, Thomas DeMeo wrote:

> Hi,
>
> There are no quickie fixes here that I know of. If you don't want to  
> get into using Apache and rewrite rules,  I handled this by using a  
> wrapper library method to handle all URL references.
>
> method "href"($vt_InURL)
> /*
> receive a relative URL and returns an absolute URL with  
> appropriate prefix (http or https)
> This is used for all hrefs to facilitate easy use of SSL
> */
> case of
>  :(get request info("*host port")="80")
> $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
>  :(get request info("*host port")="443")
> $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
> else
> If(get request info("*secure")="0")
> $vt_OutURL:="http://"+get request info("*host")+":"+get request  
> info("*host port")+"/"+$vt_InURL
> Else
> $vt_OutURL:="https://"+get request info("*host")+":"+get request  
> info("*host port")+"/"+$vt_InURL
> End if
> end case
>
> return($vt_OutURL)
>
> end method
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Thomas DeMeo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You would call this from a library. The Active4D folder contains  
libraries that Aparajita provides, such as a4d.debug. You can put any  
library docs you write in there too. Take a look at libraries in the  
documentation. You should at least have a library for utility web  
methods.

Assuming you put the method in a library named utils.a4d, then you  
can use it like this-

Within HTML:

<a href="<%write(utils.href("your_url.a4d"))%>" ...

or within A4D code:

redirect(utils.href("your_url.a4d"))



Tom



On Apr 15, 2008, at 3:20 PM, Mike Erickson wrote:

> Tom
>
> How did you use this "deeper" in the code, etc.    Where did you  
> place this routine (and where did you call it).
>
> Regards
>
> Mike Erickson
> Automated Solutions Group
>
> On Apr 15, 2008, at 12:11 PM, Thomas DeMeo wrote:
>
>> Hi,
>>
>> There are no quickie fixes here that I know of. If you don't want  
>> to get into using Apache and rewrite rules,  I handled this by  
>> using a wrapper library method to handle all URL references.
>>
>> method "href"($vt_InURL)
>> /*
>> receive a relative URL and returns an absolute URL with  
>> appropriate prefix (http or https)
>> This is used for all hrefs to facilitate easy use of SSL
>> */
>> case of
>>  :(get request info("*host port")="80")
>> $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
>>  :(get request info("*host port")="443")
>> $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
>> else
>> If(get request info("*secure")="0")
>> $vt_OutURL:="http://"+get request info("*host")+":"+get  
>> request info("*host port")+"/"+$vt_InURL
>> Else
>> $vt_OutURL:="https://"+get request info("*host")+":"+get  
>> request info("*host port")+"/"+$vt_InURL
>> End if
>> end case
>>
>> return($vt_OutURL)
>>
>> end method
>>
>> _______________________________________________
>> Active4D-dev mailing list
>> Active4D-dev@...
>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Mike Erickson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom

I know all about libraries, etc.  I use them quite a bit!   My  
question was "better phrased" at :

- Where do you access this routine within YOUR .a4d pages

In my case, I have TWO places where I need to make sure the code is  
executed securely (payment processing) so instead of page links such as;

        <a href="signup.a4d">Signup</a>

I need to call

        <a href="https://www.domain.com/signup.a4d">Signup</a>

To make sure the page is executed under SSL.    What I am asking is  
how have you used this library method to make sure this happens?


Regards

Mike Erickson
Automated Solutions Group

On Apr 15, 2008, at 12:51 PM, Thomas DeMeo wrote:

> Hi,
>
> You would call this from a library. The Active4D folder contains  
> libraries that Aparajita provides, such as a4d.debug. You can put  
> any library docs you write in there too. Take a look at libraries in  
> the documentation. You should at least have a library for utility  
> web methods.
>
> Assuming you put the method in a library named utils.a4d, then you  
> can use it like this-
>
> Within HTML:
>
> <a href="<%write(utils.href("your_url.a4d"))%>" ...
>
> or within A4D code:
>
> redirect(utils.href("your_url.a4d"))
>
>
>
> Tom
>
>
>
> On Apr 15, 2008, at 3:20 PM, Mike Erickson wrote:
>
>> Tom
>>
>> How did you use this "deeper" in the code, etc.    Where did you  
>> place this routine (and where did you call it).
>>
>> Regards
>>
>> Mike Erickson
>> Automated Solutions Group
>>
>> On Apr 15, 2008, at 12:11 PM, Thomas DeMeo wrote:
>>
>>> Hi,
>>>
>>> There are no quickie fixes here that I know of. If you don't want  
>>> to get into using Apache and rewrite rules,  I handled this by  
>>> using a wrapper library method to handle all URL references.
>>>
>>> method "href"($vt_InURL)
>>> /*
>>> receive a relative URL and returns an absolute URL with  
>>> appropriate prefix (http or https)
>>> This is used for all hrefs to facilitate easy use of SSL
>>> */
>>> case of
>>>  :(get request info("*host port")="80")
>>> $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
>>>  :(get request info("*host port")="443")
>>> $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
>>> else
>>> If(get request info("*secure")="0")
>>> $vt_OutURL:="http://"+get request info("*host")+":"+get  
>>> request info("*host port")+"/"+$vt_InURL
>>> Else
>>> $vt_OutURL:="https://"+get request info("*host")+":"+get  
>>> request info("*host port")+"/"+$vt_InURL
>>> End if
>>> end case
>>>
>>> return($vt_OutURL)
>>>
>>> end method
>>>
>>> _______________________________________________
>>> Active4D-dev mailing list
>>> Active4D-dev@...
>>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>>
>>
>> _______________________________________________
>> Active4D-dev mailing list
>> Active4D-dev@...
>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>>
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/


_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Thomas DeMeo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, if I pointed out the obvious.

It would be written like this:

<a href="<%write(utils.href("signup.a4d"))%>">Signup</a>


If a request comes in on port 443 for example, it would be output as:

<a href="https://www.domain.com/signup.a4d">Signup</a>





On Apr 15, 2008, at 3:59 PM, Mike Erickson wrote:

> Tom
>
> I know all about libraries, etc.  I use them quite a bit!   My  
> question was "better phrased" at :
>
> - Where do you access this routine within YOUR .a4d pages
>
> In my case, I have TWO places where I need to make sure the code is  
> executed securely (payment processing) so instead of page links  
> such as;
>
> <a href="signup.a4d">Signup</a>
>
> I need to call
>
> <a href="https://www.domain.com/signup.a4d">Signup</a>
>
> To make sure the page is executed under SSL.    What I am asking is  
> how have you used this library method to make sure this happens?
>
>
> Regards
>
> Mike Erickson
> Automated Solutions Group
>
> On Apr 15, 2008, at 12:51 PM, Thomas DeMeo wrote:
>
>> Hi,
>>
>> You would call this from a library. The Active4D folder contains  
>> libraries that Aparajita provides, such as a4d.debug. You can put  
>> any library docs you write in there too. Take a look at libraries  
>> in the documentation. You should at least have a library for  
>> utility web methods.
>>
>> Assuming you put the method in a library named utils.a4d, then you  
>> can use it like this-
>>
>> Within HTML:
>>
>> <a href="<%write(utils.href("your_url.a4d"))%>" ...
>>
>> or within A4D code:
>>
>> redirect(utils.href("your_url.a4d"))
>>
>>
>>
>> Tom
>>
>>
>>
>> On Apr 15, 2008, at 3:20 PM, Mike Erickson wrote:
>>
>>> Tom
>>>
>>> How did you use this "deeper" in the code, etc.    Where did you  
>>> place this routine (and where did you call it).
>>>
>>> Regards
>>>
>>> Mike Erickson
>>> Automated Solutions Group
>>>
>>> On Apr 15, 2008, at 12:11 PM, Thomas DeMeo wrote:
>>>
>>>> Hi,
>>>>
>>>> There are no quickie fixes here that I know of. If you don't  
>>>> want to get into using Apache and rewrite rules,  I handled this  
>>>> by using a wrapper library method to handle all URL references.
>>>>
>>>> method "href"($vt_InURL)
>>>> /*
>>>> receive a relative URL and returns an absolute URL with  
>>>> appropriate prefix (http or https)
>>>> This is used for all hrefs to facilitate easy use of SSL
>>>> */
>>>> case of
>>>>  :(get request info("*host port")="80")
>>>> $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
>>>>  :(get request info("*host port")="443")
>>>> $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
>>>> else
>>>> If(get request info("*secure")="0")
>>>> $vt_OutURL:="http://"+get request info("*host")+":"+get  
>>>> request info("*host port")+"/"+$vt_InURL
>>>> Else
>>>> $vt_OutURL:="https://"+get request info("*host")+":"+get  
>>>> request info("*host port")+"/"+$vt_InURL
>>>> End if
>>>> end case
>>>>
>>>> return($vt_OutURL)
>>>>
>>>> end method
>>>>
>>>> _______________________________________________
>>>> Active4D-dev mailing list
>>>> Active4D-dev@...
>>>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>>>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>>>
>>>
>>> _______________________________________________
>>> Active4D-dev mailing list
>>> Active4D-dev@...
>>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>>>
>>
>> _______________________________________________
>> Active4D-dev mailing list
>> Active4D-dev@...
>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
>

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Mike Erickson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tom

OK, I see what your method is using, but I think my problem is  
"outside" of this issue

Assuming you enter the following into the browser address bar

        https://www.domain.com/signup.a4d

I receive an error

404 Not Found

The requested url /signup.a4d was not found on this server.

file not found


THIS IS THE CRUX OF MY PROBLEM!  I am not sure WHY I am receiving this  
error.   I am using the default 4D Web Server to serve up the pages,  
all incoming access is funneled through 'A4D_OnWebConnection' via the  
'On Web Connection' database method.

Regards

Mike Erickson
Automated Solutions Group

On Apr 15, 2008, at 1:08 PM, Thomas DeMeo wrote:

> Sorry, if I pointed out the obvious.
>
> It would be written like this:
>
> <a href="<%write(utils.href("signup.a4d"))%>">Signup</a>
>
>
> If a request comes in on port 443 for example, it would be output as:
>
> <a href="https://www.domain.com/signup.a4d">Signup</a>
>
>
>
>
>
> On Apr 15, 2008, at 3:59 PM, Mike Erickson wrote:
>
>> Tom
>>
>> I know all about libraries, etc.  I use them quite a bit!   My  
>> question was "better phrased" at :
>>
>> - Where do you access this routine within YOUR .a4d pages
>>
>> In my case, I have TWO places where I need to make sure the code is  
>> executed securely (payment processing) so instead of page links  
>> such as;
>>
>> <a href="signup.a4d">Signup</a>
>>
>> I need to call
>>
>> <a href="https://www.domain.com/signup.a4d">Signup</a>
>>
>> To make sure the page is executed under SSL.    What I am asking is  
>> how have you used this library method to make sure this happens?
>>
>>
>> Regards
>>
>> Mike Erickson
>> Automated Solutions Group
>>
>> On Apr 15, 2008, at 12:51 PM, Thomas DeMeo wrote:
>>
>>> Hi,
>>>
>>> You would call this from a library. The Active4D folder contains  
>>> libraries that Aparajita provides, such as a4d.debug. You can put  
>>> any library docs you write in there too. Take a look at libraries  
>>> in the documentation. You should at least have a library for  
>>> utility web methods.
>>>
>>> Assuming you put the method in a library named utils.a4d, then you  
>>> can use it like this-
>>>
>>> Within HTML:
>>>
>>> <a href="<%write(utils.href("your_url.a4d"))%>" ...
>>>
>>> or within A4D code:
>>>
>>> redirect(utils.href("your_url.a4d"))
>>>
>>>
>>>
>>> Tom
>>>
>>>
>>>
>>> On Apr 15, 2008, at 3:20 PM, Mike Erickson wrote:
>>>
>>>> Tom
>>>>
>>>> How did you use this "deeper" in the code, etc.    Where did you  
>>>> place this routine (and where did you call it).
>>>>
>>>> Regards
>>>>
>>>> Mike Erickson
>>>> Automated Solutions Group
>>>>
>>>> On Apr 15, 2008, at 12:11 PM, Thomas DeMeo wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> There are no quickie fixes here that I know of. If you don't  
>>>>> want to get into using Apache and rewrite rules,  I handled this  
>>>>> by using a wrapper library method to handle all URL references.
>>>>>
>>>>> method "href"($vt_InURL)
>>>>> /*
>>>>> receive a relative URL and returns an absolute URL with  
>>>>> appropriate prefix (http or https)
>>>>> This is used for all hrefs to facilitate easy use of SSL
>>>>> */
>>>>> case of
>>>>>  :(get request info("*host port")="80")
>>>>> $vt_OutURL:="http://"+get request info("*host")+"/"+$vt_InURL
>>>>>  :(get request info("*host port")="443")
>>>>> $vt_OutURL:="https://"+get request info("*host")+"/"+$vt_InURL
>>>>> else
>>>>> If(get request info("*secure")="0")
>>>>> $vt_OutURL:="http://"+get request info("*host")+":"+get  
>>>>> request info("*host port")+"/"+$vt_InURL
>>>>> Else
>>>>> $vt_OutURL:="https://"+get request info("*host")+":"+get  
>>>>> request info("*host port")+"/"+$vt_InURL
>>>>> End if
>>>>> end case
>>>>>
>>>>> return($vt_OutURL)
>>>>>
>>>>> end method
>>>>>

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: SSL Access using A4D?

by Thomas DeMeo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That is most likely a problem with your SSL certificate setup.


On Apr 15, 2008, at 4:12 PM, Mike Erickson wrote:

> Tom
>
> OK, I see what your method is using, but I think my problem is  
> "outside" of this issue
>
> Assuming you enter the following into the browser address bar
>
> https://www.domain.com/signup.a4d
>
> I receive an error
>
> 404 Not Found
>
> The requested url /signup.a4d was not found on this server.
>
> file not found
>
>
> THIS IS THE CRUX OF MY PROBLEM!  I am not sure WHY I am receiving  
> this error.   I am using the default 4D Web Server to serve up the  
> pages, all incoming access is funneled through  
> 'A4D_OnWebConnection' via the 'On Web Connection' database metho