
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Windows 2003, .NET 3.5, IIS 6.0
|
|
|
When running the quartz scheduler within an ASP.NET process, the Xml Job plug-in code goes to read the xml file and errors out because the code to open and read the file is requesting write access to the underlying file. I don't believe there is a need to have write access to the xml job schedule file. If the code to open the FileStream is updated to only request read access to the file, it'll run in ASP.NET without issue. Here is the stack trace from the exception.
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038 System.IO.FileStream..ctor(String path, FileMode mode) +64 Quartz.Plugin.Xml.JobFile.Initialize() +562 Quartz.Plugin.Xml.JobFile..ctor(JobInitializationPlugin plugin, String fileName) +56 Quartz.Plugin.Xml.JobInitializationPlugin.Initialize(String pluginName, IScheduler sched) +273 Quartz.Impl.StdSchedulerFactory.Instantiate() +14187 Quartz.Impl.StdSchedulerFactory.GetScheduler() +217
Here is the existing code at line 439 in the JobInitializationPlguin.cs class
f = new FileStream(file.FullName, FileMode.Open);
I would propose that the code be changed to
f = new FileStream(file.FullName, FileMode.Open, FileAccess.Read);
|
|
Description
|
When running the quartz scheduler within an ASP.NET process, the Xml Job plug-in code goes to read the xml file and errors out because the code to open and read the file is requesting write access to the underlying file. I don't believe there is a need to have write access to the xml job schedule file. If the code to open the FileStream is updated to only request read access to the file, it'll run in ASP.NET without issue. Here is the stack trace from the exception.
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038 System.IO.FileStream..ctor(String path, FileMode mode) +64 Quartz.Plugin.Xml.JobFile.Initialize() +562 Quartz.Plugin.Xml.JobFile..ctor(JobInitializationPlugin plugin, String fileName) +56 Quartz.Plugin.Xml.JobInitializationPlugin.Initialize(String pluginName, IScheduler sched) +273 Quartz.Impl.StdSchedulerFactory.Instantiate() +14187 Quartz.Impl.StdSchedulerFactory.GetScheduler() +217
Here is the existing code at line 439 in the JobInitializationPlguin.cs class
f = new FileStream(file.FullName, FileMode.Open);
I would propose that the code be changed to
f = new FileStream(file.FullName, FileMode.Open, FileAccess.Read);
|
Show » |
|