473,769 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Marshal.Copy (in medium trust level environment)

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.Intero pServices.Marsh al.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

Jan 16 '08 #1
3 2553
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" <st****@dds.nlw rote in message
news:Ow******** ******@TK2MSFTN GP06.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.Intero pServices.Marsh al.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
Jan 17 '08 #2
Could you hand me some code to do this?
(Or a reference?)

Thanks!

"Alvin Bruney [ASP.NET MVP]" <www.lulu.com/owcschreef in bericht
news:10******** *************** ***********@mic rosoft.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" <st****@dds.nlw rote in message
news:Ow******** ******@TK2MSFTN GP06.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

Unfortunatel y, the "Runtime.Intero pServices.Marsh al.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

Jan 18 '08 #3
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" <st****@dds.nlw rote in message
news:uP******** ******@TK2MSFTN GP04.phx.gbl...
Could you hand me some code to do this?
(Or a reference?)

Thanks!

"Alvin Bruney [ASP.NET MVP]" <www.lulu.com/owcschreef in bericht
news:10******** *************** ***********@mic rosoft.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" <st****@dds.nlw rote in message
news:Ow******* *******@TK2MSFT NGP06.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.Intero pServices.Marsh al.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

Jan 19 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1260
by: Michael Howes | last post by:
I have a webservice and use WSE so a user can upload a good sized file. The entire ASP.Net projects, web.config sets a Medium trust level IIS is set up to use "Integrated Windows authentication" I get an access denied msg in the client when trying to call the webservice method. If I change the trust level in the web.config to Full everything works fine. Because of things beyond my control the ASP.Net app has to run with Medium
0
1533
by: Tamir Khason | last post by:
According guidlines of ASP.NET security with medium trust level I should able to use file system IO with my virtual directory, but actual recieve error 500 (not appears with full trust level) Following two examples. "My virtual directory/Some directory/Some other directory" within an application in "My virtual directory" I have to get FileVersionInfo of files from "Some other directory" string dPath = "Some directory"; ArrayList al =...
7
2252
by: AmitKu | last post by:
I am trying to do a URL post using HttpWebRequest, but it fails because I am hosting on Network Solutions, and their servers are all medium trust. Apparently HttpWebRequest doesn't work on medium trust. Is there any way to do URL posting in a medium trust environment? I'm hoping I don't need to switch hosts because of this. Btw I've posted this a 3rd time now because I've yet to receive any replies whatsoever. I've called around...
2
2464
by: binujose | last post by:
I am trying to access a folder which resides outside the application.My application hosted in a medium trust level server. I am getting error in the below line of code. brandImage.PostedFile.SaveAs("C:\Temp" + sFileName); My application is in c:\Inetpub\wwwroot. Please see the below exception Security Exception
1
1225
by: gomzi | last post by:
hi, I would like to know as to which class I could use if I want to resize an image for a medium trust environment? I am currently using the getthumbnailimage property of the system.drawing.image object to achieve the result, but unfortunately it doesn't work in a medium trust environment. Any help would be appreciated. Thanks, gomzi.
1
1607
by: Jordan M. | last post by:
Hi, Hopefully someone can help or at least point me in the right direction... I have developed a site that uses the CyberSource system to process credit cards. All works great locally on my dev. computer. When I upload to my main server (Shared Hosting, setup with Medium Trust), I get an error that says "That assembly does not allow partially trusted callers.".
3
2833
by: Mukesh | last post by:
Hi all I have Created an web application using VS 2005, asp.net2.0, Ajax Extensions 1.0, Ent Lib 3.1 , MS sql Server 2005, ajax Control tool kit Version 1.0.10618.0
4
4182
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Is it possible for a medium trust web application to read the Membership providers? The following throws a SecurityException: MembershipSection membershipSection = (MembershipSection)WebConfigurationManager.GetSection("system.web/membership"); I have custom sections in my web.config where I specify requirePermission="false", which allows them to be read in medium trust, but it does not seem possible to do this for the membership...
4
3235
vikysaran
by: vikysaran | last post by:
Hello, I have my new application on Godaddy.com server. Previously it was giving error on Permission. i asked support about it and they told me to set trust level MEDIUM so I search over the internet and got http://msdn.microsoft.com/en-us/library/ms998341.aspx article. as described in article, i made 'customWeb_mediumtrust.config' file and place it into Base Directory (Am i right???) at compiling it is giving following error-...
0
9583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10039
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.