| Author | 
		Message | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Web Based Download | 
				     | 
			 
			
				I am trying to set up 24x7 to download a file from  a htaccess protected area of a website.  However I am experiencing problems with getting  the syntax right.  Can anyone please help.  Kind Regards,  Boulent 
   | 
			 
		  | 
	
	
		| Tue Mar 08, 2005 9:29 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Here is an example:  WebGetFile( "myname:mypassword@http://www.mycompany.com/webstats/access.log", "c:\\logs\\access@T"mm-dd-yyyy".log" )  : I am trying to set up 24x7 to download a file from  : a htaccess protected area of a website.  : However I am experiencing problems with getting  : the syntax right.  : Can anyone please help.  : Kind Regards,  : Boulent   
   | 
			 
		  | 
	
	
		| Tue Mar 08, 2005 11:18 am | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: Here is an example: WebGetFile( "myname:mypassword@  : http://www.mycompany.com/webstats/access.log" ;,  : "c:\\logs\\access@T"mm-dd-yyyy".log" )  I have followed your syntax but instead of getting  the required data I get the following in the file I  am trying to retrieve.  Authorization Required  This server could not verify that you are authorized  to access the document requested. Either you supplied  the wrong credentials (e.g., bad password), or your  browser doesn't understand how to supply the  credentials required.  Any suggestions would be most appreciated.  Kind Regards,  Boulent 
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 7:11 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				I see ;; after the URL, it should be just a comma, don't know if these symbols are present in your script or they were inserted by the web-board engine  : I have followed your syntax but instead of getting  : the required data I get the following in the file I  : am trying to retrieve.  : Authorization Required  : This server could not verify that you are authorized  : to access the document requested. Either you supplied  : the wrong credentials (e.g., bad password), or your  : browser doesn't understand how to supply the  : credentials required.  : Any suggestions would be most appreciated.  : Kind Regards,  : Boulent   
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 11:04 am | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: I see ;; after the URL, it should be just a comma, don't know if these  : symbols are present in your script or they were inserted by the web-board  : engine  The Web Board inserts them.  Because they were present in your original syntax  example 
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:01 pm | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Is there anything else that could be causing the  job to fail.  Say for example firewall or htaccess configuration  issues.  I appreciate your help in resolving this problem.  Kind Regards,  Boulent   
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:05 pm | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				When you navigate to the page using Internet Explorer web borwser do you get the enter user/password dialog displayed on your screen?  : Is there anything else that could be causing the  : job to fail.  : Say for example firewall or htaccess configuration  : issues.  : I appreciate your help in resolving this problem.  : Kind Regards,  : Boulent   
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:07 pm | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: When you navigate to the page using Internet Explorer web borwser do you get  : the enter user/password dialog displayed on your screen?  Yes I do.  Kind Regards,  Boulent   
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:16 pm | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Ok. Do you get that dialog displayed when you enter URL in the browser's address bar in the following format?
 
 http://user:password@www.site.com/page.htm
 
 If the browser can open the page without displaying the user/password dialog then you should be able to do the same thing in 24x7 using format supported in 24x7 (make sure you use WebGetFile statement and not WebPageGetHTML).
 
 If the browser can open the page I afraid you cannot do this using web statements in 24x7. In the latest case consider using FTP or some other alternative method.
 
 
 
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:43 pm | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: Ok. Do you get that dialog displayed when you enter URL in the browser's  : address bar in the following format?  : http://user :password@www.site.com/page.htm  : If the browser can open the page without displaying the user/password dialog  : then you should be able to do the same thing in 24x7 using format  : supported in 24x7 (make sure you use WebGetFile statement and not  : WebPageGetHTML).  The browser opens the page without prompting me  for a username and password when I type the URL  using the syntax specified above.  I am using WebGetFile using the syntax you specified  but unfortunately my website isn't recognising the  authentication.  Any suggestions are kindly appreciated.  Kind Regards,  Boulent 
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 12:56 pm | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Please verify you have entered correct URL, user and password entered in the script and there are no extra spaces or other "extra" characters surrounding user or password.  By the way, which version of 24x7 are you running?  : The browser opens the page without prompting me  : for a username and password when I type the URL  : using the syntax specified above.  : I am using WebGetFile using the syntax you specified  : but unfortunately my website isn't recognising the  : authentication.  : Any suggestions are kindly appreciated.  : Kind Regards,  : Boulent   
   | 
			 
		  | 
	
	
		| Wed Mar 09, 2005 1:20 pm | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: Please verify you have entered correct URL, user and password entered in the  : script and there are no extra spaces or other "extra" characters  : surrounding user or password.  I have verified that the URL is correct.  This is the syntax I am using.  Please disregard any : characters inserted by the forum software.  WebGetFile("username:password@http://www.filehere.com/members/filetodownload.txt","c:\localfile.txt")  : By the way, which version of 24x7 are you running?  I am running an Evaluation version with the following version number 3.4.24.  Kind Regards,  Boulent   
   | 
			 
		  | 
	
	
		| Thu Mar 10, 2005 7:05 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Please try WebGetPageHTML("http://username:password@www.filehere.com/members/filetodownload.txt", "c:\\localfile.txt")  This seems to be working better with more sites the the other syntax.  : I have verified that the URL is correct.  : This is the syntax I am using.  : Please disregard any : characters inserted by the forum software.  : WebGetFile("username:password@  : http://www.filehere.com/members/filetodownload.txt"  : ;,"c:\localfile.txt")  : I am running an Evaluation version with the following version number 3.4.24.  : Kind Regards,  : Boulent   
   | 
			 
		  | 
	
	
		| Thu Mar 10, 2005 1:16 pm | 
		          | 
	
	
		  | 
	
	
		
			Boulent Mustafa 
			 
			
  
			
			
				Joined: 08 Mar 2005 Posts: 13
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				: Please try WebGetPageHTML(" http://username  : :password@www.filehere.com/members/filetodownload.txt",  : "c:\\localfile.txt")  : This seems to be working better with more sites the the other syntax.  Where as the WebGetFile wasn't completing authentication successfully.  WebGetPageHTML brings up the following error message.  An error occurred while executing automation script.  Line 1: Error connecting to Internet or Invalid URL.  Does it matter that I am running the job from  example jobs.dat.   
   | 
			 
		  | 
	
	
		| Fri Mar 11, 2005 7:26 am | 
		          | 
	
	
		  | 
	
	
		
			SysOp 
			Site Admin 
			
  
			
			
				Joined: 26 Nov 2006 Posts: 7992
  | 
			 
			  
		 | 
		
			
				  Re: Web Based Download | 
				     | 
			 
			
				Do you connect through HTTP proxy server?  : Where as the WebGetFile wasn't completing authentication successfully.  : WebGetPageHTML brings up the following error message.  : An error occurred while executing automation script.  : Line 1: Error connecting to Internet or Invalid URL.  : Does it matter that I am running the job from  : example jobs.dat.   
   | 
			 
		  | 
	
	
		| Fri Mar 11, 2005 10:57 am | 
		          | 
	
	
		  | 
	
	
		 |