Category "c++sharp"

HttpContext.User NullReferenceException only on deployed server

I am using formsauthentication on my MVC project and when testing locally using the Visual Studio Development Server everything works as expected. Once deployed

BoDi.ObjectContainerException : Interface cannot be resolved in Specflow test

I have this step in a Specflow test: [Then(@"the enriched messages are written to the LC")] public void ThenTheEnrichedMessagesAreWrittenToTheLC() { var LcA

How to handle security pop-up in outlook using C#

While Automating Outlook using Microsoft.Office.Interop.Outlook a security pop-u is getting displayed saying "A program is trying to access a email folders....

Outlook item change events in C# misfired

I'm developing an Outlook add-in, that communicates with a server via PHP. I'm synchronizing data between Outlook items and server data. Whenever the user mak

scaffold-DbContext , command results in exception: System.Reflection.TargetInvocationException

When attempted to run a scaffold command I am now receieving the exception noted below. It may be important to note that this stopped working all of a sudden. C

C# custom mail server: receive email through socket on local machine

I'm writing unit testing for email validation. I'm trying to write a very simple POP3 email listener (using sockets) so the email can be sent to my local machin

What is EntryID in Outlook?

I'm working on a Outlook VSTO Addin that will plug-into the iManage FileSite AddIn, I'm currently trying to access the currently selected folders ID (Within the

Add Gradient background to layouts in Xamarin Forms visual studio

I am a newbie in Xamarin Forms, I create a ContentPage for Menu. I need linear gradient color at its background. But I can't find any link which tell me how to

Unity - Determining UVs for a circular plane mesh generated by code

I'm trying to generate a circular mesh made up of triangles with a common center at the center of the circle. The mesh is generated properly, but the UVs are

Swagger c# ProduceResponseType for Wrapped AutoWrapper Response

As all of our responses are wrapped in AutoWrapper, what is the best way to tell swagger that they are wrapped by AutoWrapper ? Instead of adding this on every

Handling IDisposable object without the using statement

I'm sure this is an easy question, but what am I supposed to do when handling an IDisposable object without the using statement?

Scripting define symbol code is not skipping the code in unity C#

I want to skip a particular code by defining scripting define symbol but sadly it is not working. #if VST using AW.VegetationStudio; #endif Like in the above

Is Folder.PropertyAccessor safe to call from managed code?

We recently finished development of a VSTO Outlook add-in. For some configuration data, it uses custom olText properties on a Folder. When our add-in detects t

Ef Core filtering included query using uow and repository

I started creating a role-based security system in my WinForm application so I began with Form navigation (Permission Navigation) and this is my entity's public

Problem with InsertCommand in SqlDataSource. ERROR: System.Data.SqlClient.SqlException: 'You must declare the scalar variable'@EXPEDIENTE'.'

I am a newbie and I have recently started working developing a web application, I do not have much experience so if you are able to solve the problem and explai

String.join array from last element

I have a scenario where I am getting a comma separated string LastName, FirstName. I have to convert it into FirstName LastName. My code is below: Public stat

Folder Level StorageItem location

Iam look for the folder where my StorageItem is located. This documentation says: A StorageItem object is stored at the folder level, allowing it to roam

Set value in a datagridview cell programmatically

I'm new in C# and I have a problem with setting the value of a cell programmatically. I've created a column and added it to the DataGridView: DataGridViewTe

How to bind elements in separate xaml files?

I have a MainWindow.xmal which has two TabItems: <TabItem Header="Config" ... /> <TabItem Header="Results" ... /> I have a separated Config.xaml

Code generation for struct property of user control

I create a user control like below: public partial class TestControl : UserControl { [DesignerSerializationVisibility(DesignerSerializationVisibility.Conte