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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

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.

Anonymous
Not applicable

Worked like a charm, thank you!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.