SharePointCommunity
Die deutschsprachige Community für SharePoint, Microsoft 365, Teams, Yammer und mit Azure

Sponsored by

Willkommen im Forum Archiv.
Einträge sind hier nicht mehr möglich, aber der Bestand von 12 Jahren SharePoint-Wissen ist hier recherchierbar.




CreateSite per CRM 4.0

Unbeantwortet Dieser Beitrag hat 0 Antworten

Ohne Rang
34 Beiträge
tw-elektric erstellt 19 Jan. 2010 14:02
SchlechtSchlechtIn OrdnungIn OrdnungDurchschnittDurchschnittGutGutSehr gutSehr gut

Hallo,

ich versuche über das MS CRM 4.0 beim Erstellen einer neuen Firma, eine Sharepoint Seite zu erstellen.

Leider erhalte ich dabei diesen Fehler:

at WorkflowHost.OnWorkflowTerminated(Object sender, WorkflowTerminatedEventArgs args)
at WorkflowRuntime.OnScheduleTerminated(WorkflowExecutor schedule, WorkflowTerminatedEventArgs args)
at EventHandler`1.Invoke(Object sender, TEventArgs e)
at WorkflowExecutor.FireWorkflowTerminated(Exception exception)
at SchedulerLockGuard.FireEvents(List`1 eventList, WorkflowExecutor workflowExec)
at WorkflowExecutor.RunSome(Object ignored)
at WorkItem.Invoke(WorkflowSchedulerService service)
at DefaultWorkflowSchedulerService.QueueWorkerProcess(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at _ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at _ThreadPoolWaitCallback.PerformWaitCallback(Object state)
>Workflow terminated: {0185A0A0-FA04-DF11-84FE-00237D2ECAB3} - System.Net.WebException: Fehler bei der Anforderung mit HTTP-Status 401: Unauthorized.
bei System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
bei System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
bei ClassLibrary3.MeetingsService.Meetings.CreateWorkspace(String title, String templateName, UInt32 lcid, TimeZoneInf timeZoneInformation)
bei ClassLibrary3.CreateSite.Execute(ActivityExecutionContext executionContext)
bei System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
bei System.Workflow.ComponentModel.CompositeActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
bei System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
bei System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
bei System.Workflow.Runtime.Scheduler.Run()

 

Jetzt habe ich hier ein Authorisierungsproblem. Nur weiß ich nicht genau woran dies liegt.
Als Benutzer verwende ich den Domänen Administrator:

Protected Overrides Function Execute(ByVal executionContext As System.Workflow.ComponentModel.ActivityExecutionContext) As System.Workflow.ComponentModel.ActivityExecutionStatus

        ' Get the ID of the primary CRM entity
        Dim contextService As IContextService = CType(executionContext.GetService(GetType(IContextService)), IContextService)
        Dim EntityId As String = contextService.Context.PrimaryEntityId.ToString("D")

        ' Ensure ParentSiteUrl is a correct Uniform Resource, otherwise throw an exception
        Dim ParentSiteUri As New Uri(Me.ParentSiteUrl)

        ' Get reference to Meetings.asmx proxy
        Dim MeetingsService As New MeetingsService.Meetings
        MeetingsService.Credentials = New System.Net.NetworkCredential("administrator", "password", "tw-elektric")
        MeetingsService.Url = ParentSiteUri.AbsoluteUri.TrimEnd("/") + "/_vti_bin/Meetings.asmx"

        ' Create new site
        Dim CreateWorkspaceResponse As XmlNode = MeetingsService.CreateWorkspace(EntityId, Me.SiteTemplate, Nothing, Nothing)
        Dim NewSiteUri As New Uri(CreateWorkspaceResponse.Attributes.ItemOf("Url").Value)

        ' Get reference to DWS.asmx proxy
        Dim DWSService As New DWSService.Dws
        DWSService.Credentials = System.Net.CredentialCache.DefaultCredentials
        DWSService.Url = NewSiteUri.AbsoluteUri.TrimEnd("/") + "/_vti_bin/DWS.asmx"

        ' Rename new site
        DWSService.RenameDws(Me.SiteName)

        ' Set up return parameters
        Me.NewSiteUrl = NewSiteUri.AbsoluteUri
        Return ActivityExecutionStatus.Closed

    End Function

 

Habt ihr eine Idee?

Hier das HowTo, welches ich benutzt habe: http://www.dynamicsblog.at/index.php?blog=1&title=crm-4-0-integration-sharepoint&disp=single&more=1&c=1&tb=1&pb=1