Home | Advertising Info84 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Friday, March 14, 2025  

Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds



Blog Entry: 3/25/2006 4:56:15 PM

  Much thanks, the duplicate incl's I spaced on and should have caught.  The hidden form variable was a key issue.  Thanks for the syntax and the help.  Now I get this page together. j  As a note - I got faster results by dropping my timeout to 3 minutes temporarily while progging and cleared browser cache between tests.  Thanks again.

,

works fine now

,



I am trying to protect and ASP page written in Javascript.  The first part of the page goes:

<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="../Connections/connWINGAP.asp" -->

When I insert the aspprotect code it looks like this:

<%@LANGUAGE="JAVASCRIPT"%>
<!--#INCLUDE VIRTUAL="/GIS/WCGIS/GISProtect/check_user_inc.asp"-->
<!--#include file="../Connections/connWINGAP.asp" -->

and I get this error: 

Microsoft JScript compilation error '800a03f7'

Unterminated string constant

/GIS/WCGIS/GISProtect/check_user_inc.asp, line 2

I think I understand that your code is written in VBscript and that is why it is not working.  If this is the case, how can I switch to VB to execute your stuff then switch back?

Thanks,

Jess

,

thanks... a review at aspin is always appretiated ...no one ever seems to do a review and they help me out a lot.. the aspprotect admin area header has a link

thanks...

,

you basically have to edit the html in the links in the various pages and remove them... some are in includes files

use a text editor and be causious / back things up before you remove links so you can revert back

,

The random password is generated during signup and the function that creates it is located on this page of code.

users/register.asp

it looks like this

Function RndStr(Length, UseChrs)
 If IsNull(UseChrs) OR (UseChrs = "") Then UseChrs = "
0123456789abcdefghijklmnopqrstuvwxyz!@#$%
^&*()_+=-"
 NewStr = ""
 Randomize(CByte(Left(Right(Time(),5),2)))
 For gpIndex = 1 To Length
  NewStr = NewStr & Mid(UseChrs, Int((Len(UseChrs)) * Rnd + 1), 1)
 Next
 RndStr = NewStr
End Function

For example go to this page and hit refresh and watch the password change.

http://www.aspprotect.com/demo2/users/register.asp

Yes, sometimes if you hit refresh quickly over and over you'll get the same password, but not generally. Also that is not something that would happen normally as a user isnt going to sit at that screen and hit refresh over and over.

Anyway... when signing up the new user of course has the option to change that password to something they would like better...


As far as... "selecting the same user name and password every time"

I need more information. That does not make sense for a lot of reasons.

Most importantly because usernames are not generated. The are inputed by the user during signup. They are then checked to ensure they do not already exist before the user is allowed to complete their signup.

So under normal circumstances there can never be duplicate usernames in the system or even users with duplicate emails as that is checked as well.

Now of course if you edited the code in any way it is possible all this is not working correctly ?

cwilliams38164.8059143519,

I have activated both activity and log files. The directories exist on my server and don't give any errors.

When I check the activity tab, some times there are a number of items in it.  Other times, there is only my login info.  From what I can see, it is supposed to show the last 50 items of activity at all times.  Am I missing something?

Also, when I click on the log file tab, there is no file or information to see.  Is there something I need to do beyond activating it in the settings area and making sure the directory has write permissions?

Thanks.

,

Hi Chris,

I tried changing using Notepad in the config_inc.asp

from:

If  Application("SERVER_SOFTWARE") = "" Then
 Application("SERVER_SOFTWARE") = Request.ServerVariables("SERVER_SOFTWARE")
End If

To

Application("SERVER_SOFTWARE") = "iis/6"

and the albums still do not show up under the categories

Rhona (rookie)

 

,

Hi - When I try the mass email feature, I get an error that says:

ODBC Microsoft access driver) too few parameters expected 1

/aspprotect/password/admin/send_mass_email.asp line 280

Oddly...this feature works fine when I use the original admin user that you setup. 

But I setup another one with my username and password (not test) - because I was afraid anything with "test" could get deleted. 

Any ideas on why the new admin userid would not work?  Note: I have not change any code from the original installation.

 

,

Is there a way to set various members to upload a limit of photos. So, one member can only upload 5 photos in 1 album and another can upload 30 photos in 2 albums. Even if you just set a permission for the number of uploads for each member.

Thank you

, I have been using the AspHttp Component method for displaying my ads along with the google adsense code.  However, in the last few days my site was taking too long to load, so I replaced the AspHttp component, with Javascript method.  The site was back to speed.  But now, the Google Adsense banners do not show up.  Is there a solution for that?  Can the Javascript show Adsense banners also?  Because they do show the Flash banners., I am having difficulties importing new Users.

I have exported the existing list and then copied in the additional users and save the file as text (tab delimited) in Exel.

When I go to import the file (browse then upload) I get the following error:

Microsoft VBScript compilation error '800a03f9'

Expected 'Then'

/aspprotect/password_admin/upload_post.asp, line 6

If Session("Admin") <> "True"



If I upload the text file by FTP and then try to import it it only tends to import the first two existing rows.

All collumns match but not sure if I need to add "User_ID". I have added it and created consequecutive numbers.

Any assistance would be appreciated.

Thanks



,

Redirecting is not something ASPProtect does because you can
do that sort of thing using simple ASP redirects.


In all of these examples you are going to want to protect the pages you send these users to accordingly.
So that if they know the url they just cant go their directly without loging in.

 


Redirecting example..
This page will redirect admins or level 4 users to a certain page  and anyone else to
another page.
 
 
<%@ LANGUAGE="VBSCRIPT" %>
<!--#INCLUDE FILE="check_user_inc.asp"-->
 
<%
If Session("Admin") = "True" or Session("Access_Level") = "4"  Then
    Response.Redirect("sompage.asp")
Else
    Response.Redirect("someotherpage.asp")
End If
%>

 

 

Redirecting example..
This page will redirect level 1 users to a certain page. level 2 users to certain page, and anyone else to
another page.
 
 
<%@ LANGUAGE="VBSCRIPT" %>
<!--#INCLUDE FILE="check_user_inc.asp"-->
 
<%
If Session("Access_Level") = "1"  Then
    Response.Redirect("level1.asp")
ElseIf Session("Access_Level") = "2" Then
    Response.Redirect("level2.asp")
Else
    Response.Redirect("allothers.asp")
End If
%>

 

 

Redirecting example..
This page will redirect user "PistolPete" to a certain page.

 
<%@ LANGUAGE="VBSCRIPT" %>
<!--#INCLUDE FILE="check_user_inc.asp"-->
 
<%
If Session("Username") = "PistolPete" Then
    Response.Redirect("somedirectory/somepage.asp")
End If
%>


 
then just make sure the page you send the user to to also checks to see if the user is the right user.... to make sure others users can't access each others pages
 
<%
If Session("Username") <> "PistolPete" Then
    Response.Write("You do not have access to this page.")
    Response.End
End If
%>

 

 

etc etc etc.... these code snippets should point you in the right direction...

,

you summed it up perfectly... everything you said really

As for the banner software custimizations.. you could just make another folder with a modified admin area (little tweaks here and there so the person logged in only controls their own banners) You'd probably want to add an approval process so nothing they did went live unless you really really trust them. That wouldn't be that hard either.

I always planned to do it someday but I just never have time.

 

cwilliams38436.2124884259,

I have noticed that during the file import, that some of the pictures get messed up.  I can import aroun 150 pictures into different albums, say 3 albums with 50 each.

I have noticed however that some of the get messed up.  What is happening is...the thumbnail will be correct, but after you click it the picture that shows up is one form a different album.

Any cure for this?

, also, from looking at your site your ideal scenario would be a system that allows you to show all banners in one zone at any given time but in a different order.

ASPBanner is just not that sort of system. It is only designed to show one banner at a time from a given zone in random order.,
I am having difficulty properly securing pdf's using 7.x
I used the example file and have been able to secure images and word docs, but the pdf's give users the error "There was an error opening this document. The file cannot be found."

The kicker -- it works fine on my computer, just not anyone else's. I put a link up to the same file without any security and that works on everyone's computer. The word file links and redirects work too. I've tried my log-in on other computers, then attempting to download the pdf and that doesn't work.

The client wants a site where users must register before downloading pdf's. They should be able to view all the pages without registering.

I don't know what I'm doing wrong. But I can't complete the site until this issue is resolved.

Help appreciated.


,

Sorry, you cannot, that is how it works and that is how it has to work for reasons I am not going to try to explain as it is pretty technical. (it works the same way even when not using paypal and using email authentication... nearly every registration system out there does it that way under an email authentication scenario or a PayPal IPN thing.)

Basically, if you are concerned about it you need to periodically manually check for accounts that were never activated and delete them. Maybe when I get some time some day I will make a little interface to help find those and clean them up at once.

 

 

,

Microsoft has a free version of SQL server 2000 than you can run on a development machine.


http://www.microsoft.com/downloads/details.aspx?FamilyID=413 744d1-a0bc-479f-bafa-e4b278eb9147&DisplayLang=en

This is really the same thing as the MSDN version of SQL server that comes with Visual Studio

It is limited in two ways.

  • No single database can exceed 2 gigabytes in size. However, each Desktop Engine server instance can contain many databases, each of which can be up to 2 gigabytes in size. Each computer can host up to sixteen instances of Desktop Engine.

  • Performance will rapidly decline when more than five simultaneous users use the database engine at the same time. With five users or less Desktop Engine will operate with full SQL Server speed.

    After you install this your going to need a way to connect to your sql server as well as a way to run queires on it.

    I suggest either install the client tools off any SQL 2000 Installation Disc (giving you enterprise manager and query manager)

    or use the FREE SQL Server Web Data Administrator which will do amost everything you  will need to do. It is really very slick
    http://support.cjwsoft.com/forum/forum_posts.asp?TID=127& ; ; ;PN=1

    Then you have a pretty sweet setup for testing and developing locally using SQL server.

    If you are wondering why someone with a real SQL Server 2000 cd wouldn't just install the real SQL server locally it is because the server part will usually not install on XP Pro or non server versions of windows for licensing reasons. (at least every SQL 2000 CD I have is like that regardless of whether it is standard or enterprise) But the client side tools on the cd are invaluable so I just install the Desktop Version of SQL along with the client side tools and everything works great.

  • , That is by design and how it is designed to function.

    There is no easy way to do what you are asking about.

    Can it be done ?, sure!!

    But it is a lot of custom coding to sort it all out and not something we support.

    If I were you I would simply edit the login box screen to show some hyperlinks and options should a person need to use them. ,

    Yeah sorry you are right. It works for me

    http://www.rottys.net/gallery/default.asp?CatLevel=2&Cat 1_ID=5

     

    ,

    actually  I just went to it again and it was somewhat slow coming up this time..

    perhaps you have some issues with the sql database.

    it should be instant.. like this one I run on my server
    http://banserver.powerasp.com/aspbanner/

    I suppose it could also have something to do with sql server resources but its hard to say..

     

    cwilliams38319.7859722222,

    I getting a strange error with ASPProtect.

     Microsoft OLE DB Provider for SQL Server error '80040e14'

    Unclosed quotation mark before the character string '¾_^Ö'.

    /aspprotect/check_user_inc.asp, line 114

    If I check the database directly "¾_^Ö" is the exact string for the password.

    Any Ideas

    ,

    [QUOTE=cwilliams]I would like to delete the SQL tables and set them up from scratch using enterprise manager and sql query manager and see what happens

    If that is ok with you let me know.

    Something is wrong like I said...  almost seems like the database is caching old password info from the field.[/QUOTE]

    Sure go ahead

    ,

    When I add a user, I can not activat it.

    What do you have the registration type set to in the settings ?
    They wont be activated automatically unless you have "automatically" selected ?

    It sends me back to log on and will now allow me to log in as admin???

    I am not quite sure I understand ? Seems to me like that would be normal because you can always log in as the admin at any time. If you cant log in as the user you just signed up as that could be for a couple reasons relating to the registration type you have slected in the settings. There are 3 types all epxlained in the settings screen. Some require manual activation byt the admin, some involve a registration email.. etc etc

    I can restart the APP and log in as Admin, but the user I added
    is still not activated??

    How and why are you restarting the applicaton ? Please explain what your doing there.

    My system will also not allow me to set the Stay Loged in FLag.
    It just ignores it....

    As I told you in an email earlier cookies must be enabled for authentication to work. You mentioned now you can not log off ? I am not sure I know what you mean by that. I assume you know to close all browser windows when testing things like this and I assume you know you have specifically log off and confim it in order to remove the remember me cookie and have to log in again when you return to the site.

    , OK, thanks.., hi,

    Sounds like permissions.. the text file that the config file data is not being written to.

    open the file "data/config/aspbanner_unlimited_config.asp" with a text editor and see if your values are getting saved.. if they are not its permissions to that folder and file as far as not saving config settings goes.

    You may also want to check out "data/show_path_info.asp" which if run from the browser has info on manual/alternate setup scenarios.. as far as what directories you put things in and also editing the config file manually.

    lastly make sure the filesystem object is not disabled by something like norton script blovking or something similar which can also cause trouble regarding writing to text files.

    ,

    I log all 404 errors on my site and since installing ASPBanner, I get a lot of the following error:

    /aspbanner/edit_banner.asp?Banner_ID=11&User_ID=1 contains a broken link:

    /aspbanner/right1.gif

    ID changes and there are various missing links.  Some missing links include:

    /aspbanner/drop2.gif
    /aspbanner/left1.gif
    /aspbanner/right2.gif
    etc.

    While not critical, these are filling up my error logs and it takes time for me to sort through them.

    ,

    Can I have the logon be in a top frame while having the protected pages displayed in a main frame?

    Using frames with forms based authentication is not the best thing to be doing. Your much better off not using frames and using includes files to do a virtual frames sort of thing (search google) but if you are going to use frames I would suggest password protecting the frameset page as well as any pages it contains.

    If you want to have a login form in a non protected top frame all the time.. that posts to a lower frame that is password protected.. you would do this
    http://support.cjwsoft.com/code/moreinfo169-1.htm
    but change the target of the form to one of your frames

    personally though I think that would be a somewhat goofy setup to have going on


    Also, how will it behave if a user moves in between a protected page to a public page and back to the protected page again?

    As long as they have cookies enabled which is required for session variables to work... then you will have no issues because once they come back to a page they have permission to they will just be allowed in without login.. at least while that session is still active.. or for a longer time if they choose the remeber me option which keeps track of them with a cookie
    .

    Really, the best thing to do is expirment and see how things behave.

     

    ,

    I just added this line to the paypal1.asp page

    <input type="hidden" name="currency_code" value="CAD">

    and it worked.  Clearly other values can be entered for other currencies.  Everything was listed in this manual https://www.paypal.com/en_US/pdf/subscriptions.pdf.


    Cheers
    Roy


     
    , Just checked XML Parsing with your file. Got a clean bill of health on that: It's working.

    Got the right code for the location of the ipn.asp in my paypal1.asp, from http:// all the way to .asp.

    I think since everything is set up properly from the looks of things, I'll wait and see. If I get another one who flubs things, then I'll start the testing of the account. But if it goes through just fine, then maybe the Internet just hiccoughed on the first guy... thanks again!


    ,

    yeah.. I cant say for sure.. as I have never really tried to get it working in xp pro.

    Last time I actually used cdonts locally was on a 2000 box

    I would do a google search on xp pro, smtp service, and cdonts and let us know what you find out.

    All of our apps can use free 3rd part emailing components as well so maybe try some of those. Course you need a valid email server to connect to.

     

    ,

    Sorry, should have added,  if i change the connection string, i can also get this...

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    , it probably means the page you are trying to protect is (not in an iis application or not in the same iis application) which it needs to be

    for a situation like using ASPProtect you really want your root of your virtual directory set up as one big application in IIS. (after you inquired about it your hosting company probably went and set the ASPProtect folder as an application in IIS which means any pages you protect need to be in there as well. (truth is they should have had your entire web starting from the root set as one in the 1st place..... its standard practice for any experienced hosting company) cwilliams38456.9306828704,

    I've downloaded this neat little app, but I'm having troubles understanding what I should be using.  Cassinni or IIS, can you help?  I've tried to look at the help, but it is very vague on what to use in each situation. 

    Any help is appreciated. 

    Cheers

    ,
    Ow.
     
    I haven't moved (or messed with) any critical files within the directory at all, just placed them as a job lot into a subdirectory call aspprotect.
     
    All I did was put all the files directly into a directory rather than into the root because some of the subdirectories had the same name as some already in use and would therefore have been overwritten.
     
    I'll go back and have another look in the cold light of day (its too late tonight UK time).
     
    Thanks anyway.
    ,

    it is an email server/setting issue most likely

    your email server probably requires outgoing authentication or something like that and that is why internal emails can be sent to but nothing else

    its something along those lines

    this will help you see the real error instead of the generic 500
    http://support.cjwsoft.com/code/moreinfo11-1.htm

    , Its not a known issue.. I would try the original code before you made any changes and see if it still happens to you.

    It seems to be working fine here for me in amy test web.

    I am going to look into some more in the meantime.cwilliams38341.7166782407,

    ya,

    any variation of a site url is going to have its own set of application and session variables.. soy you have to be consistant with your navigation links

    example (for anyone that comes across this thread)

    http://www.examplesite.com/somepage.asp

    is going to have a different set of application and session variables then

    http://examplesite.com/somepage.asp

    even though they are basically the same page

    ,

    If you are using version 6 CDOSYS is not supported. That is one reason why version 7 came out. If you want to rewrite the code to work with CDOSYS in version 6 that is something you need to sort out on your own as I do not support custimization to the code.

    ,


    Timecard Entry: 3/25/2006 4:56:15 PM

    Review PO report for missing numbers, work with guy on domain problem and his mail problem, meet with Martha a owner of the herkimer/mohawk co-op., mail web billings, travel to watertown for meeting yachting opertaion services, WHITES LUMBER SCANNED, MODIFIED IMAGES, INSERTED INTO WEB PAGE, Communicating Arts: contact Bill Martin re: development status, meeting that I couldn't attend. Had to work over a bit because of a long call... (it wasn't Politius, I had him earlier...uhg...heh), CVX School, Making some changes to SOFTMLS CMA fixed a bunch of bugs and made a ton of improvements.. also added the changes to all the running SOFTMLS systems, Roy from the Flour Shop called complaining about his store software abd how the manufacturer search was showing categories twice. I explained to him why it was doing that and he didnt like my solution so I decided to change the code so that he could do what he was trying to do and then I wouldnt have to hear about it anymore. Below is an excerp from an email I sent him. Roy.. I added some code so that when the manufacturer screen shows the subcategories. It also in small text shows the Category for that subcategory next to it. That way they will be distinguised automatically. I spent an hour trying to figure this out and If you dont want that feature I will get rid of it. I was just trying to help. If you like it that way you should be able to have the same subcategory associated with the same category because they won't show up as duplicated, but as slighty differnt because it will say what category it is part of now also. So if you put it like you had before you called me It should work ok. Its still going to show each subcategory twice because they are part of different categories but at least it will show the category next to it. Its up to you.. I know you've been trying to get this figured out and I am just trying to help., WWNYTV - screwing around with Javascripts and PS 5.5, Answered the one online issue, Subscribed all Chautauqua members to the newsletter. (Then went home -- not feeling well.), busy, but squeezed in some Rad's and callbacks, Email/Voice Mail/Newsgroups, Finishing up the day, showed Randy how the iPhone worked, talked to Paul about Vermont., pretty busy night sometimes heavy but only in spurts, wireless site survey- Prenatal paternal Council, Coordinated training schedule for WSTAR Board, (Using a marble) I'll bring it in and give to Andrea... I was here all day but didnt do anything because I didnt feel good and couldnt think, Kept close watch on emonitor as it was going yellow all night long. Did a little more cleaning and did some reading networking., TICC A/R - henderson copies, Reply to Voice Mail from McGrann paper, talk w/ Jim Gilbert on Watertown Daily Times support issue. Talk w/ Jeff on Knowltons, performace work /mrtg/tch/pm/ routing issues, Worked w/ Ivan on Updates of three previous orders. Then called two of the customers to inform them of their new tentative installation dates., Contact Paul Haggett at Massena Chamber and prepare information to mail to him, worked on Hacketts Online site, Checked the expireds. Most of them were done but there were some that went unnoticed. , e-mail,

       Active Server Pages Rule The World
    Contact Us  
    All artwork, design & content contained in this site are Copyright © 1998 - 2025 PowerASP.com and Christopher J. Williams
    Banner ads ,other site logos, etc are copyright of their respective companies.
    STATS Unless otherwise noted - All Rights Reserved.

    vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com