Marshal.Copy (in medium trust level environment)
Marshal.Copy (in medium trust level environment)
am 16.01.2008 08:59:07 von 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
Re: Marshal.Copy (in medium trust level environment)
am 17.01.2008 02:11:45 von Alvin Bruney
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" wrote in message
news:OwfBtWBWIHA.4440@TK2MSFTNGP06.phx.gbl...
> 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
>
>
>
Re: Marshal.Copy (in medium trust level environment)
am 18.01.2008 12:36:07 von Steven Voordijk
Could you hand me some code to do this?
(Or a reference?)
Thanks!
"Alvin Bruney [ASP.NET MVP]" schreef in bericht
news:1072DB9D-D94F-4937-94F2-4A3D13F0F506@microsoft.com...
> 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" wrote in message
> news:OwfBtWBWIHA.4440@TK2MSFTNGP06.phx.gbl...
>> 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
>>
>>
>>
>
Re: Marshal.Copy (in medium trust level environment)
am 19.01.2008 19:52:45 von Alvin Bruney
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" wrote in message
news:uPmgUZcWIHA.1188@TK2MSFTNGP04.phx.gbl...
> Could you hand me some code to do this?
> (Or a reference?)
>
> Thanks!
>
> "Alvin Bruney [ASP.NET MVP]" schreef in bericht
> news:1072DB9D-D94F-4937-94F2-4A3D13F0F506@microsoft.com...
>> 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" wrote in message
>> news:OwfBtWBWIHA.4440@TK2MSFTNGP06.phx.gbl...
>>> 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
>>>
>>>
>>>
>>
>
>