Jump to content

Recommended Posts

Posted
just wanted an email to be emailed to myself so I can easily find this thread for future ref.

 

...Is there something wrong with copying the link and mailing it to yourself? or, heaven forbid, bookmarking it? :rolleyes:

Posted
Nice, I've been using pivottables/charts in Excel to get pretty output from this. Not an ASP coder myself so don't know how tricky it would be, but if you do do any more work on it, sorting by total pages instead of username would be brilliant! :o
Posted
I can't get this to work. I've put the script in the wwwroot folder, under the default website in IIS, but I keep getting a forbidden error. I've checked permissions on the folder and they appear to be the same as another site which works.
Posted
I can't get this to work. I've put the script in the wwwroot folder, under the default website in IIS, but I keep getting a forbidden error. I've checked permissions on the folder and they appear to be the same as another site which works.

 

Have you created the 'admin' folder for the output to go into?

Posted
I can't get this to work. I've put the script in the wwwroot folder, under the default website in IIS, but I keep getting a forbidden error. I've checked permissions on the folder and they appear to be the same as another site which works.

 

What error are you getting specificly, if you have your dest.csv in the wwwroot folder you will need to give whatever user is running the ASP (annonomys hosting account) will need read+write access to that folder as it creates the file at runtime. I ususlly use this on the managment page of my networks which are secured by windows integrated security meaning that the script runs under the context of an admin account that has write access.

 

You will also need execute permissions on the sites IIS properties. If you want it running for general consumption by annonomys users then I recommend pointing the SiteFolder constant to a seporate folder which has read+write access for the annonomys IIS account in order to make it run smoothly and without opening up any security holes.

 

 

@OutToLunch - I had a look at enabling this sorting but unfourtunatly the CSV database reader that I am using doesn't seem to be able to accomplish this along with the pivot. I may develop this further in future but it would require a more substantial back end and some nasty merging logic to put it all into an access DB for finer grained control of the data.

Posted

So let me get this straight.

 

In the wwwroot folder I have a folder called PrinterUsage and at present 'Everyone' has read/write access to this folder. I take it I should remove that and make it so that only the IUSR has read/write access to this folder? I then need to create a seperate folder within PrinterUsage where IUSR has read/write permissions.

 

If I wanted the script only to be usable by a particular usergroup then how would I go about that? Set the permissions for that group instead of the IUSR account?

 

Sorry if this is a daft question. Never really got my head around IIS.

Posted (edited)

Just had a look at how it's setup at the moment.

 

In wwwroot I have a folder called PrintUsage with the following permissions:

IUSR_ has read, list folder contents and read and execute

 

In PrintUsage I have a folder called Admin with the following permissions:

IUSR_ has read, list folder contents and read and execute

 

Whenever I go to \\servername\PrintUsage I get 403 Forbidden and whenever I go to \\servername\PrintUsage\PrintUsage.asp I get 500 Internal Server Error.

 

In IIS I have Read ticked and have chosen Scripts and Executables.

 

Edit: Fixed! I didn't enable Write access as you said above. Now just to work out how only certain usergroups can access this script.

Edited by Edu-IT
Posted
Now just to work out how only certain usergroups can access this script.

 

Glad to hear that you go it working. As for security you could set the directory security on the PrintUsage folder to Integrated windows auth and not annonomys. Then in the NTFS permissions for the folder and files set full access for the group that you want to have access to it and remove permissions for anyone else. This way it should use windows integrated authentication, if the user that tries to get to it is not allowed they will be prompted for a username and password.

  • Thanks 1
Posted
Glad to hear that you go it working. As for security you could set the directory security on the PrintUsage folder to Integrated windows auth and not annonomys. Then in the NTFS permissions for the folder and files set full access for the group that you want to have access to it and remove permissions for anyone else. This way it should use windows integrated authentication, if the user that tries to get to it is not allowed they will be prompted for a username and password.

Thanks. I'll give that a whirl tomorrow. Useful script.

Posted (edited)
How difficult would it be to add a totals row to show the total pages printed from each printer for the filter period?

 

Added, summaries per printer per paper type and also papertype per teacher.

 

I have updated the codeing as best as I could while still retaining the lightweicht CSV database driver. I have tweaked the layout a bit to make it look better and have also added in some error handling in case you end up without any data for the period you selected. It can now also do a report on a single day as it now takes the end time as 23:59 rather that 0:00 as it was doing before. Still have not able to add the sorting feature due to the driver but I am still looking into it.

 

The screenshot and new downloads can be found in the first post here: EDIT Or not I can't seem to edit it, Grr, will add to this post instead and hopefully a mod or admin can give me permission to change my own post some time later.

 

EDIT2: Uploaded :)

PrintLog.JPG

PrintUsage00_2.rar

Edited by SYNACK
Posted (edited)
By popular request I have created a simple installation guide to help people get it up and running. There are many other ways to set it up so that it fits into your system but this method should not require you to change any variables in the site. This document assumes that PaperCut and IIS are both installed also that PaperCut has been installed to the default location. It also assumes that you have administrator privilages on the account you will be using to view the page. Edited by SYNACK
  • Thanks 2
Posted
Hope you you don't mind synack, i have added a table that just shows user and how many they have printed in colour and how may in black and white.

 

i have attached the file just in case anybody else wants it.

 

I get

 

Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Text Driver] You tried to execute a query that does not include the specified expression 'Lcase(User)' as part of an aggregate function. 

/PrintUsage/PrintUsage.asp, line 154 

 

thrown on this one... Just going to roll back to the 'official' V2 and try that. Great work though, thanks to both of you!

Posted
Have added server to exceptions and am now getting HTTP Error 404 - File or directory not found i guess its pointing me back to how i've set it up. I've followed SYNACK's guide..:confused:
Posted

Anyone think of a creative way of grabbing the CSV from another server other than the printserver?

 

I have 2 printservers and i want to server this application from a seperate iis box i use.

 

At the moment i have to have 2 seperate .asp files pointing to two seperate folders. I am having to use a batch file to copy/update the CSVs to the webserver.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...