-
Notifications
You must be signed in to change notification settings - Fork 934
/
Copy pathUnableToLoadProxyFactoryFactoryException.cs
55 lines (49 loc) · 1.39 KB
/
UnableToLoadProxyFactoryFactoryException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Runtime.Serialization;
using System.Security;
namespace NHibernate.Bytecode
{
[Serializable]
public class UnableToLoadProxyFactoryFactoryException : HibernateByteCodeException
{
public UnableToLoadProxyFactoryFactoryException(string typeName, Exception inner)
: base("", inner)
{
TypeName = typeName;
}
protected UnableToLoadProxyFactoryFactoryException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
foreach (var entry in info)
{
if (entry.Name == "TypeName")
{
TypeName = entry.Value?.ToString();
}
}
}
[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("TypeName", TypeName);
}
public string TypeName { get; }
public override string Message
{
get
{
const string causes = @"
Possible causes are:
- The NHibernate.Bytecode provider assembly was not deployed.
- The typeName used to initialize the 'proxyfactory.factory_class' property of the session-factory section is not well formed.
Solution:
Confirm that your deployment folder contains one of the following assemblies:
NHibernate.ByteCode.LinFu.dll
NHibernate.ByteCode.Castle.dll";
string msg = "Unable to load type '" + TypeName + "' during configuration of proxy factory class." + causes;
return msg;
}
}
}
}