Issues with UWP Device Connecting to MySQL - mysql

I'm having issues connecting a UWP device to MySQL after the latest Windows 10 update.
After doing research, it looks like there's no MySQL connector available that works with the new Windows update.
Everything worked fine before the update, but now I'm receiving this error:
{System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.Process, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
at MySql.Data.MySqlClient.MySqlConnectAttrs.get_PID()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at MySql.Data.MySqlClient.NativeDriver.SetConnectAttrs()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at SLBHandHeldFINAL.Config.Button_Click_1(Object sender, RoutedEventArgs e)}
Any help would be greatly appreciated!
Thanks in advance!

Related

Does running Import Organization twice using Same Database can cause issue in MSCRM2011?

I have been migrating MSCRM2011 from Windows Server 2008 to Windows Server 2012 & SQL Server from 2008 to 2012, facing below issue.
Steps I performed:
Install CRM with Demo name on new Windows Server 2012
Create replica of CRM DB from old SQL Server 2008 to new SQL Server 2012
Run Import Organization on the migrated DB
However on running Import first time by mistake the organization name was given as wrong so I reran the import to give desired name on same migrated DB. So I have ran Import twice on same CRM DB
But now I am facing issue in adding new user and getting below error, also getting below generic error:
Error:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.
Detail:
-2147220970
An unexpected error occurred.
2017-08-19T06:57:35.402523Z
Below is the event viewer:
The Web Service plug-in failed in OrganizationId: 7bece0b8-b36e-424b-9b01-78d604765f62; SdkMessageProcessingStepId: 56f5c774-9ecb-45f2-99c2-8dd57737af6e; EntityName: none; Stage: 30; MessageName: AssociateEntities; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.InvalidCastException: Specified cast is not valid.
at Microsoft.Crm.Timeouts.GetExtendedTimeout()
at Microsoft.Crm.ObjectModel.SystemUserBusinessUnitEntityMapUtility.ReInitMapForUsers(Guid[] systemUsers, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamServiceInternal`1.ReInitTeamMembers(Guid[] userIds, ReinitMasks reinitMask, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamMembershipServiceInternal`1.Associate(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.HandleAssociationOperation(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, Boolean createAssociation, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.AssociateEntities(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, ExecutionContext context)
Traces(https://www.pastiebin.com/599da0c5497e6):
Web Service Plug-in failed in SdkMessageProcessingStepId: {56F5C774-9ECB-45F2-99C2-8DD57737AF6E}; EntityName: none; Stage: 30; MessageName: AssociateEntities; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.InvalidCastException: Specified cast is not valid.
at Microsoft.Crm.Timeouts.GetExtendedTimeout()
at Microsoft.Crm.ObjectModel.SystemUserBusinessUnitEntityMapUtility.ReInitMapForUsers(Guid[] systemUsers, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamServiceInternal`1.ReInitTeamMembers(Guid[] userIds, ReinitMasks reinitMask, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamMembershipServiceInternal`1.Associate(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.HandleAssociationOperation(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, Boolean createAssociation, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.AssociateEntities(BusinessEntityMoniker entityOneMoniker, BusinessEntityMoniker entityTwoMoniker, String associationRelationshipName, ExecutionContext context)
.
From comments:
Unable to find the resolution so we reinstalled the CRM and it is working now.

Exchange 2013 issues after CU9

I have a MS Exchange 2013 server that worked fine until I installed CU9 KB3087126.
Issues:
ECP is not accesible from the outside.
ECP is accessible from the inside using "https://server_name/ecp" but after entering the credentials I get a page with "Server Error in '/ecp' Application."
Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.]
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +153
System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +63
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +124
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +76
>[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +12425660
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +69
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +62
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +299
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618996
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458613
In the Event log I have a WARNING from ASP.NET 4.0.30319.0 with EventID 1310 saying:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 7/20/2016 2:34:28 PM
Event time (UTC): 7/20/2016 11:34:28 AM
Event ID: a59d5b2b449a4b968766e110bc5704a6
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT/ecp-12-131134880684035632
Trust level: Full
Application Virtual Path: /ecp
Application Path: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\
Machine name: name_here
Process information:
Process ID: 11208
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
>Could not load file or assembly 'Microsoft.Exchange.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=token_here' or one of its dependencies. The system cannot find the file specified.
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
Request information:
Request URL: https://localhost:444/ecp/exhealth.check
Request path: /ecp/exhealth.check
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM
Thread information:
Thread ID: 35
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement)
at System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList)
at System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
In the Queue Viewer I have a lot of emails headed towards certain domains that are stuck with the error:
[{LRT=7/20/2016 2:40:17 PM};{LED=450 4.7.0 Proxy session setup failed on Frontend with '451 4.4.0 DNS query failed. The error was: DNS query failed with error ServerFailure'};{FQDN=correct_fqdn_here};{IP=correct_ip}]
What works:
OWA works from the inside and outside;
Apart from some emails to specific domains (small companies) inbound/outbound emails work from inside and outside of the company.(Tested with a Gmail account, testconnectivity.microsoft.com and received confirmation that emails from some big companies are being received - ex. hp.com)
Apart from the CU9 Update, nothing was changed prior to the update.
Searched the web a lot before asking but nothing helped. I'm guessing most of the issues are because ECP is not working.
Has anyone encountered this issue before and has an idea how to fix it?
Thanks in advance!
After a lot of research I ended up rebuilding the .net folders and AppPool entities in IIS. The main issue being that the IIS AppPools were not pointing to the correct ECP site, etc.
Now it works just fine.

System.Data.Entity.Infrastructure.DbUpdateException error

I have a simple MVC 5 test solution that is connected to a SQL server 2008 on the intranet here. I have followed this tutorial so far:
http://www.asp.net/mvc/overview/getting-started/database-first-development/generating-views
I can open the view, and it shows the listing but when I try to create a new one I get the following error:
{"Unable to update the EntitySet 'Movies' because it has a
DefiningQuery and no <InsertFunction> element exists in the
<ModificationFunctionMapping> element to support the current
operation."}
I used the Database first approach so I have no idea what has gone wrong. I understand that somehow he can't perform an Update. Is this something I need to fix inside the project or has it to do something with SQl server?
EDIT: here is the exception details
System.Data.Entity.Infrastructure.DbUpdateException was unhandled by user code
HResult=-2146233087
Message=Unable to update the EntitySet 'Movies' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.
Source=EntityFramework
StackTrace:
at System.Data.Entity.Internal.InternalContext.SaveChanges()
at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
at System.Data.Entity.DbContext.SaveChanges()
at TestSite.Controllers.MoviesController.Create(Movy movy) in c:\Users\Rovc\Desktop\TestSite\TestSite\Controllers\MoviesController.cs:line 54
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
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.ActionInvocation.InvokeSynchronousActionMethod()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
InnerException: System.Data.Entity.Core.UpdateException
HResult=-2146232032
Message=Unable to update the EntitySet 'Movies' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.
Source=EntityFramework.SqlServer
StackTrace:
at System.Data.Entity.SqlServer.SqlGen.DmlSqlGenerator.ExpressionTranslator.Visit(DbScanExpression expression)
at System.Data.Entity.Core.Common.CommandTrees.DbScanExpression.Accept(DbExpressionVisitor visitor)
at System.Data.Entity.SqlServer.SqlGen.DmlSqlGenerator.GenerateInsertSql(DbInsertCommandTree tree, SqlGenerator sqlGenerator, List`1& parameters, Boolean generateReturningSql, Boolean upperCaseKeywords, Boolean createParameters)
at System.Data.Entity.SqlServer.SqlGen.SqlGenerator.GenerateSql(DbCommandTree tree, SqlVersion sqlVersion, List`1& parameters, CommandType& commandType, HashSet`1& paramsToForceNonUnicode)
at System.Data.Entity.SqlServer.SqlProviderServices.CreateCommand(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.Entity.SqlServer.SqlProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.Entity.Core.Common.DbProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Common.DbProviderServices.CreateCommand(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)
at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.CreateCommand(Dictionary`2 identifierValues)
at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary`2 identifierValues, List`1 generatedValues)
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut)
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction)
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()
at System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.<SaveChangesInternal>b__27()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges()
InnerException:
I found the problem. The table that I was using was apparently missing a primary key. Once I designated the correct field as Primary everything worked.

Downloading a file from http location, I get the following error

Scenario
Downloading an xlsx file to my local drive from a http location using a execute script task .
ERROR
Error: 0x1 at Script Task: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at ST_3926c89e45574d05b1869761d015ffc0.csproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
Task failed: Script Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
Based on the code provided in your previous (and open) question I presume you would need to set the Credentials property on the HttpWebRequest. Without knowing the specifics of your credential situation, I cannot say whether the DefaultCredentials will work or whether you will need to provide a user & password.
wr.Credentials = System.Net.CredentialCache.DefaultCredentials;

Get FileNotFoundException error when call a ActiveX in SSIS script task

I need call a ActiveX in my SSIS package, so I use script task and write the following C# script:
public void Main()
{
clsAptFdbReader objFdbReader = new clsAptFdbReader("UnitedStates20000830.fdb");
objFdbReader.OpenFdb(false);
Dts.TaskResult = (int)ScriptResults.Success;
}
Get a error:
Error:
System.Reflection.TargetInvocationException:
Exception has been thrown by the
target of an invocation. --->
System.IO.FileNotFoundException: Could
not load file or assembly
'Interop.APTFDBReader,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its
dependencies. The system cannot find
the file specified. File name:
'Interop.APTFDBReader,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' at
ST_320325ad8e2543f09ee688d809f58ee7.csproj.ScriptMain.Main()
=== Pre-bind state information === LOG: User = SHINETECHCHINA\xugy LOG:
DisplayName = Interop.APTFDBReader,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null (Fully-specified)
LOG: Appbase = file:///C:/Program
Files/Microsoft SQL
Server/100/DTS/binn/ LOG: Initial
PrivatePath = NULL Calling assembly :
(Unknown).
=== LOG: This bind starts in default load context. LOG: Using application
configuration file: C:\Program
Files\Microsoft SQL
Server\100\DTS\binn\DtsDebugHost.exe.Config
LOG: Using machine configuration file
from
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to
reference at this time (private,
custom, partial, or location-based
assembly bind). LOG: Attempting
download of new URL file:///C:/Program
Files/Microsoft SQL
Server/100/DTS/binn/Interop.APTFDBReader.DLL.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft SQL
Server/100/DTS/binn/Interop.APTFDBReader/Interop.APTFDBReader.DLL.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft SQL
Server/100/DTS/binn/Interop.APTFDBReader.EXE.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft SQL
Server/100/DTS/binn/Interop.APTFDBReader/Interop.APTFDBReader.EXE.
--- End of inner exception stack
trace --- at
System.RuntimeMethodHandle._InvokeMethodFast(Object
target, Object[] arguments,
SignatureStruct& sig, MethodAttributes
methodAttributes, RuntimeTypeHandle
typeOwner) at
System.RuntimeMethodHandle.InvokeMethodFast(Object
target, Object[] arguments, Signature
sig, MethodAttributes
methodAttributes, RuntimeTypeHandle
typeOwner) at
System.Reflection.RuntimeMethodInfo.Invoke(Object
obj, BindingFlags invokeAttr, Binder
binder, Object[] parameters,
CultureInfo culture, Boolean
skipVisibilityChecks) at
System.Reflection.RuntimeMethodInfo.Invoke(Object
obj, BindingFlags invokeAttr, Binder
binder, Object[] parameters,
CultureInfo culture) at
System.RuntimeType.InvokeMember(String
name, BindingFlags bindingFlags,
Binder binder, Object target, Object[]
providedArgs, ParameterModifier[]
modifiers, CultureInfo culture,
String[] namedParams) at
System.Type.InvokeMember(String name,
BindingFlags invokeAttr, Binder
binder, Object target, Object[] args,
CultureInfo culture) at
Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
You can generate the interop as part of your build using TLBIMP.EXE, and give it arguments to build a strong name.
I'm not sure if it's wise to install that interop into the GAC, though, if it's based on a third-party COM server?