kentico

Post Redirect to URL with post data

梦想与她 提交于 2019-12-06 11:15:10
I am working on a post redirect for a payment provider and trying to pass form data to their secure URL. I am doing this in kentico 8 by using their custom payment gateway method as shown here https://docs.kentico.com/display/K8/Creating+a+custom+payment+gateway So in the custom payment class I prepared the data to be passed to the payment provider in a 'Form' format with hidden fields using this tutorial http://www.codeproject.com/Articles/37539/Redirect-and-POST-in-ASP-NET However I am not able to figure out on how to redirect to the secure URL with the form data? Here is my code so far. I

programmatically adding files to the Kentico Media Library

杀马特。学长 韩版系。学妹 提交于 2019-12-06 09:20:17
问题 Using CMSDesk and click on the Tools tab, then Media Library I can add files to the inbuilt Kentico Media Library. Is there a way to do this using their API? 回答1: You can do this using the Kentico API. It is actually quite rich but the documentation and samples out there are a bit lacking. Following is a sample method (actually used as a web service method as we have both remote and local pages that use it) and a sample method that calls it (say from an 'edit' web page). fileLogo - >

How to prevent ASP.NET and Kentico from processing static files

孤人 提交于 2019-12-05 14:01:45
I have a Kentico CMS website that is processing static resources, such as png files. I would like these files to not be processed by ASP.NET. How do I do this? I am running IIS 7.5 and ASP.NET 3.5 with Kentico CMS (Web Forms). App Pool is integrated mode I looked at the <location> element in the web config file but it seemed implementing it didn't make a difference. Update: the images are contained within a folder named /res, a child of the webroot folder. i.e. not managed by kentico, the media library etc. Added via Visual Studio. edit: The underlying problem is my homepage has numerous

Kentico UserInfoProvider not working as expected in a console app

早过忘川 提交于 2019-12-02 21:42:26
问题 This code works fine within a Kentico website: var users = UserInfoProvider.GetUsers(); for (int x = 0; x < users.Count(); x++ { UserInfo currentUser = users.ElementAt(x); currentUser.SetValue("AcceptsAlerts", equivalentSubscriber.Status != SubscriberStatus.Unsubscribed); UserInfoProvider.SetUserInfo(currentUser); } When I move the code to a console app, any calls to UserInfoProvider result in the error: "Object type 'cms.usersettings' not found" For the initial call to get the users, I can

Using Kentico 7 API via Console App

蹲街弑〆低调 提交于 2019-12-02 17:07:39
问题 I have the following, using Kentico API 7 via a console application: String connectionString = CMS.DataEngine.ConnectionHelper.GetConnectionString("MyConnString"); Console.WriteLine("connectionString ? " + connectionString); //CMS.DataEngine.GeneralConnection CMS.DataEngine.GeneralConnection conn = CMS.DataEngine.ConnectionHelper.GetConnection(connectionString); conn.Open(); Console.WriteLine("connection is open? " + conn.IsOpen()); CMS.CMSHelper.CMSContext.Init(); Console.WriteLine(

Kentico UserInfoProvider not working as expected in a console app

亡梦爱人 提交于 2019-12-02 09:05:12
This code works fine within a Kentico website: var users = UserInfoProvider.GetUsers(); for (int x = 0; x < users.Count(); x++ { UserInfo currentUser = users.ElementAt(x); currentUser.SetValue("AcceptsAlerts", equivalentSubscriber.Status != SubscriberStatus.Unsubscribed); UserInfoProvider.SetUserInfo(currentUser); } When I move the code to a console app, any calls to UserInfoProvider result in the error: "Object type 'cms.usersettings' not found" For the initial call to get the users, I can do it like this in the console app: DataSet usersds = new CMS.DataEngine.DataQuery("cms.user.selectall")

How to change schema of all tables, views and stored procedures in MSSQL

↘锁芯ラ 提交于 2019-11-29 20:28:12
Recently we were having issues on our database server and after long efforts it was decided to change the database server. So we managed to restore the database on another server, change the connection string, etc. Everything was going as planned until we tried to access the website from a web browser. We started getting errors about database objects not being found. Later we found out that it occured as a result of the modified schema name. Since there are hundreds of database objects (tables, views and stored procedures) in a Kentico database, it is not feasible to change all of them

How to get at the current users windows identity

狂风中的少年 提交于 2019-11-28 12:08:37
The site is running on my local IIS 6.1. I Would like to add some features to pull information from our AD. My AD code works on many other projects and on my dev server. Here are my attempts at writing out the username: Response.Write("1. " + this.Request.LogonUserIdentity.Name); Response.Write("2. " + Request.ServerVariables["Auth_User"]); Response.Write("3. " + WindowsIdentity.GetCurrent().Name.ToString()); The results I get are: NT AUTHORITY\IUSR administrator NT AUTHORITY\NETWORK SERVICE How can I get at the actual windows username like ourdomain/username Thanks This snippet shows how

How to change schema of all tables, views and stored procedures in MSSQL

混江龙づ霸主 提交于 2019-11-27 10:01:19
问题 Recently we were having issues on our database server and after long efforts it was decided to change the database server. So we managed to restore the database on another server, change the connection string, etc. Everything was going as planned until we tried to access the website from a web browser. We started getting errors about database objects not being found. Later we found out that it occured as a result of the modified schema name. Since there are hundreds of database objects

How to get at the current users windows identity

时光怂恿深爱的人放手 提交于 2019-11-27 06:47:44
问题 The site is running on my local IIS 6.1. I Would like to add some features to pull information from our AD. My AD code works on many other projects and on my dev server. Here are my attempts at writing out the username: Response.Write("1. " + this.Request.LogonUserIdentity.Name); Response.Write("2. " + Request.ServerVariables["Auth_User"]); Response.Write("3. " + WindowsIdentity.GetCurrent().Name.ToString()); The results I get are: NT AUTHORITY\IUSR administrator NT AUTHORITY\NETWORK SERVICE