Solved

Schedule ASPX to run

Posted on 2004-10-18
10
855 Views
Last Modified: 2007-12-19
I need to run an ASPX page on a daily basis.  I tried to use the windows scheduler but instead of running the page via IIS, it tries to open it in Visual Studio.  Is there a way arround this or does anyone have another suggestion.

Thanks
0
Comment
Question by:dbashley1
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 3

Expert Comment

by:yellowjetski
ID: 12339001
When you run it, do not run it from the C:\Inetpub\wwwroot\TESTING\Testing.aspx path

run it from http://localhost/TESTING/Testing.aspx path

Let me know if this helps

-Jim
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 12339030
Automated processes through aspx aren't recommended. Instead you'd be better of writing a small console application which you run through as, or create a (web)service. if it is a webservice you might want to add the following header to the method
<SoapDocumentMethod(OneWay:=true), WebMethod(Description:="DESCRIPTION")>

Regards,
CJ.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 12339038
...which you run through as
=
which you run through AT.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 5

Expert Comment

by:kollu
ID: 12339092
I never scheduled program through aspx.But,it is better write program in VB and scheduled the program.
0
 
LVL 9

Assisted Solution

by:hismightiness
hismightiness earned 400 total points
ID: 12339100
You can do this throught Windows Scheduler.  Just map the scheduled file to be executed as your default browser and add the URL to the end of it:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.excite.com/
0
 
LVL 9

Expert Comment

by:hismightiness
ID: 12339105
I just ran a couple tests, and it worked perfectly.
0
 
LVL 3

Accepted Solution

by:
yellowjetski earned 100 total points
ID: 12339138
To be more percise on "run it from http://localhost/TESTING/Testing.aspx path"

"C:\Program Files\Internet Explorer\iexplore.exe" http://localhost/TESTING/Testing.aspx

0
 

Author Comment

by:dbashley1
ID: 12339203
CJ,

Why is it not recommended to schedule an aspx?  The reason I want to schedule the aspx is that I have a significant number of class objects build in my ASP.Net Application that I need to be able to access.   Writing a Web Service for all of them would be quite a bit of work.

Daniel
0
 
LVL 33

Expert Comment

by:raterus
ID: 12339719
You can't schedule an aspx to execute, rather you must make a request of the page with another program.  Usually this is a browser, but if you want to schedule the aspx page please look into this utility program "wget" which you can download here, http://www.gnu.org/software/wget/wget.html, windows binaries are available if you need them here ftp://sunsite.dk/projects/wget/windows/.  

You should be able to create a scheduled task using this program in order to schedule your aspx, you can also save the html "results" of the requested page to a file, for archive reasons if need be.

Hope this helps!
--Michael
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 12340451
dbashley1,

Loading a webpage (html, asp, php, aspx) has some limitations and issues. Most of them due to the nature of IIS. For example a timeout can occur while loading the page.
While I am thinking about it, I guess that most problems that can occur can easily be fixed with good IIS settings (especially in IIS 6).

Still I would go for a small scheduled console application. It runs in it's own context and is inaccessible for IIS processes. With well written class objects / services you should be able to quickly change your ASPX page to a console application, and take advantage of a lot of other namespaces.

Glad your question was solved though.

CJ.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question