File system access

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top