RE: Web Service

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jonathan Howard (JonathanHoward_at_discussions.microsoft.com)
Date: 11/03/04


Date: Wed, 3 Nov 2004 09:42:03 -0800

I've already added that, that was giving me a different error. For some
reason it can't create the XML file without that Unrestricted="true" in the
permission set. I'm pretty sure one of IPermissions would be able to control
this. My IPermission for web permission looks like this:

<IPermission
  class="WebPermission"
  version="1">
    <ConnectAccess>
      <URI uri="$OriginHost$"/>
      <URI uri="http://api.google.com/.*"/>
      <URI uri="http://www.google.com/.*"/>
    </ConnectAccess>
</IPermission>

"Daniel Larson (www.portalbuilder.org)" wrote:

> I believe it's the WebPermission which is in the WSS_Medium trust
> configuration. What you may have to do though is modify the ConnectAccess URI
> tag. I believe the only web services you're allowed to access by the default
> policy are ones on the same host-- so you'll have to add an entry for Google.
>
> <IPermission
> class="WebPermission"
> version="1">
> <ConnectAccess>
> <URI uri="$OriginHost$"/>
> </ConnectAccess>
> </IPermission>
>
> "Jonathan Howard" wrote:
>
> > I've tried that. The only way I can get it to work is by adding
> > Unrestricted="true" to the ASP.Net Permission Set. I know this isn't the
> > right way, but I'm not sure which permission handles this. I can't seem to
> > find much documentation on the permission sets for the config files. Thank
> > you for trying, though.
> >
> > "Daniel Larson (www.portalbuilder.org)" wrote:
> >
> > > Jonathan,
> > >
> > > Try running your site under WSS_Medium. That should have the web service
> > > permissions you need.
> > >
> > > Daniel Larson
> > >
> > > "Jonathan Howard" wrote:
> > >
> > > > I've discovered that this is due to permissions within
> > > > wss_minimaltrust.config under the permissionsets, but I don't know exactly
> > > > what permission needs to be set to allow this web part to create and send the
> > > > xml soap document. Any help would be appreciated.
> > > >
> > > > "Jonathan Howard" wrote:
> > > >
> > > > > I am attempting to comsume the google web service from within a web part.
> > > > > When calling the function that actually performs the search I receive the
> > > > > following error:
> > > > >
> > > > > There was an error generating the XML document. at
> > > > > System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object
> > > > > o, XmlSerializerNamespaces namespaces, String encodingStyle) at
> > > > > System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object
> > > > > o, XmlSerializerNamespaces namespaces) at
> > > > > System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage
> > > > > message) at
> > > > > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> > > > > methodName, Object[] parameters) at
> > > > > WebPartLibrary1.google.GoogleSearchService.doGoogleSearch(String key, String
> > > > > q, Int32 start, Int32 maxResults, Boolean filter, String restrict, Boolean
> > > > > safeSearch, String lr, String ie, String oe) at
> > > > > WebPartLibrary1.WebPart1.btnSearch_Click(Object sender, EventArgs e)
> > > > >
> > > > > Does anyone know what could be causing this error? As far as I can tell it
> > > > > isn't the function because I am using an almost exact duplicate of what they
> > > > > provided in their sample application.
> > > > >
> > > > > Thanks,
> > > > > Jonathan Howard



Relevant Pages

  • caspol -addpset
    ... To add a new permission set into the CAS through caspol we have to ... specify a XML file. ... surprisingly I can't find anywhere not even on MSDN, ...
    (microsoft.public.dotnet.security)
  • RE: Web Service
    ... > permission set. ... I'm pretty sure one of IPermissions would be able to control ... My IPermission for web permission looks like this: ... What you may have to do though is modify the ConnectAccess URI ...
    (microsoft.public.sharepoint.portalserver.development)