Re: Access is denied - from .net class not webpage



Thanks Dustin,

I am aware that __REQUESTDIGEST is only used for ASPX pages ... so my
question was is there a technique I can use to gain the same permission
level to call SPWebCollection.Add() from a .net class?

Thanks for your help.

Steve

Dustin Miller wrote:
> Are you calling the Add() method of the SPWebCollection class?
>
> The __REQUESTDIGEST is only used for ASPX pages that make a POST that
> will ultimately modify the database.
> -----
> Dustin Miller
> SharePoint University [http://www.sharepointu.com]
> SharePoint Blogs [http://www.sharepointblogs.com]
> SharePoint Experts [http://www.sharepointexperts.com]
>
> snesbitt76@xxxxxxxxxxx wrote:
> > Hi,
> >
> > I am trying to programmatically create an SPWeb. I built a test .net
> > console application to achieve this and it worked fine. Now I am
> > trying to integrate this functionality with our main project. I want
> > to be able to call the create web code from within a .net class. The
> > class is ultimately being called from a webservice in response to an
> > activity triggered from a biztalk orchestration.
> >
> > I know that in order to get the necessary permissions to create an
> > SPWeb from a .net webpage you need to add a hidden field
> > "__REQUESTDIGEST", but what do I need to do in order to get the same
> > permissions from a .net class? I didnt need to do anything special
> > from my .net console app since the permission model must already allow
> > updates, but with a .net class things arent so straight forward.
> >
> > Can any Sharepoint guru's point me in the right direction?
> >
> > Thanks in advance ...
> >

.



Relevant Pages

  • Re: Access is denied - from .net class not webpage
    ... SharePoint University ... to be able to call the create web code from within a .net class. ... I know that in order to get the necessary permissions to create an ... from my .net console app since the permission model must already allow ...
    (microsoft.public.sharepoint.portalserver.development)
  • COM Calling C# Security Issue
    ... We have a C# class which creates a TCP connection to another machine. ... We registered that .NET class for COM use, and when we call it via COM ... when it tries to create the new tcp connection, with a "Request for the ... permission of type System.Net.SocketPermission ... ...
    (microsoft.public.dotnet.languages.csharp)