Using Kentico 7 API via Console App

前端 未结 2 508
轻奢々
轻奢々 2021-01-28 11:29

I have the following, using Kentico API 7 via a console application:

String connectionString = CMS.DataEngine.ConnectionHelper.GetConnectionString(\"MyConnString         


        
2条回答
  •  误落风尘
    2021-01-28 11:57

    Unless there's a specific need to create a console application to perform your task, then I would recommend avoiding a console app and instead creating a custom scheduled task.

    You can write the code that your task needs to perform within the App_Code folder of your project - or within the CMSAppCode project if you're using a web application project type. This way you don't have to worry about having access to the database or referencing all the DLLs you'll need to utilize the Kentico API.

提交回复
热议问题