Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2008

Tip: Looking for answers? Try searching our database.

Web service returning custom class fails if not running full trust

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Taylor - 27 Feb 2008 21:38 GMT
I have some web services that I've written and a forms application that calls
my web services and is deployed using ClickOnce. I don't want to run the
forms application in full trust but it doesn't work if I don't. The problem
is that some of the web service calls are returning a custom class. These
calls fail with the exception below if the app doesn't have full trust. Calls
that don't deal with custom classes work just fine. Is there any way to
resolve this problem other than not using custom classes or running in full
trust?

System.InvalidOperationException: There is an error in XML document (1,
290). ---> System.Security.SecurityException: Request failed.
  at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderLogin.Read2_WorldInfo(Boolean isNullable, Boolean checkType)
  at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderLogin.Read12_GetWorldsResponse()
  at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer17.Deserialize(XmlSerializationReader reader)
  at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.PermissionSet
The demand was for:
<PermissionSet class="System.Security.PermissionSet"
version="1"
Unrestricted="true"/>
nano2k - 29 Feb 2008 21:03 GMT
Richard

Sorry, can't help you out with your problem.
I'm now facing the challenge to return custom classes from the
webservice.
How do you do this?
I created a post on this subject here:

http://groups.google.ro/group/microsoft.public.dotnet.framework.webservices/brow
se_thread/thread/7e3d1f4feb45096d/69e2dc7fe1fcaa31?hl=ro#69e2dc7fe1fcaa31


If you can share this, please do.
Sorry again for not being able to help you.

Thanks.

> I have some web services that I've written and a forms application that calls
> my web services and is deployed using ClickOnce. I don't want to run the
[quoted text clipped - 23 lines]
> version="1"
> Unrestricted="true"/>

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.