cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.