Marshal.Copy (in medium trust level environment)

  • Thread starter Thread starter Steven Voordijk
  • Start date Start date
S

Steven Voordijk

I'm writing code to copy, manipulate and save an image file.
The code written is based on this article by Microsoft;
http://support.microsoft.com/?id=814675

Unfortunately, the "Runtime.InteropServices.Marshal.Copy" action
is not allowed on the shared hosting environment with medium trust level
the site will be on. How can I change/replace the mentioned command
so it will run on medium trust level?

Thanks in advance!
Regards, Steven
 
Not sure how you going to get around this one, the gatekeeper doesn't allow
it so the code won't work because it requires those permissions from the
gatekeeper. Just a thought, how about using isolated storage to create the
file and then a simple file copy using System.IO

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
Could you hand me some code to do this?
(Or a reference?)

Thanks!

Alvin Bruney said:
Not sure how you going to get around this one, the gatekeeper doesn't
allow it so the code won't work because it requires those permissions from
the gatekeeper. Just a thought, how about using isolated storage to create
the file and then a simple file copy using System.IO

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------



Steven Voordijk said:
I'm writing code to copy, manipulate and save an image file.
The code written is based on this article by Microsoft;
http://support.microsoft.com/?id=814675

Unfortunately, the "Runtime.InteropServices.Marshal.Copy" action
is not allowed on the shared hosting environment with medium trust level
the site will be on. How can I change/replace the mentioned command
so it will run on medium trust level?

Thanks in advance!
Regards, Steven
 
There's an explanation and complete code on this page
http://www.developer.com/net/net/article.php/3430541

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------



Steven said:
Could you hand me some code to do this?
(Or a reference?)

Thanks!

Alvin Bruney said:
Not sure how you going to get around this one, the gatekeeper doesn't
allow it so the code won't work because it requires those permissions
from the gatekeeper. Just a thought, how about using isolated storage to
create the file and then a simple file copy using System.IO

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------



Steven Voordijk said:
I'm writing code to copy, manipulate and save an image file.
The code written is based on this article by Microsoft;
http://support.microsoft.com/?id=814675

Unfortunately, the "Runtime.InteropServices.Marshal.Copy" action
is not allowed on the shared hosting environment with medium trust level
the site will be on. How can I change/replace the mentioned command
so it will run on medium trust level?

Thanks in advance!
Regards, Steven
 
Back
Top