Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a website which contains more than 10 pages.Here one page will do some kind of extraction of data and create pdf files.This should happen on daily basis at midnight.
I have written the code in pageload of one page (say job.aspx) so when i run this page this process will happen(ie creating pdf).
So i scheduled one job in my windows scheduler to run this url(So that it will create pdf) But the problem here is when the scheduler open this page by job it will ask for credentials since its a NTLM authentication in IIS.

So i don't want this page to check for authentication, (other pages should do)

Any idea ?
Posted
Updated 22-Oct-14 5:42am
v2
Comments
Am Gayathri 22-Oct-14 11:42am    
Please share your experience

All you need to do is use the location tag in Web.config to override the authentication for that one file.

There is a good article at http://weblogs.asp.net/gurusarkar/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config[^] to help explain it.
 
Share this answer
 
Comments
Am Gayathri 22-Oct-14 11:32am    
Here NTLM authentication am setting in IIS.
ZurdoDev 22-Oct-14 11:33am    
You can either make the authentication change in IIS or use web.config. Either way.
Am Gayathri 22-Oct-14 11:38am    
I tried but i got this error,
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
ZurdoDev 22-Oct-14 11:45am    
You'll have to follow what it suggests. Besides what it suggests, there are many other reasons you can get that, for example having a web.config in a subfolder.
Am Gayathri 22-Oct-14 11:47am    
How ???Please tell
Hi.,

You should not use webpage for scheduling tasks. You could write a console application and schedule using windows task scheduler.

or

Write a windows service and install it in the server.

All the above will support to create pdf, update db, etc...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900