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

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top