Jump to content

Recommended Posts

Posted

Hi Folks,

 

I have a 2 node Server 2012 R2 NLB cluster and I am trying to get HAP working on this. Individually both servers work with HAP absolutely fine, so I don't think its an issue with HAP per se, however, when I access through the NLB DNS Name/IP and open 'My Files' I get "Padding is invalid and cannot be removed." down the right of the screen multiple times if I click on any of the drive links, with the following error enter in the Event Logs:

 

An error occurred in Home Access Plus+

 

 

Page: mscorlib

 

 

Padding is invalid and cannot be removed.

 

 

 

 

System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.

 

at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

 

at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)

 

at System.Security.Cryptography.CryptoStream.FlushFinalBlock()

 

at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)

 

at System.IO.Stream.Close()

 

at System.IO.StreamReader.Dispose(Boolean disposing)

 

at System.IO.TextReader.Dispose()

 

at HAP.AD.TokenGenerator.ConvertToPlain(String token)

 

at HAP.MyFiles.API.info(String Drive, String Path)

 

at SyncInvokeinfo(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.ProcessMessage31(MessageRpc& rpc)

 

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

 

 

 

 

at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)

 

at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)

 

at System.Security.Cryptography.CryptoStream.FlushFinalBlock()

 

at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)

 

at System.IO.Stream.Close()

 

at System.IO.StreamReader.Dispose(Boolean disposing)

 

at System.IO.TextReader.Dispose()

 

at HAP.AD.TokenGenerator.ConvertToPlain(String token)

 

at HAP.MyFiles.API.info(String Drive, String Path)

 

at SyncInvokeinfo(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.ProcessMessage31(MessageRpc& rpc)

 

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

 

 

Any clues?

 

 

Thanks

 

Stephen

Posted

When Using Firebug in Firefox I get the following:

 

400 An WCF Error has Occured

{"Message":"Padding is invalid and cannot be removed.","Detail":null,"FaultType":"CryptographicException"}

Response Headers

Cache-Control private

Content-Length 106

Content-Type application/xml; charset=utf-8

Server Microsoft-IIS/8.5

X-AspNet-Version 4.0.30319

X-Powered-By ASP.NET

Date Tue, 04 Feb 2014 09:28:05 GMT

Request Headers

Host swc-web-nlb01

User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0

Accept application/json, text/javascript, */*; q=0.01

Accept-Language en-gb,en;q=0.5

Accept-Encoding gzip, deflate

DNT 1

Content-Type application/json

X-Requested-With XMLHttpRequest

Referer https://myserverurl/hap/myfiles/

Cookie ASP.NET_SessionId=21k2p1k2fx0nw2hsdnqornoq; .ASPXAUTH=B8B3BC70E331CD1976AB39D94FFFE7B6CFC2E4564FF8A3B1F8B7B7F819B6478DF4DC26CE6AEE9FB6AB4E3A1C372F384F51A543D6A2835CDE88021AB2D4581BC2E469771B96DE2F439EE6EDE0408B68BDC81747D764022C59E3DC5825914CAC141507D707B8A601BA9528843485A8C3C158C96F11CCE315F4942807A4DAC3115196FA7E6DFFF360EE4646256C60A46A7B; token=ASDHztn6v3GcZVv8trZSNw==

 

 

Looks like an issue with encryption and decryption using the Rijndael object - strange however as it works if I just go straight to the individual servers themselves....

Posted

This is the only issue I've got, I agree, Server 2008R2 version was bullet proof, I just couldn't give 1 server enough resources and put together a load balanced solution that allows me to deliver other products in the same set of servers, i.e. moodle/RD Web Applications etc. It works on each individual Server 2012R2 server if it helps you - I followed the instructions and then copied over my styling from my Server 2008R2 server, its only when I've come to cluster access the site its throws this one issue

 

Nick has a really good product here and we really like it so ideally I'd like it to run on the Server 2012R2 cluster we have - and it seems as though Nick has plan on how to work around this, so should be good

Posted

Right, the plan is you will need a key and a salt, as well as doing the asp.net machine key stuff.

 

The plan is, by default these will not be visible or shown or have any value, at which point HAP+ auto generates them based on the machine name, but you can override HAP+.

 

Suggestion is go to Random String Generator | Strong Password Generator

 

The Salt will be one of the Alphanumeric + special character strings

The Key will be all of the Alphanumeric + special character strings on the page

 

So at the time of writing a test Salt would be: dfcjtyxYA!l#3um1 and the Key would be: eGGb49-nZ+JFo.?2emQEHifDKlG@oiEDZ7O@fBc1oWFNTzO?VrypKN@g!w6iPKVARwq=!C=jly=1!H!Q_s2F3%W.n*g,y,zbuZ5po.IJvBJq5D31=5F__o=ic0hL8QWC

Posted
to be honest, I don't have a clue where to put the salt and key, the machine key for IIS auto adds the Encryption and decryption key to the HAP config.... can you elaborate for me?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...