Unable to GetToken from QuickBooks QBOConceptsTutorial-DotNet Sample Application - token

I am trying to learn how to work with QuickBooks API calls to integrate my own application with the platform's backend for invoicing and Customer records requests. I started with the Developer Web site from Quickbooks and landed on their GIT repository area, where I downloaded the QBOConceptsTutorial-DotNet Sample Application. Initially, the Application wowuld not start or load, failing on the HTTPS call. Therefore, I created a new similar applicaion on Visual Studio 2022 Community Edition and replicated all the necessary code to it. then my new application started properly and I was able to connect to my QuickBooks Sandbox Company with the Sandbox user id and secret credentials.
I received a callback set of variables with no errors. However, when I click on the Get Token model, the failure happened at the following new TokenClient() call. The error from the Web app is posted below. Can I get some assistance and guidance on solving this issue?
var tokenClient = new TokenClient(AppController.tokenEndpoint, AppController.clientid, AppController.clientsecret);
Line 68:{
Line 69: //Request Oauth2 tokens
Line 70: var tokenClient = new TokenClient(AppController.tokenEndpoint, AppController.clientid, AppController.clientsecret);
Line 71:
Line 72:
Source File: D:\Source\Repos\QBOAPI\QBOAPI\Controllers\CallbackController.cs Line: 70
Stack Trace:
[MissingMethodException: Method not found: 'Serilog.LoggerConfiguration Serilog.FileLoggerConfigurationExtensions.File(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider, System.Nullable`1<Int64>, Serilog.Core.LoggingLevelSwitch, Boolean, Boolean, System.Nullable`1<System.TimeSpan>, Serilog.RollingInterval, Boolean, System.Nullable`1<Int32>, System.Text.Encoding, Serilog.Sinks.File.FileLifecycleHooks)'.]
Intuit.Ipp.OAuth2PlatformClient.Diagnostics.OAuthAdvancedLogging..ctor(Boolean enableSerilogRequestResponseLoggingForDebug, Boolean enableSerilogRequestResponseLoggingForTrace, Boolean enableSerilogRequestResponseLoggingForConsole, Boolean enableSerilogRequestResponseLoggingForFile, String serviceRequestLoggingLocationForFile) in C:\Users\nshrivastava\Documents\GitHub\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Code\Intuit.Ipp.OAuth2PlatformClient.Diagnostics\OAuthAdvancedLogging.cs:238
Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, HttpMessageHandler innerHttpMessageHandler) in C:\Users\nshrivastava\Documents\GitHub\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Code\Intuit.Ipp.OAuth2PlatformClient\Client\TokenClient.cs:52
Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, String clientId, String clientSecret, HttpMessageHandler innerHttpMessageHandler, AuthenticationStyle style) in C:\Users\nshrivastava\Documents\GitHub\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Code\Intuit.Ipp.OAuth2PlatformClient\Client\TokenClient.cs:90
Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, String clientId, String clientSecret, AuthenticationStyle style) in C:\Users\nshrivastava\Documents\GitHub\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Code\Intuit.Ipp.OAuth2PlatformClient\Client\TokenClient.cs:77
QBOAPI.Controllers.<Token>d__17.MoveNext() in D:\Source\Repos\QBOAPI\QBOAPI\Controllers\CallbackController.cs:70
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +92
System.Web.Mvc.Async.<>c__DisplayClass8_0.<BeginInvokeAsynchronousActionMethod>b__1(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0() +80
System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +396
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +50
System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +188
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +646
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +182
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

Related

Null Reference when submitting Umbraco Forms to custom data source

I'm trying to make Umbraco Forms (Umbraco v7.5.3) save to my own data source.
I followed this guide: http://www.nibble.be/?p=84
And it appears to work-ish. I can connect and generate a form based on the table. Which is nice.
My setup
I add a new forms data source with the connection string:
Provider=SQLNCLI11;Server=(localdb)\MSSQLLocalDB;Database=test;Integrated Security=SSPI;
My table looks like this:
The Id (PK) property is configured as Identity
I choose some fields I want to use in the form:
I choose which data types it should use:
I'm a bit puzzled why the Id field is there. I didn't select it, and the guide I followed didn't have this field either :/?
It generates this form for me:
Error
But when I try to submit form data I get the following error. Which isn't nice.
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
Umbraco.Forms.Core.Providers.DatasourceTypes.MsSql.InsertRecord(Record
record) +1750
Umbraco.Forms.Web.Services.RecordService.storeRecord(Record record,
Form form) +1574
Umbraco.Forms.Web.Services.RecordService.Approve(Record record, Form
form) +343 Umbraco.Forms.Web.Services.RecordService.Submit(Record
record, Form form) +565
Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form
form, FormViewModel model, Dictionary2 state, ControllerContext
context) +2245
Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form
form, FormViewModel model, Dictionary2 state) +205
Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel
model, Boolean captchaIsValid) +785 lambda_method(Closure ,
ControllerBase , Object[] ) +143
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase
controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext, IDictionary2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext, ActionDescriptor actionDescriptor, IDictionary2
parameters) +27
System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult
asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult
asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
asyncResult) +32
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d()
+50 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f()
+225 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f()
+225 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f()
+225 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f()
+225 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f()
+225 System.Web.Mvc.Async.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult
asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult
asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c()
+26 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult
asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult
asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult
asyncResult) +27
System.Web.Mvc.Controller.b__1d(IAsyncResult
asyncResult, ExecuteCoreState innerState) +13
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult
asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.b__15(IAsyncResult
asyncResult, Controller controller) +12
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult
asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult
asyncResult) +10
System.Web.Mvc.MvcHandler.b__5(IAsyncResult
asyncResult, ProcessRequestState innerState) +21
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult
asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
+28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult
result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+9765121 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Questions
Why is the Id field added to my form when I didn't select it?
How is the form linked to my table? When I create a new form I cannot set a data source for it, and I cannot find any config on the generated form that points to my data source.
How are form fields linked to a table column? Is it via the "display name"?
Why do I get the above Null Reference when trying to submit my form?
I was able to solve the problem by upgrading the version of Umbraco Forms. I guess this was a known issue for Umbraco v7.4.3 and Umbraco Forms v4.3.2, which are the versions I was using.
See this issue report: http://issues.umbraco.org/issue/CON-1188

TF400898 when displaying security page for team project (TFS 2015 Update 1)

After upgrading to TFS 2015 Update 1 from TFS 2013 Update 4 we can no longer administer project security (http://server:8080/tfs/teamprojectcollection/teamproject/_admin/_security).
We only get this error:
TF400898: An Internal Error Occurred.
c/</<#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/TfsPresentationCoreJs?v=lXKi9E9jJDFVJ4uSgQ1IiVi52h9UMYcgejXSHEf0ezk1:24:1602
d#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/TfsPresentationCoreJs?v=lXKi9E9jJDFVJ4uSgQ1IiVi52h9UMYcgejXSHEf0ezk1:24:834
c/<#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/TfsPresentationCoreJs?v=lXKi9E9jJDFVJ4uSgQ1IiVi52h9UMYcgejXSHEf0ezk1:24:1203
n.Callbacks/j#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/basejs:3:32503
n.Callbacks/k.fireWith#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/basejs:3:33543
x#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/basejs:11:13062
.send/b/<#http://xxx:8080/tfs/_static/tfs/Dev14.M89-Part7/_scripts/TFS/min/basejs:11:17299
TFS event log shows:
Detailed Message: TF30065: An unhandled exception occurred.
Web Request Details
Url: http://xxx/_api/_identity/ReadScopedGroupsJson?__v=5 [method: GET]
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Headers: not available
Path: /xxx/_api/_identity/ReadScopedGroupsJson
Local Request: False
Host Address: xxx
User: xxx [authentication type: NTLM]
Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)
Exception Stack Trace: at Microsoft.TeamFoundation.Server.WebAccess.Admin.ApiIdentityController.<>c.<ReadScopedGroupsJson>b__20_1(TeamFoundationIdentity x)
at System.Linq.Enumerable.<SelectManyIterator>d__16`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at Microsoft.TeamFoundation.Server.WebAccess.Admin.ApiIdentityController.ReadScopedGroupsJson(String lastSearchResult, String searchQuery, Nullable`1 pageSize)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
We do have other team projects in the collection. For them, everything works fine.
As you mentioned other team projects work fine except this one, you may check whether the User: xxx has the correct permission to access the page. You may try the command below as this blog mentioned:
tfssecurity /a+ Server FrameworkGlobalSecurity GenericRead n:Domain\userxxx ALLOW /collection:http://tfsservername:8080/DefaultCollection

ASP MVC 4 Null Exception only in the server

I have frustrating problem in my web application. When I tested app local i didnt have any exception, when i published app, then throw a many null exception or like "Object reference not set to an instance of an object.". I don't understand why. I use hosting http://1and1.pl/. Can anybody help me?
Stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]
QuestionnaireEx.Controllers.QuestionnaireController.TestStart(AttemptAnswers attA, String prevBtn) +7267
lambda_method(Closure , ControllerBase , Object[] ) +119
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +182
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.Async.<>c_DisplayClass42.b_41() +28
System.Web.Mvc.Async.<>c_DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +10
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.<>c_DisplayClass39.b_33() +58
System.Web.Mvc.Async.<>c_DisplayClass4f.b_49() +225
System.Web.Mvc.Async.<>c_DisplayClass4f.b_49() +225
System.Web.Mvc.Async.<>c_DisplayClass37.b_36(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.<>c_DisplayClass1d.b_18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c_DisplayClass4.b_3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult1.End() +55
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult1.End() +55
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c_DisplayClass8.b_3(IAsyncResult asyncResult) +25
System.Web.Mvc.Async.<>c_DisplayClass4.b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9629296
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Make sure that the local configuration is the same as the server you're using.
For example, if you're hosting in IIS, set up a local IIS server with the same settings as on your remote server.
If your 1and1 hosting is shared, then look at your local configuration, and get on the phone with 1and1 support to see what the differences are between the local and remote configuration.
It's possible that you'll have to upgrade to a VPS or Dedicated server depending on your configuration needs.
Edit
Will you please post the source of the mvc controller method that is being called? Also, the values of each member in the method when it runs on the server? That would help in the process of evaluating your question.
Also,
I just realized that lambda_method(Closure , ControllerBase , Object[] ) +119 is on the second line of the stack trace.
If the error is being thrown from a lambda expression it may be that the iteration item that you're using in the lambda method is set to null at some point. If you don't check for null in your lambda expression, try that. It's just a guess, but without source code, all we've got are guesses.

MVC 4 ConnectionString on my godaddy hosting Error 166

I am testing a website, mvc 4 website; I am learning actually MVC.
I have published the website to my personal hosting, on my computers works good, but once is on my hosting I have an error, here are the connection string first: (I am using northwind to practice)
<add name="NorthwindEntities" connectionString="metadata=res://*/Models.NorthWindModel.csdl|res://*/Models.NorthWindModel.ssdl|res://*/Models.NorthWindModel.msl;
provider=System.Data.SqlClient;
provider connection string="
data source=**************.db.********.hostedresource.com;;
initial catalog=**********;
User ID=******;
MultipleActiveResultSets=True;
App=EntityFramework"
Password='********';
integrated security=True;"
providerName="System.Data.EntityClient" />
and here is the error:
Format of the initialization string does not conform to specification starting at index 166.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 166.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Format of the initialization string does not conform to specification starting at index 166.]
System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) +5078242
System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +132
System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +98
System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +118
System.Data.EntityClient.EntityConnection..ctor(String connectionString) +81
System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +78
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +32
System.Data.Entity.Internal.LazyInternalConnection.Initialize() +131
System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +13
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +281
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +56
System.Data.Entity.Internal.Linq.InternalSet1.GetEnumerator() +15
System.Data.Entity.Infrastructure.DbQuery1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +40
System.Collections.Generic.List1..ctor(IEnumerable1 collection) +315
System.Linq.Enumerable.ToList(IEnumerable1 source) +58
MvcApplication1.Controllers.HomeController.Index() +21
lambda_method(Closure , ControllerBase , Object[] ) +62
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27
System.Web.Mvc.Async.<>c_DisplayClass42.b_41() +28
System.Web.Mvc.Async.<>c_DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.<>c_DisplayClass39.b_33() +59
System.Web.Mvc.Async.<>c_DisplayClass4f.b_49() +240
System.Web.Mvc.Async.<>c_DisplayClass37.b_36(IAsyncResult asyncResult) +12
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +31
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +23
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +128
System.Web.Mvc.Async.WrappedAsyncResult1.End() +50
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +26
System.Web.Mvc.<>c_DisplayClass1d.b_18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c_DisplayClass4.b_3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult1.End() +55
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +41
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult1.End() +55
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +28
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c_DisplayClass8.b_3(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c_DisplayClass4.b__3(IAsyncResult ar) +25
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +30
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970061
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
So, what in the world is happening? I have tried many different connectionStrings without success.
Thanks
Two adjacent ;; at position 166.
Try following the information in these GoDaddy articles:
Locating Your Database Connection Strings
Connecting to a SQL Server Database Using ASP.NET 3.5 (I realise you're using asp.net mvc 4 but maybe this will help)
If you need more help you should contact GoDaddy as this is too specific/localised for a StackOverflow question

New Relic Azure Nuget Package Security Exception

I'm building an ASP.NET MVC 4 application and I recently installed a NuGet package for easing the process of running New Relic through ASP.NET (here's a link to the package on GitHub https://github.com/mikecousins/newrelicazurenuget) but it didn't work. When I uninstalled it, however, my application will no longer work under a Medium trust level.
Here's a stack of the Security Exception I get:
[SecurityException: Request failed.]
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +161
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +120
System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +15
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +34
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +229
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1694
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +465
I don't know where any of that is coming from, only that the problem didn't exist until I tried to use the package.
Any help on what's causing this and how to fix it would be much appreciated.
Thanks.
EDIT: This only happens when I publish the site to my local IIS and not if I just debug through VS. The trust level is just set in Web.Config. Is there any way to force the trust level while debugging so when this error pops up I might get better code hinting?

Resources