RUNAS account - Specified Cast is invalid.

When I attempt to look at the properties of a RUNAS account for SQL Server alerting / monitoring which I recently updated to add a new sql server in the distributionl, I get the following error.
Eventually it will come up but the distribution list of servers is no longer populated.
Any ideas?  
Specified Cast is not valid.
Note:  The following information was gathered when the operation was attempted.  The information may appear cryptic but provides context for the error.  The application will continue to run.
System.InvalidCastException: Specified cast is not valid.
   at Microsoft.EnterpriseManagement.Monitoring.Internal.MonitoringObjectGenerated.get_Id()
   at Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject.GetObjectWrappersPostProcessing[T](ReadOnlyCollection`1 resultSet, IEnterpriseManagementObjectCreatable`1 constructorHelper)
   at Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject.CreateMultiple[T](IList`1 dataAccessResultSet, EnterpriseManagementGroup managementGroup, Dictionary`2& instanceById, ObjectQueryOptions queryOptions)
   at Microsoft.EnterpriseManagement.Common.EnterpriseManagementObject.CreateMultiple[T](IList`1 dataAccessResultSet, EnterpriseManagementGroup managementGroup, ObjectQueryOptions queryOptions)
   at Microsoft.EnterpriseManagement.SecurityConfigurationManagement.GetApprovedHealthServicesForDistribution[T](ISecuredData securedData)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Common.SDKHelper.<>c__DisplayClass2b.<GetApprovedHealthServicesForDistribution>b__2a(Object sender, ConsoleJobEventArgs e)
   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)
Thanks Lance

We encountered this problem today.  I've written a script that will remove a specified computer from all RunAs Account distribution lists, and thought it might help avoid the problem next time we decommission an agent that has accounts distributed
to it.
The script also flags any accounts where the distribution list could not be accessed.
param (
[parameter(mandatory=$true)]$TargetName,
[switch]$WhatIf
Import-Module -Name OperationsManager
Write-Host
$Accounts=0
Get-SCOMRunAsAccount |
$Acct=$_
try {
$Dist = Get-SCOMRunAsDistribution -RunAsAccount $Acct
catch {
Write-Host -f yellow $('WARNING: RunAsAccount "{0}" has a corrupt RunAs Distribution!' -f $Acct.Name)
if ($Dist.Security -eq 'MoreSecure')
$FoundTarget = $false
$Dist.SecureDistribution = @($Dist.SecureDistribution | %{ if ($_.DisplayName -eq $TargetName) { $foundTarget = $true } else { $_ } } )
if ($foundTarget)
$Accounts++
$Dist | Set-SCOMRunAsDistribution -RunAsAccount $Acct -WhatIf:$WhatIf -Verbose
Write-Host
if ($Accounts -gt 0)
if ($WhatIf)
Write-Host -ForegroundColor green $("$TargetName would be removed from {0} RunAsAccount secure distribution lists" -f $Accounts)
} else {
Write-Host -ForegroundColor green $("$TargetName removed from {0} RunAsAccount secure distribution lists" -f $Accounts)
} else {
Write-Host -ForegroundColor cyan "$TargetName was not found in any RunAsAccount secure distribution lists"
Cheers,
Paul.

Similar Messages

  • Specified cast is invalid while doing gre restore within sharepoint

    Hallo,
    When we try to do a GRE restore from our sharepoint environment, we receive the error Specified cast is not valid.
    We are using hp dp 9.0 build 100, sharepoint 2013 v 15.0.4569.1506.
    Cell mgr: windows 2008 r2 ent (6.1 build 7601 sp1)
    SP Sql srv : W2012R2 (6.3 build 9600) – SQL 2012
    SP applic : W2012R2 (6.3 build 9600)
    The problem occurs in a newly created environment, with any random component we try to restore.
    I don’t know where to look further. It seems an sql issue, but the gre is started from within the sharepoint environment.
    As backup software we use hp dataprotector. When I google it seams an sql related error, but no idea what to adjust or change or... If I execute the restore as the sp_farm user or my
    own user (I’m farm admin, local admin on the servers and backup admin in dataprotector) I receive the same error message.
    A sql backup and restore works fine. Can anyone point me to the right direction? or someone who had the same issue?
    Thanks a lot for your help.

    Anyone?

  • Workflow Manager 1.0 configuration- Specified RunAs account is invalid

    Hello - I am trying to install and configure Workflow manager 1.0. As part of workflow manager configuration specifying the user id in
    Configure Service Account  section throwing error as "Specified RunAs account is invalid".
    I tried different ways and means suggested in forums and KBs - but I think it is unable to validate the user in Active Directory. Our Active Directory is AD 2003 functional level and wondering it has any issues with Workflow manager 1.0?
    Here are the environment details:
    WF Machine: Windows Server 2008 R2 SP1
    AD: Active Directory 2003
    Workflow Manager 1.0 installed and also applied the below latest workflow and service bus hotfixes.
    http://support.microsoft.com/kb/2799754; 
    http://support.microsoft.com/kb/2799752
    Also moved the service account to the default OU=Users container in AD as specified in below forum but no luck.
    http://social.msdn.microsoft.com/Forums/en-US/servbus/thread/3d803e15-606a-4f06-96fe-97c23ad3c01a
    I am not sure where the issue is wondering if any one has run into similar issue. Appreciate any feedback.

    Thanks for your response.
    No it still didnt work, we right clicked the users OU, provided read permissions on it directly not from any groups. as well as for computers OU.
    For me it is not showing invalid user, but wizard crashes as soon as we enter the service account details in the wizard. may be since the solution you are providing is not working for me.
    http://social.technet.microsoft.com/Forums/office/en-US/d70662fc-8e10-4862-975d-e441bf9c32f0/what-permission-does-the-service-account-requires-on-ad-for-the-workflow-manager-10-to-be?forum=sharepointadmin
    However we had one other test account which has full control on many areas is able to pass thru in this wizard with out crashing.
    We arent able to get the same permissions applied for prod account as it isnt right to simply take elevated permissions full control on AD Objects.
    Windows/AD team is looking for specific permission which this workflow manager requires to provide access.
    I dont see this documented with microsoft Either.
    SQL DB creation ability, Domain Account, Farm admin - is the criteria i believe.

  • Problem with SQL installation - the specified driver is invalid

    Hello,
    I'm struggling with the SQL installation. It's failing while trying to install database engine services with the following error:
    Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x84BB0001
      Error description:             Zadaný ovladač není správný.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0x476BF04A%400xDC80C325&EvtType=0x476BF04A%400xDC80C325
    The error description can be translated as "The specified driver is invalid." 
    Here is some detailed description of the error:
    PerfCounter munging INI tempate: 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlctr.ini' -> 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\perf-MSSQLSERVERsqlctr.ini'
    (01) 2014-06-17 16:44:25 Slp: Sco: Attempting to replace string in file, source file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlctr.ini', output file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\perf-MSSQLSERVERsqlctr.ini'
    (01) 2014-06-17 16:44:25 Slp: PerfCounter calling lodctr: 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\perf-MSSQLSERVERsqlctr.ini'
    (01) 2014-06-17 16:44:25 Slp: Prompting user if they want to retry this action due to the following failure:
    (01) 2014-06-17 16:44:25 Slp: ----------------------------------------
    (01) 2014-06-17 16:44:25 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
    (01) 2014-06-17 16:44:25 Slp: Inner exceptions are being indented
    (01) 2014-06-17 16:44:25 Slp: 
    (01) 2014-06-17 16:44:25 Slp: Exception type: Microsoft.SqlServer.Configuration.Sco.ScoException
    (01) 2014-06-17 16:44:25 Slp:     Message: 
    (01) 2014-06-17 16:44:25 Slp:         Zadaný ovladač není správný.
    (01) 2014-06-17 16:44:25 Slp:         
    (01) 2014-06-17 16:44:25 Slp:     HResult : 0x84bb0001
    (01) 2014-06-17 16:44:25 Slp:         FacilityCode : 1211 (4bb)
    (01) 2014-06-17 16:44:25 Slp:         ErrorCode : 1 (0001)
    (01) 2014-06-17 16:44:25 Slp:     Data: 
    (01) 2014-06-17 16:44:25 Slp:       WatsonData = perf-MSSQLSERVER-sqlctr11.1.3000.0.dll@OpenSQLPerformanceData@CollectSQLPerformanceData@CloseSQLPerformanceData
    (01) 2014-06-17 16:44:25 Slp:       DisableRetry = true
    (01) 2014-06-17 16:44:25 Slp:     Inner exception type: System.ComponentModel.Win32Exception
    (01) 2014-06-17 16:44:25 Slp:         Message: 
    (01) 2014-06-17 16:44:25 Slp:                 Zadaný ovladač není správný.
    (01) 2014-06-17 16:44:25 Slp:                 
    (01) 2014-06-17 16:44:25 Slp:         HResult : 0x80004005
    (01) 2014-06-17 16:44:25 Slp:         Error : 2001
    (01) 2014-06-17 16:44:25 Slp:         Stack: 
    (01) 2014-06-17 16:44:25 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.LoadPerformanceCounter(String symbolInstallPath, String counterPrefixServiceName)
    (01) 2014-06-17 16:44:25 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounterCore(String libraryFileName, String openFunction, String collectionFunction, String closeFunction,
    String symbolInstallPath, String counterPrefixServiceName)
    (01) 2014-06-17 16:44:25 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounter(String libraryFileName, String openFunction, String collectionFunction, String closeFunction,
    String symbolInstallPath, String counterPrefixServiceName)
    Any advice is appreciated. So far i've come to another posts using lodctr /r but that doesn't fix it.

    symbolInstallPath, String counterPrefixServiceName)
    (01) 2014-06-17 16:44:25 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounterCore(String libraryFileName, String openFunction, String collectionFunction, String closeFunction,
    String symbolInstallPath, String counterPrefixServiceName)
    (01) 2014-06-17 16:44:25 Slp:                 at Microsoft.SqlServer.Configuration.Sco.PerformanceCounter.RegisterPerformanceCounter(String libraryFileName, String openFunction, String collectionFunction, String closeFunction,
    String symbolInstallPath, String counterPrefixServiceName)
    Any advice is appreciated. So far i've come to another posts using lodctr /r but that doesn't fix it.
    Hi,
    Error seems strange and points to Performance counterexception. Can you manually rebuild performance counter using below Support link
    http://support.microsoft.com/kb/300956
    After that remove failed installation completely from add remove program and then install a fresh instance. Always make sure account used to install SQL server is member of local windows admin. And always Right click on Setup file and select run ad administrator
    to start the installation
    Hope this helps 
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Security.Cryptography - The specified path is invalid. while accessing the private key stored in LocalMachine store

    Hello,
    I have C# dll which is invoked through a C++ cgi executable which is deployed on apache 2.2. I am getting the following error when I am trying to access the private key of a certificate which is stored in the Localmachine store. It works fine while
    debugging in visual studio.
    It also works fine when I try to access the same certificate from the current user store through apache.
    I have tried running apache as "SYSTEM", even then I get the same error.
    I have followed the right process to import the certificate into the localmachine store through mmc. 
    Error Message:
    The specified path is invalid.
     caused by mscorlib
       at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
       at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
       at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
       at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
       at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
       at SamlImplLib.SamlImpl.GetSamlResponse(String sInParamXml, String sInAttrXml)
    The above error is not really helpful as it doesnt tell me which path is invalid as I am not passing any path in my code. I am just accessing the certificate through the X509Certificate2 store
    Thanks in advance

    Hi,
    This is probably because the worker process identity does not have read permission to the machine key store.
    And I agree with you. "The specified path is invalid" is a typical misleading message.
    You may need to clarify the difference between "SYSTEM- User" and "Current-user "through apache. Good Luck!
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Ugh: Error [0x800700a1] The specified path is invalid.

    I'm having the following problem. 
    Our backups are failing with the following error:
    In the backup logs, I find:
    Error in backup of D:\ during write: Error [0x800700a1] The specified path is invalid.
    Error in backup of D:\Perforce\ during write: Error [0x800700a1] The specified path is invalid.
    Error in backup of D:\Perforce\Database\ during write: Error [0x800700a1] The specified path is invalid.
    Error in backup of D:\Perforce\Database\p4s.exe during write: Error [0x800700a1] The specified path is invalid.
    In the event viewer, I find:
    The backup operation that started at '?2010?-?05?-?24T21:51:56.331072200Z' has failed with following error code '2155347997' (The operation ended before completion.). Please review the event details for a solution, and then rerun
    the backup operation once the issue is resolved.
    And on the command line, wbadmin returns:
    Found (41) files.
    The backup operation stopped before completing.
    Summary of the backup operation:
    The backup operation stopped before completing.
    Detailed error: Element not found.
    The backup of the system state failed [5/24/2010 5:23 PM].
    Log of files successfully backed up:
    C:\Windows\Logs\WindowsServerBackup\Backup-24-05-2010_14-51-56.log
    Log of files for which backup failed:
    C:\Windows\Logs\WindowsServerBackup\Backup_Error-24-05-2010_14-51-56.log
    The operation ended before completion.
    Element not found.
    ERROR(-3): Backup failed!
    This is very frustrating. 
    The more I use Windows built-in backup the more fragile it seems to be. 
    The D drive is a local drive and the path is valid. 
    Running check disk finds no problems.  The drive is mostly empty. 
    I tried with and without the anti-virus software, same problem. 
     There are no other server errors to indicate a problem with the drive or the path. 
    I ran vssadmin list writers, and none of them returned any errors. 
     Why would the backup return an invalid path error, for a path that is valid? 
    Any help would be greatly appreciated.
    Thanks much,
    James.

    Hi Sriram,
    Thanks for getting back to me!
    I'll try to mail them to you before the end of the week.
    A quick question:
     if the backup failed to find and copy a single file or directory (for whatever reason), why does it abort the whole process? 
    The file in question was not critical, so having it missing from the backup would only have been a minor inconvenience. 
    Obviously, you want to log such an event very clearly, but it does not make sense to me for it to kill the whole process... 
    Will this be improved in future versions?  I have to admit, I've not seen much backup software stop because of such a trivial error, except maybe "copy" from the command prompt.
    I think the built-in Window Server 2008 R2 backup software is very promising, and overall, I like it better than the old NT Backup crud. 
    However, from my limited use, it still seems rough around the edges; too many glitches and problems, something you don't want to see from your backup software.
    Thanks much,
    James. 

  • Getting errors in MSMQ intermittent Specified cast is not valid on Sending

    I keep getting this error when I try and Send a message on a windows server 2008 R2 box. It works about 95% of the time but ever so often I get the following:
    Log Entry : 4:29:44 AM Friday, April 17, 2015
      :Transaction Failed [Specified cast is not valid.]
    Log Entry : 4:29:44 AM Friday, April 17, 2015
      :Stack Trace [   at System.Messaging.Interop.MessagePropertyVariants.Lock()
       at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
       at ProdUwsCallbackService.ProdUwsCallbackService.SmsCallback(SmsCallbackRequest SmsCallbackRequest) in C:\NH Applications\VerizonNewProdGateway\WebProdUwsCallback\API\ProdUwsCallbackService.asmx.cs:line 318]
    This happens about 7 or 8 times a night and it processes about 500 to 1000 messages before this happens. At about 4:30 in the morning I receive a large spike or volume of messages and it seems to happen around that time.
    Here is the code snippet that is sending the MSMQ:
                                RxUwsCallbackVerizonProdMQ.Formatter = new XmlMessageFormatter(new Type[] { typeof(UwsRxMessage) });
                                //MessageQueueTransaction RxUwsCallbacVerizonProdTran = new MessageQueueTransaction();
                                try
                                    //RxUwsCallbacVerizonProdTran.Begin();
                                    //RxUwsCallbackVerizonProdMQ.Send(Message, Label, RxUwsCallbacVerizonProdTran);
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Putting SMS Message into Message Queue: [" + Label + "]");
                                    lock (RxUwsCallbackVerizonProdMQ)
    RxUwsCallbackVerizonProdMQ.Send(Message, MessageQueueTransactionType.Single);
                                    //RxUwsCallbacVerizonProdTran.Commit();
                                catch (Exception ex)
                                    //RxUwsCallbacVerizonProdTran.Abort();
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Transaction Failed [" + ex.Message + "]");
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Stack Trace [" + ex.StackTrace + "]");
    The bold line is where the error is happening.
    This is running as a application under IIS7 on a Windows 2008 R2 box.
    Any help would greatly be appriciated on how to deal with this error or correct it. Thanks.

    Hi Reggie,
    MSMQ forum is better, I help you to move it here.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Web controls 2.1 Fail with Specified Cast is not valid

    1) I loaded the 2.1 Beta .NET Webcontrols ..2) I removed the reference to the old Plumtree.WCFilter.dll from my project3) I added the new reference in its place4) I checked the GAC to see that WCLoader was the proper version5) Also noticed the reliance on J# redist 1.1 so I downloaded and installed this as well6) Any thoughts on why I am gettig invalid cast exception? When I access portlet in the portal it simply displays error, when I try to access portlet outside of portal I get cast exception.
    [InvalidCastException: Specified cast is not valid.] Com.Plumtree.Remote.Transformer.Config.WCConfig.Load(TextReader reader) Com.Plumtree.Remote.Transformer.Config.WCConfig.LoadAll(String confPath) Com.Plumtree.Remote.Transformer.PTTransformer.get_Config() Com.Plumtree.Remote.Transformer.PTTransformer.BeginRequestHandler(Object sender, EventArgs e) System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
    Phil Orion | [email protected] | www.orionsmith.com

    I am still unable to get the 2.1 Webcontrols to work, can anyone provide some insight to overcoem the cast exception?.-There seem to be some additional configuration items in this release - Can anyone explain their purpose? -The installation also placed the image server files in the wrong location - I had to move them from the ptimages folder to the ptimages/RemoteGadgets

  • Async service keep stopping with Specified cast is not valid

    Hi there,
    Our organization currently is experiencing some failure on CRM 4.0 Async service.
    The error message is :
    failed while monitoring asynchronous operations queue. Exception: System.InvalidCastException: Specified cast is not valid.
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.GetSdkBaseUrl()
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.get_WebServiceEndpoint()
       at Microsoft.Crm.Asynchronous.CrmServiceFactory.CreateCrmService(Guid organizationId, Nullable`1 userId, CorrelationToken correlationToken)
       at Microsoft.Crm.Asynchronous.SdkPluginDescriptionProvider.GetPluginTypeDescription(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmSharedMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCache.LookupEntry(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.GetPluginType(Guid pluginTypeId)
       at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.ProcessAsyncEvent(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.InvokeHandlerInPool(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    It looks the GetSdkBaseUrl() function failed. Has anyone experienced it before?
    Cheers

    I don't know about your specific error, but the CRM 4.0 Async service was notoriously unstable.  That's why they added a monitoring service in later versions to keep it up.  However, for 4.0, I recommend going to the Service itself in the Windows
    Service area, and then tell the "behavior after failure" section to "Restart" every time it fails.  While not perfect, it will keep your Async service up and running even when it crashes.
    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • Specified cast is not valid errors

    Hi all
    Sometimes, but not always, I'm finding that the Layer.Add, Cell.GlueTo and Window.Select methods throw errors similar to:
    Specified cast is not valid at System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT,
    Int32 flags) at Microsoft.Office.Interop.Visio.IVLayer.Add(Shape SheetObject, Int16 fPresMems)
    I'm using VB2010, Visio 2007 and currently testing on Windows XP 32 bit. The program is a stand-alone .exe program using Visio via .NET interop. The same program, with the same data can run several times without problem and then once this error
    has been thrown, the same error will be thrown every time until the Visio file is closed and re-opened.
    This VB2010 code was derived from a VB6 program which has been working fine for 2,000+ users over a period of about 15 years.
    Unfortunately I've not been able to replicate these problems in a small test program which is making the debugging process rather tedious and it's another aspect of this problem which is worrying and confusing me.
    The program is adding a 100 or so shapes from a stencil and gluing lines between them. I've tried playing with the settings of such properties as DeferRecalc, EventsEnabled, InhibitSelectChange, LiveDynamics, ShowChanges and UndoEnabled as I thought
    Visio might be having a problem updating the screen or allocating memory to the undo manager or something. I've also tried Application.DoEvents.
    I've re-written some of my code to avoid using Window.Select which I was using to select shapes to create groups. I guess I could also re-write the code to avoid using GlueTo, but I don't think I can always avoid using Layer.Add.
    Any thoughts or comments would be much appreciated.
    Best regards
    Roger Billsdon

    Hi Paul
    Many thanks for your reply and I hope all is well with you.
    I spent quite a lot of time trying to replicate the problem in a small test program created from scratch. All the offending methods (Window.Select, Layer.Add and Cell.GlueTo) worked fine in the test program, as indeed they often do in my main program.
    I carefully compared all the project references and everything else I could think of in both the test and my main program. I added loops in the test program so that it added many shapes, etc in an attempt to create some stress on the Visio UI, Undo manager,
    etc. Not being able to replicate the problem in a small test program is one aspect of this problem that is worrying and confusing me.
    The main program is quite large (I guess about 60,000 lines of code) and contains code for many other functions. An alternative approach would be for me to take a copy of the main program and try chopping chunks out to degenerate
    it into a small test program. However, at present I have a looming project deadline so I'm now putting my effort into recoding to eliminate the Window.Select, Cell.GlueTo and, where possible, Layer.Add method calls. Fortunately Visio provides alternatives
    which seem to be working. For example, rather than Cell.GlueTo I'm setting the relevant cell formulae and instead of Window.Select to form group, I'm creating a shape, converting it into a group and then dropping the other shapes into this group.
    Back in my VB6 programs I had some problems with select and group so I think this conversion is worthwhile, but I don't recall having had any problems with Cell.GlueTo or Layer.Add. Because I don't understand what's causing the problem I'm concerned that this
    re-coding work is just fixing the symptoms without actually getting at the root cause.
    In general I am finding rather more problems and performance issues with VB.NET Visio programs than I did over all the years I used VB3 and VB6 to program Visio.
    Best regards
    Roger

  • Specified cast is not valid. (Microsoft.SqlServer.Smo) - degradation of v11

    I have Sql management studio 2014 SP1 and im working with my Azure SQL Databases.
    Previously all my databases and servers were on Sql Server 11.0 and thing were working fine, until a couple of days ago; 1 database on a server started throwing the specified cast is not valid error when you try to use management studio to Script table as.....
    and today all (3) of my databases on (different) servers are throwing that error 
    Earlier today I upgraded 1 of the servers to the latest azure sql database 12.0.2000.8 (it took a while since it can take up to 24 hours); and can verify that the same script table as... or any management studio function that will generate scripts, like
    Generate Scripts task does not throw this error.
    The issue with v11 started happening a few days ago and is now on all my v11 databases; management studio will not generate scripts.,  wanted to submit this as a bug., but there is no easier way to do so.
    screenshots below.
    error dump:
    ===================================
    Specified cast is not valid. (Microsoft.SqlServer.Smo)
    Program Location:
       at Microsoft.SqlServer.Management.Smo.Table.Microsoft.SqlServer.Management.Smo.IPropertyDataDispatch.SetPropertyValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.PropertyDispatcher.SetValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.SetValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AddObjectPropsFromDataReader(IDataReader reader, Boolean skipIfDirty, Int32 startColIdx, Int32 endColIdx)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname, Boolean useDefaultValue)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.RetrieveProperty(Int32 index, Boolean useDefaultOnMissingValue)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.GetPropertyObject(Int32 index)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropertyOptional(String propName)
       at Microsoft.SqlServer.Management.Smo.Column.EmbedDefaultConstraints()
       at Microsoft.SqlServer.Management.Smo.Column.GetPropagateInfo(PropagateAction action)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropagateInfoForDiscovery(PropagateAction action)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.GetScriptableChildren(List`1 propInfoList, PropagateAction propagateAction)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.SfcChildrenDiscovery(HashSet`1 discoveredUrns)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.Discover(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Discover(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptWorker(List`1 urns, ISmoScriptWriter writer)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns, ISmoScriptWriter writer)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptGenerator.ScriptCreate(SqlTextWriter sqlwriter, Server server, Urn[] urns, SqlScriptOptions options)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptNodeActionContext.Script(SqlTextWriter writer)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SqlScriptMenu.OnScriptItemClick(Object sender, EventArgs e)

    I'm also running into this exact issue with V11 and SQL Server Management Studio -- table "Generate Create Script" fails with "Specified
    cast is not valid. (Microsoft.SqlServer.Smo)". This just started happening recently with V11 and doesn't manifest with V12. I'm running SSMS with latest hotifxes (CU6 I believe). I don't have the option of an immediate move to V12.
    Microsoft SQL Server Management Studio 12.0.2480.0
    Microsoft Analysis Services Client Tools 12.0.2480.0
    Microsoft Data Access Components (MDAC) 6.3.9600.16384
    Microsoft MSXML 3.0 6.0 
    Microsoft Internet Explorer 9.11.9600.17728
    Microsoft .NET Framework 4.0.30319.34014
    Operating System 6.3.9600

  • HP Client Security Manager 8.3.3.1786 - Specified cast is not valid

    I've recently installed HP Client Security and find usefull accessing the PC using my finger: it works.But I got a problem accessing all USB Drivers. I got the solution reading questions in this forum: I should modify a setting in HP Client Security Manager.But my HP Client Security Manager fails after authentication giving: Specified cast is not validMy PC windows software is updated according to Microsoft Update,  even HP tool says it's all updatedI've bought the PC a little more than a year ago so HP assistence says they can't answer me (but they wrote a note) Error details: at DPClientConsole.FirstBooleanToIntConverter.Convert(Object[] values, Type targetType, Object parameter, CultureInfo culture)
    at System.Windows.Data.MultiBindingExpression.TransferValue()
    at System.Windows.Data.MultiBindingExpression.Transfer()
    at System.Windows.Data.MultiBindingExpression.UpdateTarget(Boolean includeInnerBindings)
    at System.Windows.Data.MultiBindingExpression.AttachToContext(Boolean lastChance)
    at System.Windows.Data.MultiBindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
    at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
    at MS.Internal.Data.DataBindEngine.Run(Object arg)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    @ssheaf 
    ‎Thank you for using HP Support Forum. I have brought your issue to the appropriate team within HP. They will likely request information from you in order to look up your case details or product serial number. Please look for a private message from an identified HP contact. Additionally, keep in mind not to publicly post ( serial numbers and case details).
    If you are unfamiliar with the Forum's private messaging please click here to learn more.
    Thank you,
    Omar
    I Work for HP

  • Error while running Account Transformation...

    Hi Experts,
    I'm trying to run Account Transformation using the script logic below but unfortunately nothing gets calculated. When I check the package, it status is mark "CANCELED" though I did not cancel the execution of the package. Checking the detail of the status it only show the below info:
    Script Logic:
    *RUN_PROGRAM CALC_ACCOUNT
    CATEGORY = %CATEGORY_SET%
    CURRENCY = %CURRENCY_SET%
    TID_RA = %TIME_SET%
    OTHER = [COMPANY=%COMPANY_SET%]
    CALC = CALC_RE
    *ENDRUN_PROGRAM
    Package Detail Log:
    /CPMB/MODIFY completed in 0 seconds
    [Selection]
    (Member Selection)
    COMPANY: 1403
    CATEGORY: ACTUAL
    CURRENCY: LC
    TIME: 2005.JAN
    [Messages]
    Application: CONSOL Package status: SUCCESS
    By the way, I used the process chain for ALLOCATION, I put the code for Account Transformation in the ALLOCATION.LGF since it's the logic being called by the said process chain. Checking further using the TCODE ST22 it gives the following error:
    Runtime Errors: GETWA_NOT_ASSIGNED
    Short Text: Field symbol has not been assigned.
    What happened: Error in ABAP Application Program. The current ABAP program "CL_UJK_UTIL================CP" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    Cheking "Information on where terminated" code is terminated here...
        READ TABLE <lt_mem> ASSIGNING <l_member> INDEX 1.
        ASSIGN COMPONENT 'TIMEID' OF STRUCTURE <l_member> TO <l_timeid>.
        MODIFY ct_timeid FROM <l_timeid>.
        "ASSIGN COMPONENT 'TIMEID' OF STRUCTURE <l_member> TO <l_string>.
    I checked the properties and the TIMEID property is existent. Was there anything wrong with my syntax? Any idea regarding this kind of error?
    Thanks,
    Marvin

    After checking all the dimension and using TCODE RSA1 to check the server side, I found that INTCO property is existent in the member worksheet but not in the server so I maintain the dimension properties and re-add INTCO property in the Entity dimension. After that package runs successfully.

  • Item Interface error - "The Cost of Sales Account specified is not a valid"

    A week back we migrated from 11.5.10 to 12.1.3
    Since then, many items are failing in Item Interface with the error "The Cost of Sales Account specified is not a valid account or has expired in organization ITEM MASTER INV."
    Item Master being the 'Inventory master organization'. I checked the cost of sales account & sales account. and they are Valid also their corresponding segments are valid in their respective value sets.
    Log message for 'Item Import'
    Import Items
    Argument 1 (ORG_ID) = 167
    Argument 2 (ALL_ORG) = 1
    Argument 3 (VAL_ITEM_FLAG) = 1
    Argument 4 (PRO_ITEM_FLAG) = 1
    Argument 5 (DEL_REC_FLAG) = 1
    Argument 6 (PROCESS_SET) = 77
    Argument 7 (MODE) = 2
    Argument 8 (Gather Stats) = 1
    TRANSACTION ID : 42878726
    ORGANIZATION ID : 174
    TABLE NAME : MTL_SYSTEM_ITEMS_INTERFACE
    COLUMN NAME : COST_OF_SALES_ACCOUNT
    MESSAGE NAME : INV_IOI_ERR
    ERROR MESSAGE : The Cost of Sales Account specified is not a valid account or has expired in organization ITEM MASTER INV.
    TRANSACTION ID : 42878726
    ORGANIZATION ID : 174
    TABLE NAME : MTL_SYSTEM_ITEMS_INTERFACE
    COLUMN NAME : SALES_ACCOUNT
    MESSAGE NAME : INV_IOI_ERR
    ERROR MESSAGE : The Sales Account specified is not valid or has expired for the organization ITEM MASTER INV.
    Please help.

    The Cost_of_sales_account & Sales_account as defined in the MTL_PARAMETERS are different from those in MTL_SYSTEM_ITEMS_B for the corresponding item. The values for these accounts in the interface tables are same as that in the MTL_SYSTEM_ITEMS_B table and hence not same as those defined in MTL_PARAMETERS.
    Actually we have a Custom trigger on the MTL_SYSTEM_ITEMS_B table which updates these accounts, once the item is created in the Master Organization.
    To verify this issue, I updated the accounts on the MTL_SYSTEM_ITEMS_INTERFACE table to match with that of MTL_PARAMETERS. Ran the 'Item Import', now those records are processed.
    Does this means that, the Interface is validating the cost_of_sales_account & sales_account to match with that of the 'Organization' ??.
    But we never had this issue in 11i. Is this a part of R12??

  • Order Import failing with error "The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory."

    Hi All,
    I am getting this error while importing an internal sales order.
    “The specified subinventory is invalid to use, the profile option INV: Allow Expense to Asset Transfer is set to No. Change the profile option to Yes or choose a valid subinventory.”
    I have tried to set mentioned profile as ‘Yes’. But still getting same error.
    Also, provided subinventory is present and active in given inventory organization.
    Please share if anybody encountered this before and have a solution.

    Hi 2878342
    Please refer the following metalink note, it should resolve your problem.
    Order Import Interface.Error Message Specified Subinventory Is Invalid To Use (Doc ID 406411.1)

Maybe you are looking for

  • Editing Error when trying to edit in Photoshop Elements

    Hello all, I received a strange error message when I tried to edit a photo in Photoshop Elements from Aperture. The message is as follows: *"Editing Error* *This image cannot be rendered for editing because Aperture does not support the image format.

  • Email and Contact Issues

    My emails are not coming through to my phone unless I manually refresh. I have three accounts setup (Yahoo! and 2 school email accounts). Both school accounts, when I sign on from a computer says something about Outlook: one says Mircosoft outlook an

  • Payment release required; payment block set automatically Message no. F5707

    Hello Friends, I am trying to post vendor down payment with T.CODE F-48 but is am getting this Error " Payment release required; payment block set automatically, Message no. F5707" Will any budy please make me clear with this issue .... Have a nice d

  • No Backup with iTunes Possible

    iTunes says anytime "no backup session ". I have buy a new usb-cable(orginal Apple). I  have all tipps in Apple support followed. NO success.   My system what running are on my pc is win7 64bit. In one tip of Apple support is sayed that i should dele

  • "ProgramName.exe" has stopped working?

    Hello, I am currently in school and am trying to compile programs using Visual C++ Express 2010, because that is what the professor uses. I was told to download the source code from the books website, and build from there. When compiling any of the b