I am trying to create a custom membership and role provider. The code for this seems to be fine, but when I try to go to the Security section of the Web Site Administration Tool, I get the following:
The invoked member is not supported in a dynamic assembly.
In reference to the first line of the first bit of NHibernate-related code that is called:
var cfg = new Configuration();
followed by:
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'NHibernate.XmlSerializers, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The system cannot find the file specified.
Before that I get a few:
Culture name 'aspx' is not supported.
I have the providers in the App_Code folder and the NHibernate DLLs are copied to the Bin folder on execution of the application.
I am assuming it is to do with the providers not being able to find all of the relevant classes and dlls related to NHibernate and the Role class and so on.
For whatever reason, this problem went away.
There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.
For the alert error ("The system cannot find the file specified.") Right click on [Solution Program name] then select Build Dependencies> & left click on Build Customizations... then true-checkbox {MASM} then click OK button.
This error usually means that the assembly was not found. Try verifying that the file exists in the directory where your application is running.
The located assembly's manifest definition does not match the assembly reference. As stated, this is caused when the version of a . dll file in the /bin directory (assembly reference), is not the same as specified in the web. config (assembly manifest).
I had the same thing, turns out it wasn't really a problem. I had IDE set so that it will break on Exceptions
After reading this link below I realised.
http://www.mail-archive.com/[email protected]/msg06043.html
You can simply hit F5 and continue running. That's pretty much all I know
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With