Marshal.Copy (in medium trust level environment)

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
 
A

Alvin Bruney [ASP.NET MVP]

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
 
S

Steven

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
 
A

Alvin Bruney [ASP.NET MVP]

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
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top