A
Amir Tohidi
Hi
I have a web service that calls our internal framework for some processing.
The assembly called needs to know what directory it is located in. It does
this using:
Public Shared ReadOnly Property AssemblyPath() As String
Get
Dim assemblyDirectory As String
assemblyDirectory =
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase)
Return assemblyDirectory.Remove(0, "file:\".Length)
End Get
End Property
When this property get is called, we get the following error:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
When our web sites call the same assembly, we don't get the problem.
Any idea?
Thanks
I have a web service that calls our internal framework for some processing.
The assembly called needs to know what directory it is located in. It does
this using:
Public Shared ReadOnly Property AssemblyPath() As String
Get
Dim assemblyDirectory As String
assemblyDirectory =
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.GetName.CodeBase)
Return assemblyDirectory.Remove(0, "file:\".Length)
End Get
End Property
When this property get is called, we get the following error:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
When our web sites call the same assembly, we don't get the problem.
Any idea?
Thanks