System.Security.Cryptography.CryptographicException: Bad Data

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi,

I have recently ported a vb.net web service from .net 2003 to 2005. My web service was working correctly on Friday. This morning I ported a web application from .net 2003 to 2005, again no problem. I set the anonymous access to true for each project in IIS. I also updated the web service. When I build the application I do not encounter any problems. However when I go to access the web service from the web application I get the following error: "System.Security.Cryptography.CryptographicException: Bad Data".

I then tried to call one of the functions in the web service my using the web browser to access the web service directly. When I click the Invoke button I get the following error: "System.TypeInitializationException: The type for 'SSS.dsGlobal' threw an exception ---> System.Security.Cryptography.CryptographicException: Bad Data"

Can anyone suggest a possible solution?? I have verified that the database is running, that the web service and the web application have the correct permissions.

Mike55.
 
Hi,

I believe that I have traced my problem to the source...The vast majority of my code in the web service is stored in vb.net modules. When 2005 ports the code to the new framework, it encloses the modules with a namespace tag, and places the module in the App_Code folder.

If you create a new project in 2005, and select the "Add new item" option, there is no option to add in a module, only a class. Therefore the question that arises include:
  1. has Microsoft stopped supporting modules, and why?,
  2. secondly, in porting to the new environment why were n't the modules converted into classes rather than leaving them as modules?
  3. Finally, is there any quick way of converting all my modules into classes?

Mike55.
 
Back
Top