I have a requirement to process uploaded files in a DotNetNuke 5.4 site and add rows to tables in the database. I need this to run on a hosted site that supports ASP.NET V3.5
To acomplish this, I have started by creating a simple instance of a SchedulerClient in CSharp and have successfully deployed it by copying the DLL into the DotNetNuke/bin directory and then configuring the Host | Schedule to run it periodically. I followed the only information I could find on build a SchedulerClient at
http://dotnetslackers.com/Community/b... Is this the best way of building a ScheduledClient?
Now I want to add more functionality to my scheduler, to read the contents of files uploaded in the DotNetNuke site and then add rows to tables defined in the site's DB connections. I have two questions
1) How can I determine the directory to read the files from? The files are uploaded to the location relative to the root of the DotNetNuke site. As this is a hosted site, I do not know the absolute path of the directory. Is there some way of geting the root directory of a DotNetNuke instance?
2) I have configured LINQ to create access to the tables, all that remains is to get the LINQ to use the connection string defined in the web.config file of DotNetNuke. I cannot determine how to do that when the project is installed as a standalone class library. If it was a DotNetNuke visual module, I could use global::System.Configuration.ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString.
Thanks
Wayne