Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MaxIsherwood
New Member

On Premises Data Gateway (Personal Mode) Offline

Hi, I'm currently having issues with our Gateway showing as offline and i'm having trouble.
The following error is being shown when trying to open it:

MaxIsherwood_0-1662974568878.png

When trying to sign we get the following error:

 

Error generating an asymmetric key.

Exception message: Key not valid for use in specified state.

 

Key not valid for use in specified state.

 

Server stack trace: 

   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)

   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

 

Exception rethrown at [0]: 

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Microsoft.PowerBI.DataMovement.Pipeline.ConfigurationContracts.IGatewayConfigurationService.GenerateAsymmetricKey()

   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayClient.GatewayConfigurationClient.GenerateAsymmetricKey()An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:

System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

 

   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 Microsoft.PowerBI.DataMovement.Pipeline.GatewayServiceHost.AsymmetricKeyGenerator.ProduceAsymmetricKey(String containerName, Boolean cleanUpOldKeys, Int32 rsaKeySize)

   at Microsoft.PowerBI.DataMovement.Pipeline.GatewayPipelineTelemetry.PipelineTelemetryService.ExecuteInActivity[T](PipelineActivityType pipelineActivityType, Func`1 action)

   at SyncInvokeGenerateAsymmetricKey(Object , Object[] , Object[] )

   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)

   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

 

I've tried reinstalling and restarting, which tells us the key is invalid but other than that we have no idea what could be causing this issue.

 

Any ideas as to what the issue could be, or is there some update which has gone through this weekend I'm unaware of?

 

Thanks.

1 ACCEPTED SOLUTION
Levi_Huck
Regular Visitor

Hi,

 

I know the solution to this.

 

For "Key not valid for use in specified state" errors try moving the folder RSA from

C:\Users\<User>\AppData\Roaming\Microsoft\Crypto\RSA to:

 

C:\RSA (just in case there should be a need to restore it) then try installing your personal gateway again, where the folder will automatically be regenerated. This folder appears to act as a cache.

View solution in original post

2 REPLIES 2
Levi_Huck
Regular Visitor

Hi,

 

I know the solution to this.

 

For "Key not valid for use in specified state" errors try moving the folder RSA from

C:\Users\<User>\AppData\Roaming\Microsoft\Crypto\RSA to:

 

C:\RSA (just in case there should be a need to restore it) then try installing your personal gateway again, where the folder will automatically be regenerated. This folder appears to act as a cache.

Worked like a charm, thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.