Error: Could not find definition for Server Alias 'myapp'.

I've developed an application using PB5.0 called 'myapp' which contains
an user object - "uo_webtest" and a user object function called
"f_webtest" and then complie the PBL to PBD file. Next use the Web.PB
wizard to generate the HTM file, and then run the HTM file on Netscape
4.04, but it fails an error occurs : Error: Could not find definition
for Server Alias 'myapp'.

The following steps to generate the HTM file in my WEB Server
1.    Copy the PBD file to "d:\inetpub\mydir" directory.
2.    In IIS, create a virtual directory called "/myapp" which link to
d:\inetpub\mydir directory
3.    copy the PBCGI050.exe into the /Scripts executable directory.
4.    Copy the PBWEB.INI into the C:\WINNT directory with the following
settings :

[Web.PB]
errormessage='<br>E-Mail: <A
HREF="mailto:YOURwebmaster@YOURcompany.com"> Let me know about it</A>'
ISAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

CGIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

NSAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

[Default]
serveralias=idkdemo
serverobject=u_web_examples

[idkdemo]
application=pb_net_examples
location=localhost
driver=winsock

[PowerBank]
application=pbanksvr
location=bank_01
driver=winsock

5.    Run the Web.PB to generate the HTM file with the following
settings
        a.    create a new server alias called "myapp"
        b.    driver is "winsock"
        c.    port number for the application is "10099"
        d.    server location is the Web server location - 192.166.10.2
        e.    then generate the HTM file called "webtest.htm"
        f.    the file PBWEB.INI is also updated with the following
settings :

[Web.PB]
errormessage='<br>E-Mail: <A
HREF="mailto:YOURwebmaster@YOURcompany.com"> Let me know about it</A>'
ISAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

CGIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

NSAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGTH,HTTP_USER_AGENT"

[Default]
serveralias=idkdemo
serverobject=u_web_examples

[idkdemo]
application=pb_net_examples
location=localhost
driver=winsock

[PowerBank]
application=pbanksvr
location=bank_01
driver=winsock

[myapp]
driver=winsock
application=10099
location=192.166.10.2

        g.    the webtest.htm file is generated as shown below and saved
in "d:\inetpub\mydir" in the Web Server

<html>
<head>
   <title>WEB PB PowerBuilder Page </title>
<h1>WEB PB PowerBuilder Page </h1>
</head>
<IMG SRC="pb1.jpg">
<body>
<p><FORM METHOD="post"
ACTION="/Scripts/pbcgi050.exe/myapp/uo_webtest/f_webtest/">
<PRE>
Enter test1<input name = "ps_test1"  type = "TEXT"  value = ""
ALIGN=right>  <br>
Enter test2 <input name = "ps_test2"  type = "TEXT"  value = ""
ALIGN=right>  <br>
                <input type = "submit" value = "
Submit">  <input type = "reset" value = "  Clear  ">
</PRE>
 </form>
<p>
<hr>
</body>
</html>

6.    Add "myapp 10099/tcp" into the SERVERS file in
C:\WINNT\SYSTEM32\DRIVERS\ETC directory.

7.    Open the file "webtest.htm" in Netscape as
http://192.166.10.2/myapp/webtest.htm

8.    Click the submit button, then the error occurs.

I've tried to change [default] in the PBWEB.INI to
    [Default]
    serveralias=myapp
    serverobject=uo_webtest

but the eorr still occurs.

Can anyone help me ! Thanks.

--
Johnny Yeung
mailto:johnny@clarionsec.com


0
Johnny
3/10/1998 5:03:13 AM
sybase.powerbuilder.web-pb 1541 articles. 0 followers. Follow

1 Replies
260 Views

Similar Articles

[PageSpeed] 51

Johnny,

You need a distributed server application to go with the remote object in
the PBD. You don't need the "myapp" virtual directory. Your distributed
server should open a window, instatiate a global transport object and listen
for connections. The objects in the PBD are called through the distributed
server.

However, the error you're receiving sounds like the request is not getting
that far. Make sure that pbweb.ini (the second version in your email) is in
the winnt directory of the web server. If the web server is not using winnt
as its operating system directory, put pbweb.ini in the operating system
directory (example: some NT systems use c:\winnt35). Also, delete the
virtual directory "myapp."

--
Stephanie Giovannini
Software Engineer
Anteon Corporation
sgiovann@dayton.anteon.com

Johnny Yeung wrote in message <3504C990.1489C68C@clarionsec.com>...
>I've developed an application using PB5.0 called 'myapp' which contains
>an user object - "uo_webtest" and a user object function called
>"f_webtest" and then complie the PBL to PBD file. Next use the Web.PB
>wizard to generate the HTM file, and then run the HTM file on Netscape
>4.04, but it fails an error occurs : Error: Could not find definition
>for Server Alias 'myapp'.
>
>The following steps to generate the HTM file in my WEB Server
>1.    Copy the PBD file to "d:\inetpub\mydir" directory.
>2.    In IIS, create a virtual directory called "/myapp" which link to
>d:\inetpub\mydir directory
>3.    copy the PBCGI050.exe into the /Scripts executable directory.
>4.    Copy the PBWEB.INI into the C:\WINNT directory with the following
>settings :
>
>[Web.PB]
>errormessage='<br>E-Mail: <A
>HREF="mailto:YOURwebmaster@YOURcompany.com"> Let me know about it</A>'
>ISAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCO
L,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NA
ME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LEN
GTH,HTTP_USER_AGENT"
>
>CGIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,
SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME
,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGT
H,HTTP_USER_AGENT"
>
>NSAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCO
L,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NA
ME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LEN
GTH,HTTP_USER_AGENT"
>
>[Default]
>serveralias=idkdemo
>serverobject=u_web_examples
>
>[idkdemo]
>application=pb_net_examples
>location=localhost
>driver=winsock
>
>[PowerBank]
>application=pbanksvr
>location=bank_01
>driver=winsock
>
>5.    Run the Web.PB to generate the HTM file with the following
>settings
>        a.    create a new server alias called "myapp"
>        b.    driver is "winsock"
>        c.    port number for the application is "10099"
>        d.    server location is the Web server location - 192.166.10.2
>        e.    then generate the HTM file called "webtest.htm"
>        f.    the file PBWEB.INI is also updated with the following
>settings :
>
>[Web.PB]
>errormessage='<br>E-Mail: <A
>HREF="mailto:YOURwebmaster@YOURcompany.com"> Let me know about it</A>'
>ISAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCO
L,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NA
ME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LEN
GTH,HTTP_USER_AGENT"
>
>CGIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCOL,
SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NAME
,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LENGT
H,HTTP_USER_AGENT"
>
>NSAPIKeywords="SERVER_SOFTWARE,SERVER_NAME,GATEWAY_INTERFACE,SERVER_PROTOCO
L,SERVER_PORT,REQUEST_METHOD,HTTP_ACCEPT,PATH_INFO,PATH_TRANSLATED,SCRIPT_NA
ME,QUERY_STRING,REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,CONTENT_TYPE,CONTENT_LEN
GTH,HTTP_USER_AGENT"
>
>[Default]
>serveralias=idkdemo
>serverobject=u_web_examples
>
>[idkdemo]
>application=pb_net_examples
>location=localhost
>driver=winsock
>
>[PowerBank]
>application=pbanksvr
>location=bank_01
>driver=winsock
>
>[myapp]
>driver=winsock
>application=10099
>location=192.166.10.2
>
>        g.    the webtest.htm file is generated as shown below and saved
>in "d:\inetpub\mydir" in the Web Server
>
><html>
><head>
>   <title>WEB PB PowerBuilder Page </title>
><h1>WEB PB PowerBuilder Page </h1>
></head>
><IMG SRC="pb1.jpg">
><body>
><p><FORM METHOD="post"
>ACTION="/Scripts/pbcgi050.exe/myapp/uo_webtest/f_webtest/">
><PRE>
>Enter test1<input name = "ps_test1"  type = "TEXT"  value = ""
>ALIGN=right>  <br>
>Enter test2 <input name = "ps_test2"  type = "TEXT"  value = ""
>ALIGN=right>  <br>
>                <input type = "submit" value = "
>Submit">  <input type = "reset" value = "  Clear  ">
></PRE>
> </form>
><p>
><hr>
></body>
></html>
>
>6.    Add "myapp 10099/tcp" into the SERVERS file in
>C:\WINNT\SYSTEM32\DRIVERS\ETC directory.
>
>7.    Open the file "webtest.htm" in Netscape as
>http://192.166.10.2/myapp/webtest.htm
>
>8.    Click the submit button, then the error occurs.
>
>I've tried to change [default] in the PBWEB.INI to
>    [Default]
>    serveralias=myapp
>    serverobject=uo_webtest
>
>but the eorr still occurs.
>
>Can anyone help me ! Thanks.
>
>--
>Johnny Yeung
>mailto:johnny@clarionsec.com
>
>


0
Stephanie
3/10/1998 7:56:10 PM
Reply: