I am wondering if I can insert some data into a Dotnetnuke DB from a Azure worker process. What i need to do is create a user in DNN, so would be inserting into 2 tables on DNN.
So, How do I connect?
Is it possible?
Any sample code?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So… a worker process runs in a Windows Server virtual machine. You would just need to connect to the database and call the appropriate stored procedure (or execute the appropriate T-SQL) just like you would in any other app. You’ll just need a connection string with proper credentials.
Keep in mind: All instances of a Worker Role have the exact same code deployed. If you’re trying to do some type of background processing that results in a database call, just make sure that call is only done once (maybe by using Azure Queues to write a request for creating a user, then having all the worker instances read from the queue, and the one who gets the message then creates the new account).