Web Connection
Scriptmap won't compile
Gravatar is a globally recognized avatar based on your email address. Scriptmap won't compile
  Jim Monte
  All
  May 11, 2020 @ 06:41pm

Is there a limit on the size of scripmaps? I keep getting an error that it won't compile to FXP..

Sometime the error is "Line too long"

Jim

Gravatar is a globally recognized avatar based on your email address. re: Scriptmap won't compile
  Rick Strahl
  Jim Monte
  May 12, 2020 @ 04:08pm

FoxPro programs once compiled can't exceed 64k in size so yes there's a limit. But a 64k program file is pretty large so I'd be very surprised if you're exceeding that for a script page.

But I think the problem is not that - it's likely that there's a very long line in the document - perhaps a wrapping line of long text?

If so break the line at 255 char intervals and see if that fixes it.

Please let me know what you find - I thought we shouldn't have that issue any longer - that issue was addressed some time ago by checking the text read and breaking long text lines automatically in shorter ones - if possible.

I can think of one thing that can be problematic and that's data: urls which are long, long base64 strings that can't be broken.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Scriptmap won't compile
  Jim Monte
  Rick Strahl
  May 12, 2020 @ 05:02pm

You are right... Had 5 or 6 lines 300 plus chars.. Wrapped them and now they compile to fxp...

I've got all the security working and the site is live!!

I see you posted a video on usersecuruty.. I'll check it out..

Thanks for all your help Rick!!!

Jim

Gravatar is a globally recognized avatar based on your email address. re: Scriptmap won't compile
  Rick Strahl
  Jim Monte
  May 12, 2020 @ 11:56pm

Hmmm... that really shouldn't happen anymore. Are these scripts or templates? Scripts I guess.

The problem is that the FoxPro has a 255 character string literal limit so when long lines are more characters and the generator generates a string for concatenation that's longer than that that's when it breaks. I was sure that was fixed some time ago however, so I have to check.

It's possible this was fixed in the Web Control Framework not in scripts...

Do you still have the code that was causing the problem? There are two FoxPro issues actually - the string literal I mention above as well as command length. It might be the latter that ends up being the problem.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Scriptmap won't compile
  Jim Monte
  Rick Strahl
  May 13, 2020 @ 05:20am

This is a different project i'm working on.. not the musclecar site.. that site is up and running.. Boss likes the whole new Security stuff and wants me to use it on all our sites.. I tried to explain to him.. those are mostly .htm .html file sites.. He doesn't have any idea what's involved in turning them into .script files.. I had an idea.. I went in iis and turned .htm and .html for those virtuals in to scriptmaps added the "HTM" and "HTML" extensions to the "MAIN" in the project.. took out the "" etc in the html file.. added _layoutpage. .etc.. believe it or not... it worked... that was a small html file.. I tried it on a huge file.. and weird things started happening.. FXP not found.. Line too long.. I ended up scrapping that approach with using .htm and .html as scriptmaps.. erase them from IIS I came up with a better solution.. Keep them as regular .htm .html and still use your usersecuity stuff. In the usersecurityprocess class I made a method that does the same thing as login_partial does.. I fetch it with ajax.. and put it in the top float:right menu.. works perfect.. Added the method as to llIgnoreLoginRequest list... works perfect ..

FUNCTION topnavloginmenu()

strit=""


IF USED("appusersecurity")
 USE IN appusersecurity
ENDIF
SELECT 0
USE usersecuritymanager\appusersecurity
LOCATE for UPPER(ALLTRIM(appusersecurity.username))==UPPER(ALLTRIM(process.CAUTHENTICATEDUSER)) 



if (!Process.lIsAuthenticated) 
 strit="LOGBACKIN"  
*  strit=strit+[<a href="login.usm">]
*  strit=strit+[<i class="fa fa-lock"></i>Sign in</a>]
else 
strit=strit+[<div class="dropdown d-inline">]
strit=strit+[<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">]
strit=strit+ Process.oUser.FullName 
strit=strit+[<img title="]+ Process.cAuthenticatedName +[" src="]+  GravatarLink(Process.cAuthenticatedUser,23) +["/>]
strit=strit+[</button>]
strit=strit+[<div class="dropdown-menu bg-secondary">]
strit=strit+[<a class="btn dropdown-item" href="~/usermanager/Profile.usm">]
strit=strit+[<i class="far fa-user fa-fw fa-right-padding"></i>My Profile</a>]
if appusersecurity.Admin 
  strit=strit+[<a class="dropdown-item" href="~/usermanager/admin/UserList.usm"><i class="fas fa-cog fa-fw  fa-right-padding"></i>User Admin</a>]
  strit=strit+[<a class="dropdown-item" href="~/Admin/admin.aspx"><i class="fas fa-cogs fa-fw  fa-right-padding"></i>Server Administration</a>]
endif 
  strit=strit+[<div class="dropdown-divider"></div>]
  strit=strit+[<a class="dropdown-item"  href="logout.usm"><i class="fa fa-lock fa-fw fa-right-padding"></i>Sign out</a></div></div>]
endif 
IF USED("appusersecurity")
 USE IN appusersecurity
ENDIF
response.write(strit)


endfunc



© 1996-2024