• úvod
  • témata
  • události
  • tržiště
  • diskuze
  • nástěnka
  • přihlásit
    registrace
    ztracené heslo?
    PETVALSharepoint & Foundation :: MOSS & WSS :: Project :: FAST, Search :: ...a cela tahle aplikacni rodinka Sharepoint / Teams / Viva / SPFx / Copilot...a cela tahle aplikacni rodinka
    NECROMAN
    NECROMAN --- ---
    TENCOKACISTROMY: ted jsem to zkousel a jde mi tom, mysleno treti stranka stazeni produktu se zobrazi v pohode. Pred tim to hlasilo ty Oops.
    TENCOKACISTROMY
    TENCOKACISTROMY --- ---
    TENCOKACISTROMY: Ha, tak problem byl nejspis v tom, ze checkbox, ktery slouzi k "souhlasim" nebyl videt (= mel velikost cca 1x2 px) a ja ho mel za ikonku odrazky textu.

    Nicmene, i kdyz jsem ho zaskrtnul pres TAB + space, tak mi misto stahnuti vyskocila stranka s textem:
    Oops…
    
    something went wrong
    
    Unexpected error occured, please try again or contact webmaster.
    
    We are sorry for the inconvenience.


    Zkousel jsem to vickrat, ale vysledek je stejny.
    TENCOKACISTROMY
    TENCOKACISTROMY --- ---
    NECROMAN: Nepouzivam Operu, ale FF 2 na Win 2003 Server SP2.
    Na druhy strance to po me stale abych si precetl licencni podminky a souhlasil s nima. Zkousel jsem ten textbox scrolovat (ruzne rychle) dolu i nahoru atd.. a vysledek je stale stejny - dole se mi zobrazuje cerveny text "Please read and confirm the License Terms and Conditions." a dal me to nepusti.
    NECROMAN
    NECROMAN --- ---
    TENCOKACISTROMY: zminena chyba by uz mela byt opravena... zkus to tedka
    STORMTEK
    STORMTEK --- ---
    Ahoj, je nějaká utilitka aby Sharepoint četl a zobrazoval metadata z PDF? dík moc
    TENCOKACISTROMY
    TENCOKACISTROMY --- ---
    NECROMAN: Nejprve jsem se nemohl dostat pres druhou zalozku se souhlasem s licenci, opakovane mi to tvrdilo ze s ni musim souhlasit. (Nevim co to po me presne chtelo, jediny rozumny se tam tvarilo teleny obly tlacitko bez titulku a znacku ">"), a po nekolika pokusech se timto tlacitkem dostat dal mi to vyhodilo klasickou errorpage:

    Server Error in '/' Application.
    Server was unable to process request. ---> Exception has been thrown by the target of an invocation. ---> String was not recognized as a valid DateTime.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Exception has been thrown by the target of an invocation. ---> String was not recognized as a valid DateTime.
    
    Source Error:
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace:
    
    [SoapException: Server was unable to process request. ---> Exception has been thrown by the target of an invocation. ---> String was not recognized as a valid DateTime.]
       System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +413081
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300
       BoldBrick.CRM.Licensing.ActivationService.ActivationService.CreatePurchase(XmlElement axCustomer, String& asUnlockKey) in c:\project\mossquito\svn\www\workspaces\secondlife\BoldBrick.CRM\Web References\Licensing.ActivationService\Reference.cs:866
       BoldBrick.CRM.API.MancoLicensingFacade.CreatePurchase(UserAccountInfo accountInfo, Int32 licenseID) in c:\project\mossquito\svn\www\workspaces\secondlife\BoldBrick.CRM\API\MancoLicensingFacade.cs:41
       BoldBrick.CRM.API.ProductManagement.RequestBeta(UserAccountInfo accountInfo, Products product) in c:\project\mossquito\svn\www\workspaces\secondlife\BoldBrick.CRM\API\ProductManagement.cs:42
       BoldBrick.Web.Downloads.buttonDownLoad_Click(Object sender, EventArgs e) in D:\BoldBrickWeb\BoldBrick.Web\Downloads.aspx.cs:63
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
    
    
    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074
    LEXXA
    LEXXA --- ---
    NECROMAN: nevim jestli si ze me nedelate srandu :)))
    [CRMAPIException: The identity http://cid-5b71714501c47a05.spaces.live.com/ is already signed up.]
    BoldBrick.CRM.API.AccountManagement.CreateRemoteIdentityAccount(UserAccountInfo accountInfo) in c:\project\mossquito\svn\www\workspaces\secondlife\BoldBrick.CRM\API\AccountManagement.cs:65
    BoldBrick.Web.BusinessLogic.LoginOrRegisterControl.ButtonConfirm1_Click(Object sender, EventArgs e) in D:\BoldBrickWeb\BoldBrick.Web\BusinessLogic\LoginOrRegisterControl.ascx.cs:87
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
    KERRAY
    KERRAY --- ---
    otestujem...
    NECROMAN
    NECROMAN --- ---
    15. srpna jsme spustili web k nasemu aktualne vyvijenemu produktu Mossquito 2009 pro vyvoj, spravu a deployment SharePointu. Prvni beta produktu je jiz verejne ke stazeni, vice info zde: http://www.boldbrick.com/
    KERRAY
    KERRAY --- ---
    hah, další vtipná ukázka konzistentnosti... když se člověk ptá na hodnotu lookupu v SPListItem, dostane 123;#Text, když se ale na hodnotu lookupu ptá v AfterProperties v event receiveru, dostane jen 123...
    KERRAY
    KERRAY --- ---
    aha, nemám tam <Where>, takže vrací všechno... začátečnická chyba :))
    KERRAY
    KERRAY --- ---
    ach jo, jak je možný, že Caml Query Builder mi pro dotaz
    <Eq><FieldRef Name='Porada' LookupId='TRUE' /><Value Type='Lookup'>48</Value></Eq><OrderBy><FieldRef Name='ID' /></OrderBy>
    vrací 4 řádky, ale když ten stejnej dotaz pustím v tom stejným seznamu pomocí list.GetItems, vrací 20 řádků, přičemž to jsou ty 4 řádky 5x zopakovaný? ... :/
    KERRAY
    KERRAY --- ---
    TENCOKACISTROMY: to se může hodit, dík
    TENCOKACISTROMY
    TENCOKACISTROMY --- ---
    TENCOKACISTROMY: Tak uz jsem (po nekolika hodinach, jak je to u SP zvykem) nasel reseni. Sice mi to tak trosku pripada, jako bezpecnostni dira ze strany SP, ale co se da delat.

    Problem je/byl v tom, ze konstruktor SPSite si z nejakyho duvodu neprebere aktualniho uzivatele v pripade, ze je vytvorena ve webservice, a musi se ji predat SPUserToken explicitne.

    Jake bylo moje prekvapeni, ze se takto da ziskat i SPUserToken systemu:
    public static SPUserToken GetSystemToken(SPSite site) {
    	SPUserToken token = null;
    	bool tempCADE = site.CatchAccessDeniedException;
    	try {
    		site.CatchAccessDeniedException = false;
    		token = site.SystemAccount.UserToken;
    	}
    	catch (UnauthorizedAccessException) {
    		SPSecurity.RunWithElevatedPrivileges(() => {
    			using (SPSite elevSite = new SPSite(site.ID))
    				token = elevSite.SystemAccount.UserToken;
    		});
    	}
    	finally {
    		site.CatchAccessDeniedException = tempCADE;
    	}
    	return token;
    }
    
    public static Microsoft.SharePoint.SPSite ConnectToSharepoint() {
    	string urlSharepointSite;
    	var ret = ConnectToSharepoint(out urlSharepointSite);
    	return ret;
    }
    public static Microsoft.SharePoint.SPSite ConnectToSharepoint(out string urlSharepointSite) {
    	urlSharepointSite = "http://www.domain.org";
    	var site = new Microsoft.SharePoint.SPSite( urlSharepointSite );
    	return site;
    }
    public static Microsoft.SharePoint.SPSite ConnectToSharepointAsSystem() {
    	string urlSharepointSite;
    	Microsoft.SharePoint.SPUserToken userToken = null;
    	using (var tmpSite = CSharepointNastroje.PripojitNaSharepoint( out urlSharepointSite )) {
    		userToken = GetSystemToken(tmpSite);
    	}
    	var site = new Microsoft.SharePoint.SPSite(urlSharepointSite, userToken);
    	return site;
    }


    Kdyz se zavola "ConnectToSharepointAsSystem()", tak mate pristup vsude.
    KUBIS
    KUBIS --- ---
    NECROMAN: jasne, se tesim... jsem zvedav co to bude umet...
    PETVAL
    PETVAL --- ---
    pujde v tom otevrit vice instanci workflow editoru? :)
    NECROMAN
    NECROMAN --- ---
    NECROMAN: ale stay tuned, bude to stat za to :)
    NECROMAN
    NECROMAN --- ---
    KUBIS: no byl jsem instuovan ze "nepropagovat zatim anonymni skupine lidi", takze si bude treba jeste tak pockat na verejnou betu... to bude tak tydnem odhadem
    KUBIS
    KUBIS --- ---
    NECROMAN: mame zajem podle me vsichni, dej vedet.)
    NECROMAN
    NECROMAN --- ---
    Prave vyvijime jeden produkt, ktery je takovy radove lepsi SharePoint Designer. Venku je prvni beta pro prvni sadu zajemcu volne k testovani a do tydne by mela byt venku i verejna beta.
    Kdyby mel nekdo zajem, tak dejte vedet, pridam podrobnejsi info.
    TENCOKACISTROMY
    TENCOKACISTROMY --- ---
    Sorry za cross-post.

    Mam nasledujici kod:
    using ( var site = new SPSite( myUrl ) ) {
    	using ( var web = site.AllWebs[0] ) {
    		// tady provadim jen cteci operace
    	}
    }
    


    Kdyz tenhle kod spustim z commandline, tak to funguje jak ma.
    Kdyz ho ale spustim z webservice, tak prestoze mam osetreny pres try { ... } catch { ... } volani tohodle kodu, tak vysledek je vzdy "401 UNAUTHORIZED" misto SOAP odpovedi.

    Webova aplikace bezi pod uctem, ktery na tu sharepoint site ma pristup (vyzkouseno prihlaseni pres web sharepointu). Ve web.config mam nastaveno <identity impersonate="true" userName="_my_username_" password="_my_password_" />. Kdyz jsem vyhodil ten kod a dal si do odpovedi "System.Security.Principal.WindowsIdentity.GetCurrent().Name", tak mi to vratilo toho spravnyho uzivatele.

    Webova sluzba bezi na stejnym pocitaci, jako bezi sharepoint site.

    Nenapada vas cim by to mohlo byt?
    Kliknutím sem můžete změnit nastavení reklam