Click here to Skip to main content
14,774,302 members
Home » Discussions » C#
   

C#

 
QuestionProcess Start, building Url with & Pin
jkirkerx15-Sep-20 15:00
professionaljkirkerx15-Sep-20 15:00 
AnswerRe: Process Start, building Url with & Pin
Dave Kreskowiak15-Sep-20 16:05
mveDave Kreskowiak15-Sep-20 16:05 
AnswerRe: Process Start, building Url with & Pin
Richard Deeming15-Sep-20 22:48
mveRichard Deeming15-Sep-20 22:48 
GeneralRe: Process Start, building Url with & Pin
jkirkerx16-Sep-20 6:39
professionaljkirkerx16-Sep-20 6:39 
QuestionASP.NET runtime error Pin
Member 1492460715-Sep-20 10:54
MemberMember 1492460715-Sep-20 10:54 
AnswerRe: ASP.NET runtime error Pin
Afzaal Ahmad Zeeshan15-Sep-20 12:28
mveAfzaal Ahmad Zeeshan15-Sep-20 12:28 
GeneralRe: ASP.NET runtime error Pin
Member 1492460715-Sep-20 13:13
MemberMember 1492460715-Sep-20 13:13 
QuestionSystem.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
KaushalDave14-Sep-20 20:56
MemberKaushalDave14-Sep-20 20:56 
Getting This Error...

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Tweetinvi.Logic
  StackTrace:
   at Tweetinvi.Logic.JsonConverters.JsonLanguageConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Tweetinvi.Logic.JsonConverters.JsonPropertyConverterRepository.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at Tweetinvi.Logic.JsonConverters.JsonInterfaceToObjectConverter`2.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonConverter[] converters)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters)
   at Tweetinvi.Logic.Wrapper.JsonConvertWrapper.DeserializeObject[T](String json, JsonConverter[] converters)
   at Tweetinvi.Logic.JsonConverters.JsonObjectConverter.DeserializeObject[T](String json, JsonConverter[] converters)
   at Tweetinvi.Credentials.TwitterAccessor.ExecuteGETQuery[T](String query, JsonConverter[] converters)
   at Tweetinvi.Factories.User.UserFactoryQueryExecutor.GetAuthenticatedUser(IGetAuthenticatedUserParameters parameters)
   at Tweetinvi.Factories.User.UserFactory.GetAuthenticatedUser(ITwitterCredentials credentials, IGetAuthenticatedUserParameters parameters)
   at Tweetinvi.User.GetAuthenticatedUser(ITwitterCredentials credentials, IGetAuthenticatedUserParameters parameters)
   at WindowsFormsApp1.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\kaushal dave\source\repos\ConsoleApp2\WindowsFormsApp1\Form1.cs:line 27

  This exception was originally thrown at this call stack:
    [External Code]
    WindowsFormsApp1.Form1.Form1_Load(object, System.EventArgs) in Form1.cs




My Code Is...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tweetinvi;

namespace WindowsFormsApp1
{
    public partial class Form1: Form
    {
        public Form1()
        {
            InitializeComponent();
            Auth.SetUserCredentials("gMy1b6ibNDXWxxxxxxxxxxxxxxx",
                "SegnDBtorp2FzHG2zEaF22Z9zxxxxxxxxxxxxxxxxxxxxxxxx",
                "8808475446533160xxxxxxxxxxxxxxxxxxxxxxxxxx",
                "RgFrgQJOMnJxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            var user = User.GetAuthenticatedUser();
            pbProfileImage.ImageLocation = user.ProfileBackgroundImageUrl;
            lblProfileName.Text = user.Name;
            lblProfileHendler.Text = user.ScreenName;
        }
    }
}


modified 15-Sep-20 2:17am.

AnswerRe: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
OriginalGriff14-Sep-20 21:16
mveOriginalGriff14-Sep-20 21:16 
AnswerRe: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
Richard Deeming14-Sep-20 22:38
mveRichard Deeming14-Sep-20 22:38 
GeneralRe: System.NullReferenceException: 'Object reference not set to an instance of an object.' Pin
KaushalDave14-Sep-20 23:49
MemberKaushalDave14-Sep-20 23:49 
Questionhow to connect instagram api Pin
many esmaeili13-Sep-20 23:47
Membermany esmaeili13-Sep-20 23:47 
AnswerRe: how to connect instagram api Pin
OriginalGriff13-Sep-20 23:54
mveOriginalGriff13-Sep-20 23:54 
GeneralRe: how to connect instagram api Pin
many esmaeili15-Sep-20 2:40
Membermany esmaeili15-Sep-20 2:40 
GeneralRe: how to connect instagram api Pin
OriginalGriff15-Sep-20 3:18
mveOriginalGriff15-Sep-20 3:18 
GeneralRe: how to connect instagram api Pin
Richard MacCutchan15-Sep-20 4:12
mveRichard MacCutchan15-Sep-20 4:12 
GeneralRe: how to connect instagram api Pin
OriginalGriff15-Sep-20 4:44
mveOriginalGriff15-Sep-20 4:44 
GeneralRe: how to connect instagram api Pin
Gerry Schmitz15-Sep-20 5:20
mveGerry Schmitz15-Sep-20 5:20 
AnswerRe: how to connect instagram api Pin
Richard MacCutchan14-Sep-20 0:09
mveRichard MacCutchan14-Sep-20 0:09 
Questionc# stupid severe issue loop ! Pin
Isawyouoo13-Sep-20 4:25
MemberIsawyouoo13-Sep-20 4:25 
AnswerRe: c# stupid severe issue loop ! Pin
Richard MacCutchan13-Sep-20 5:06
mveRichard MacCutchan13-Sep-20 5:06 
AnswerRe: c# stupid severe issue loop ! Pin
OriginalGriff13-Sep-20 5:06
mveOriginalGriff13-Sep-20 5:06 
AnswerRe: c# stupid severe issue loop ! Pin
harold aptroot13-Sep-20 5:29
Memberharold aptroot13-Sep-20 5:29 
GeneralRe: c# stupid severe issue loop ! Pin
Isawyouoo13-Sep-20 5:55
MemberIsawyouoo13-Sep-20 5:55 
AnswerRe: c# stupid severe issue loop ! Pin
OriginalGriff13-Sep-20 6:18
mveOriginalGriff13-Sep-20 6:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.