2022 Developer Survey is open! Take survey.

Questions tagged [c#]

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Filter by
Sorted by
Tagged with
4 votes
1 answer
33 views

What is the recommended best practice for C# Workflow using External Activity for Logging and Configuration?

I have a c# workflow using an external activity assembly uploaded into a TBB. Currently I have a logging class to write to a hard coded file path in the DEBUG build. The RWS example documentation does ...
user avatar
  • 2,221
4 votes
1 answer
91 views

Restrict publishing of Linked component within Parent Component using C# Template

Restrict publishing of Linked component withinn Parent Component using C# Template We have a dynamic component template and I want to restrict the Publishing of Linked-Component which is within Parent ...
user avatar
3 votes
1 answer
88 views

How to retrieve GUID from files for Tridion docs SP2 via WCF?

I've been able to get my personal user information via C# -- WCF via https://docs.sdl.com/801922/351949/sdl-tridion-docs-13-sp2/using--svc-web-service-in-c--for-------------ishsts. However, there is ...
user avatar
  • 31
1 vote
1 answer
99 views

C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component

I have an embedded schema for a STUB component metadata field which has 4 fields and marked as "Allow Multiple Values", along-with other fields in SDL Tridion. I am using SDL Tridion Web 9.0....
user avatar
  • 41
1 vote
0 answers
27 views

How to throw exception and abort to publish an item in event handler

I want to stop publishing a structure groups for certain user groups. I'm able to catch the structure group and filter per the desired groups, but when I throw the exception, nothing happens and the ...
user avatar
1 vote
4 answers
67 views

Event Handler get the user who throws the event

I need to avoid certain group to publish a structure group but I don't know how to get that user to check if belongs to a certaing group. This is the code I have: public ...
user avatar
0 votes
1 answer
40 views

how to get a string by using substring? [closed]

my following string <Content xmlns="http://www.kkk.com/HTMLMeta"> <title>Aftersales Marketing Solutions | kkk markit</title> <metaDescription>Helps manage key ...
user avatar
  • 448
0 votes
2 answers
124 views

Get MIME Type of Multimedia Types based on file extension using TOM.NET (.NET Templating)

Recently I recevied client business requirement to get MIME Type of Multimedia Types item based on extension (External Url) from Tridion using C# Templating. Read all Multimedia Types from ...
user avatar
  • 1,771
2 votes
1 answer
164 views

Connect to ECL via .NET giving permission issue

Trying to connect to Tridion via ECL WCF api but getting permission issue. Here is my code: EndpointAddress eclServiceEndpoint = new EndpointAddress("net.tcp://localhoast:2660/...
user avatar
  • 41
0 votes
1 answer
46 views

Does DXA support extended RichText Models? Is this by design?

I already reported/asked about a similar issue with extended Keyword Models here: Does DXA support Extended Keyword Models? The same problem occurs if we try to extend from Sdl.Web.Common.Models....
user avatar
2 votes
1 answer
92 views

Does DXA support Extended Keyword Models?

I am using dxa 2.2 (.net) and I created a custom Keyword Model BaseKeywordModel that extends KeywordModel. When DXA tries to map a published component that has a keyword field to a model that uses the ...
user avatar
3 votes
3 answers
629 views

"OutputStream is not available when a custom TextWriter is used" error when returning FileStreamResult through a view with @Html.DxaEntities()

I have a controller action which should return a FileStreamResult. This action is triggered by a button click on a "Downloads" page. public class SoftwareUpdatesDownloadController : BaseController ...
user avatar
  • 153
1 vote
1 answer
56 views

How to make a publishing object fail when some custom validation criteria is not met using SDL Tridion publish plugin

I want to make the publishing status as failed when a custom validation is not passed in SDL publish plugin. Anybody know which is the API method I need to use to make the publishing object failed or ...
user avatar
0 votes
1 answer
54 views

Is there any standard solution for Blueprint structure to be fetched, for all publications in a CMS?

For our Web 8.5 implementation, we have a requirement to fetch the complete Blueprint structure using C# TBB's. We do have an implementation that uses Metadata Schemas to fetch the Publication details ...
user avatar
  • 81
7 votes
1 answer
102 views

How to Properly Dispose TopologyManagerClient?

We are using the Tridion.TopologyManager.Client assembly in our custom C# application to interact with the Topology Manager items. When I look at the assembly (version 8.5.0.466), I don't see any ...
user avatar
2 votes
3 answers
82 views

DXA 1.7 .NET How to get Target Groups in PageModel

I am trying to use Target Groups in my site. I've just created one, published it and added it in one of the components of the page: The problem is that in the DXA I cannot see anywhere the ...
user avatar
  • 123
1 vote
2 answers
106 views

DXA Issue mapping ComponentLink fields to Model c#

I have created a component and added it in a page and mapped all in my DXA. The problem I'm having is that when I call ContentProvider.GetPageModel(pageUrl, WebRequestContext.Localization, true) to ...
user avatar
  • 123
2 votes
2 answers
80 views

Which is better performance wise : Razor TBB or C# TBB?

I have around 50 lines of code in multiple page templates. I am not able move it to a component template as I need component and template ID from page and render some text from the components in ...
user avatar
2 votes
1 answer
39 views

not able to read text field value provided as default value in a parameter Schema in C# TBB

I created one Parameter Schema and added one text field testText, and assigned 9 as the default value for that field in schema. I have assigned this parameter schema to my TBB in CMS. Now i am trying ...
user avatar
4 votes
0 answers
43 views

Postback is not working when it is into a dynamic Component Presentation

we are migrating from Tridion 2011 to SDL web 8.5 and we found that a simple LinkButton is not causing the postback (we are using C#). A note here is, we have other pages with postback working, but ...
user avatar
  • 467
1 vote
1 answer
116 views

How can I get a Localization object to query a different Publication

I'm new to DXA and faced an unknown while fetching DCP (or to say EntityModel) from other Publication. I've a pre populated Localization object which points to current Publication/site context. How ...
user avatar
4 votes
2 answers
170 views

CoreService filter with SchemaPurpose and Recursive not working

I'm using Core Service API to find all component schemas within a folder recursively. This is the code. OrganizationalItemItemsFilterData filter = new OrganizationalItemItemsFilterData(); filter....
user avatar
4 votes
2 answers
198 views

Read TCM IDs of multi-value embedded field using .NET Core Service script

I am trying to read the TCM ID from a multi value embedded field using Core Service. I would prefer to avoid using XML and string manipulation as much as possible and thought this was doable using the ...
user avatar
  • 315
0 votes
2 answers
76 views

sometimes _client.IsExistingObject(id) returns false for . and /

_client.IsExistingObject(webdav URL of folder) returns false when i try to search folder with name "." and "/" which already exists in the folder where i am searching
user avatar
2 votes
3 answers
90 views

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

Working as a regular C# developer, I was experimenting around the "Sealed" functionality of C#. So, while using Sealed, Child class CANNOT override Parent class Method. So, in Tridion, Is it ...
user avatar
  • 95
4 votes
1 answer
46 views

Tridion.Logging missing one of its dependencies

I am having issues finding the proper dll reference for Tridion.Logging. Currently I am referncing/using: using System; using System.Text; using System.Text.RegularExpressions; using System....
user avatar
2 votes
0 answers
88 views

Using Ajax to submit a form and returning a confirmation page

I am trying to submit a form through an ajax process : @using (Ajax.BeginForm("SendEmail", "Form", new AjaxOptions { UpdateTargetId = "replace", InsertionMode = ...
user avatar
  • 21
3 votes
1 answer
252 views

c# Tridion 2011 How to get metadata selected keyword from a component

In Tridion 2011 I have a componen in which in the metadata fields has a keyword with different values. How should I get the selected value in c#. I tried the next but I get the name of the key not the ...
user avatar
4 votes
1 answer
147 views

Schema with a component link with the same schema mapping problem

I am a young tridion developer with not much experience. I am using Tridion 2013sp1 and creating a new MVC web application in C#. I would like to create a menu in which each element could be a '...
user avatar
2 votes
2 answers
180 views

User creation using core service on Tridion 2013

I am trying to automate few daily tasks for some of Tridion admins. We have 800+ publications 600+ users and more than 1000 groups. So, I am trying to automate user creation. Recently we have migrated ...
user avatar
-1 votes
2 answers
474 views

How to debug SDL tridion code?

I am new to Tridion back end coding. I have used the logger for the debug. But I didn't get much information from there. Can anyone please let me know the most common way to debug the code? I am ...
user avatar
  • 135
4 votes
2 answers
222 views

How to assign the value of a component link field to an XML element?

if (currentComponent.Schema.Title == "dtd_link_item") { var linkComponentFields = currentComponent.Fields(); var element = new XElement("SiteMapNode"); element....
user avatar
1 vote
1 answer
232 views

Get the latest version info of all the items in tridion using core service

Using core service want to get only ther latest version of all the items in tridion. I have tried in this way:- if (itemType.Equals("Folder")) { type = ...
user avatar
  • 31
0 votes
2 answers
165 views

Is there way to call Dreamweaver Mediator from C# TBB in Tridion?

I have Dreamweaver code in one text block as string. What i need is will it be possible to call Dreamweaver mediator from C# TBB and pass the string in text block in Tridion
user avatar
1 vote
2 answers
184 views

Structure groups hierarchy to be used for parent child relationship

I have a scenario where I have components with parent-child relationship. For instance, a news can have multiple child news component. The pages for each news will be created under its parent news. ...
user avatar
2 votes
1 answer
112 views

Registering Jscript on a Tridion-generated page

I'm attempting to register some javascript on a Tridion-Generated page via a user control. I've created a page object that uses a generic aspx page template. The TBB for the page template contains ...
user avatar
  • 317
1 vote
1 answer
169 views

Tridion Interacting with the Application Monitoring Web service

I need to make some windows service that will monitor Tridion health meaning that it will use Tridion Monitoring service. Inside of documentation on SDL live content there is one section explained: ...
user avatar
  • 31
1 vote
3 answers
238 views

Want to migrate content and page from Tridion to IBM WCM

Want to migrate content and Pages from the Tridion to the WCM. Here need is the content and page source from the CMS. Want to read the Source and store it on the local machine How to proceed with ...
user avatar
  • 11
-3 votes
1 answer
80 views

What is the best approach to read the "Component Source" from the CMS

Want to read the Component Source form the Tridion CMS and want to store each component source on the CMS server or local machine How should proceed with it still don't have clear idea which version ...
user avatar
  • 1
2 votes
3 answers
270 views

CoreService: Upload image to Tridion fails sometimes. Unable to open uploaded file

I am trying to upload an image to Tridion using CoreService. Upload is done using streamClient.UploadBinaryContent. After upload I want to create an MultiMedia component from it. The code works fine ...
user avatar
  • 21
3 votes
3 answers
412 views

What's the benefit to use VS2012 instead of VS2010 when using Tridion 2013

I know VS2012 is able to use .NET framework 4.5. VS2010 can handle till .NET 4.0. I've seen the changelog between the frameworks, but is there any advantage according the use of Tridion 2013 when ...
user avatar
  • 598
2 votes
1 answer
175 views

How to get the list of all component templates from the publications

I want to get the list of all the component templates in .net assembly and push those component templates to the DWT. Got the publication webDav url but how to get the list of all component templates ...
user avatar
  • 45
0 votes
2 answers
415 views

How to get the component template web dav url from CME in C#

How to get the component template web dav url from tridion using C#. After fetching that CT url passing to the folder object. Right now i'm using the hard-coded path, but in the future it may won't ...
user avatar
  • 45
0 votes
2 answers
245 views

How to return the component template id based on the name of the component template

I want to make it generic method if we want to read the component template id based on the component template name for any publication or folders it should work. Need to be done using C# and want to ...
user avatar
  • 45
1 vote
1 answer
488 views

How to read the component the parameter schema field

Created Schema A which has field called keys which is embeeded schema type. The embeeded schema consists of two fields called name and value. Created Component A using schema A. created parameter ...
user avatar
  • 11
0 votes
0 answers
104 views

How to read the component path field using parameter schema in c#

I want to read the component path using parameter schema and want to assign that parameter schema to the tbb.
user avatar
  • 9
0 votes
0 answers
116 views

How to read the values from the parameter, embeeded schem in C#

I have created component using schema A it consists of embeedded schema type. The embedded schema has two fields the keyname and keyvalue. Created parameter schema which contain the field called ...
user avatar
  • 41
1 vote
1 answer
761 views

How to access the parameter schema fields from C# TBB

I have schema A that has the field called Keys which is embedded schema type. The embedded schema consists of 2 fields that is the keyname and keyvalue. I have created component using schema A. After ...
user avatar
  • 41
5 votes
3 answers
372 views

Tridion Mock Objects

I like to know if there is a generic mock object or community project that will provide me the ability to unit test my TOM API C# code following a test driven development approach. I'm looking for ...
user avatar
3 votes
1 answer
424 views

how to check published path of binaries?

I am writing a C# TBB for CT. i need to check all images in a folder and publish them. Do we have any method to check published path of a particular binary. I don't want to republish the binaries ...
user avatar