How do I find the PublicKeyToken for a particular dll?

I need to recreate a provider in my web.config file that looks something like this: <membership defaultProvider=”AspNetSqlMemProvider”> <providers> <clear/> <add connectionStringName=”TRAQDBConnectionString” applicationName=”TRAQ” minRequiredPasswordLength=”7″ minRequiredNonalphanumericCharacters=”0″ name=”AspNetSqlMemProvider” type=”System.Web.Security.SqlMembershipProvider, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A” /> </providers> </membership> However, I get a runtime error saying this assembly cannot be loaded, and I think it is because I have the wrong PublicKeyToken. … Read more

Could not load file or assembly ‘Newtonsoft.Json’ or one of its dependencies. Manifest definition does not match the assembly reference

Things I’ve tried after searching: in Web.Config put a binding on the old version: <dependentAssembly> <assemblyIdentity name=”Newtonsoft.Json” publicKeyToken=”30ad4fe6b2a6aeed” culture=”neutral” /> <bindingRedirect oldVersion=”0.0.0.0-6.0.0.0″ newVersion=”6.0.1.0″ /> </dependentAssembly> Edit my .csproj file to make sure there is only one Newtonsoft reference <Reference Include=”Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL”> <HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <SpecificVersion>False</SpecificVersion> <Private>True</Private> </Reference> Search my computer for every Newtonsoft.Json.dll and … Read more

Practical uses for the “internal” keyword in C#

Could you please explain what the practical usage is for the internal keyword in C#? I know that the internal modifier limits access to the current assembly, but when and in which circumstance should I use it? 22 Answers 22 Utility or helper classes/methods that you would like to access from many other classes within … Read more