"L'invocation du constructeur sur le type qui correspond à la spécifié de liaison de contraintes généré une exception

Donc je suis en train de construire un programme qui accède à Etsy de l'API et jusqu'à présent, tout ce que je suis en train de faire, c'est de faire un appel en utilisant OAuth et il jette cette exception.

'L'invocation du constructeur de type 'testEtsy.MainWindow " qui correspond à la spécifié de liaison de contraintes généré une exception.' Numéro de ligne '3' et la position de la ligne de '9'.

Voici mon code XAML

<Window x:Class="testEtsy.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525">
<Grid></Grid>

Et voici mon code dans la MainWindow.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace testEtsy
{
    ///<summary>
    ///Interaction logic for MainWindow.xaml
    ///</summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

        }
        string[] orderNumbers = System.IO.File.ReadAllLines(@"F:\ordernumbers.txt");

        public static void getOAuthKey()
        {

            string ConsumerKey = "q6uqzk27z2yw4tl5s4qerdtp";
            string ConsumerSecret = "tkjz2mu4x1";
            OAuth.Manager m = new OAuth.Manager();
            m["consumer_key"] = ConsumerKey;
            m["consumer_secret"] = ConsumerSecret;
            OAuth.OAuthResponse requestToken =
                m.AcquireRequestToken("https://openapi.etsy.com/v2/oauth/request_token?scope=transactions_r", "POST");
        }

    }
}

Toute aide serait grandement appréciée.

OriginalL'auteur Cistoran | 2013-03-09