Qeb Archives: Debugging

Saib CAML Queries nyob rau ntawm lub sij hawm nrog ULS tuav

Kuv colleague, Ashsih Patel, sau tau li ib cov walk-through zoo piav tias yuav ua li cas saib CAML cov qab ntau yam SP queries uas li thaum ua hauj lwm hauv real-time uas siv cov kev tuav ULS.

Ntawm no yog cov intro:

Ua koj puas xav paub dab tsi cov queries CAML yog tseg los ntawm cov neeg rau zaub mov SharePoint?

Qhov tshij, troubleshooting thiab kev kawm lub hom phiaj, nws yuav tsis tau ib lub tswv yim phem. thaum kawg no, SQL Profiler twb tau pab peb kom troubleshoot heev txog tej teeb meem.

Muaj tej zaum yuav khoom siv nws txoj sia tab sis kuv figured tawm ib txoj kev ua uas tsis siv bucks ntxiv! Thiab nws tseem nyob ntawm no lawm...

Koj yuav nyeem tau qhov tseem tshaj no: http://www.bigapplesharepoint.com/pages/View-An-Insight.aspx?BlogID=68&rsource=pgblog&rtitle=caml.

</kawg>

Yooj yim thiab ceev thaum: Daws "Invalid URL Parameter” qhov teeb meem uas muaj UpdateListItems hauv lists.asmx

Thaum ua hauj lwm nrog cov UpdateListItems ntawm lists.asmx, Nws yog ib qho yooj yim uas ua kom muaj qhov yuam kev:

Invalid URL Parameter.

Qhov URL muaj muaj tus hais kom ua lossis tus nqi uas invalid. Thov khij qhov URL dua.

Koj yuav tau txais qhov yuam kev no thaum uas koj hnov qab xws li daim ID hauv cov daim ntawv uas teb yuav hloov.  Qhov no, zoo li ntau qhov kev pab no SP Web site, yog ib ntsis counterintuitive txij thaum koj yuav tau mus nrog tus ID tus ID attribute ntawm tus <Txujci> caij.  Thiab koj nyob nraum tsis tshiab ID thiab tej zaum koj yeej tsis xav ua tus thawj place.

No lub hnab ntawv uas tsis yog tshuaj ntxuav tes xwb:

<soapenv:Hnab ntawv xmlns:soapenv =' http://schemas.xmlsoap.org/soap/envelope/'>
  <soapenv:Lub cev>                      
    <UpdateListItems xmlns =' http://schemas.Microsoft.com/sharepoint/soap/'>                     
      <listName>{C712E2EA-54E1-47AD-9D99-1848C7773E2F}</listName>                     
        <tshiab>                     
         <Batch OnError ="Mus ntxiv">
          <Txujci ID ="1" Cmd ="Hloov tshiab">
            <Teb Name ="CooperativeLock">muab tub!</Teb>
            <Teb Name ="TUS ID">1</Teb>
          </Txujci>
        </Batch>                     
        </tshiab>                
      </UpdateListItems>             
  </soapenv:Lub cev>         
</soapenv:Hnab ntawv>

Yog hais tias koj tawm tus ID teb siv strip ces koj mam tau txais annoying "Invalid URL parameter" hais.

</kawg>

undefinedSubscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

 

Quick Fix: "Lub npe qha hom lub$ Resources:ReportServerResources … tsis xyaw … cov cim tshwj xeeb”

Kuv twb tau yos ib co tu tuaj ib SharePoint 2010 kawm ntawv thiab yog ib qhov teeb meem txog tu tej koom ib corrupt / incorrectly ntsia SQL neeg rau zaub mov daim ntawv qhia txog cov kev pab no.  Qhov no sawv thaum ib tus kuv lug txhawb cov miv sim kom tseg tau ib qhov chaw li ib template thiab ces tsim tsim tau ib qhov chaw tshiab raws li ntawd template.  Txuag tau rau lub lag luam ua haujlwm fine, tab sis, thaum twg nws sim ua kom muaj qhov chaw tshiab, SharePoint tso tawm kom pom kev ua yuam kev hais nram qab no:

Yuam kev

Cov hom kawm ntawd npe ' $Resources:ReportServerResources,DataSourceContentTypeName;' tsis muaj: \ / : * ? “ # % < > { } | ~ & , dua ob tug sib law liag (..), los yog kev cim tshwj xeeb xws li ib tug tab.

Ntawm no yog ib qho screen CAP ib tug:

 

image

Muaj ib hom kawm ntawd saib nyob rau hauv lub site thiab nrhiav tau qhov no:

image

Cov kawm ntawd txoj kev no tsis zoo hais meej.

No qhov teeb meem rau nkawd tuaj heev nyob rau lub Internets thiab muaj tsis kom zoo tau muaj kev pom zoo nkaus xwb thiaj li daws tau.  Kuv pom ib ke rooj uas mapped rau lub npe phem cov hom rau cov hom npe ntawm no: http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010programming/thread/cb03e866-8184-4943-acfe-cafffa1b8b7a.  Kuv manually tshiab lawv thusly:

image

(BrightStarr lub npe yog yeem obviously, tab sis nws tsis tau ua Luag nyav )

Qhov no pub kuv mus tsim ib cov template tshiab thiab tsis khis txhua yam nyob rau lwm qhov chaw, xws li ib co khoom PerformancePoint neeg rau zaub mov uas yog ib pab neeg txawv kiag li tau ua haujlwm rau.  Kuv twb ces tau los ua ib qhov chaw tshiab rau lub template.  Zoo!

Kuv tsis paub hais tias qhov no yog ib tug 100% tov, tab sis, nws tau kuv thiab koom tes sawv daws nrog yav tas los no annoying yuam kev.  Yog kuv nrhiav tau tej yam tshiab, Kuv mam li tswg ib qho hloov tshiab.  Kuv nervousness stems ntawm tus fact tias cov npe tsis raug lawm ua tus xub place thiab kho qhov lub npe zaub, Kuv yuav tsis kov lub npe nrog. 

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Txoj kev sai thiab yooj yim: Debugging VS 2010 Kua txiag

Nrig txog kev pom Studio 2010 ntaub ntawv qhia txog nyuaj-rau-debug kom raug thaum txiag ib zaug.  Ib txoj kev sai thiab yooj yim txoj kev los ua ib co heev ntxhib debugging yog pov raug teev hais qhov xyuas koj tus kheej.  Nrig txog kev pom Studio yuav qhia lawv nyob hauv cov zis console.

Xav txog cai no me ntsis:

image

Yog no feature scoped rau ib daim ntawv thov Web site, kawm ntawv yuav tsum thov.  Yog koj sim thiab reference ib thaj chaw, tej zaum koj yuav tau qhov yuam kev tsis meej xwm:

Yuam kev tshwm sim txiag kauj ruam 'Ntxiv kua': Kwv siv tsis tau teem rau kev lom los ntawm ib tug kwv.

Txawm li cas los, yog muab ib tug tshiab kos thiab dhau ib txoj hlua kom cov constructor, koj tau txais kev pab tau ib nyuag tshaj lus:

image

Nws yog ib tug txheej txheem uas crude, tab sis, zoo nkauj yoo mov thiab yooj yim.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

Siv owssvr.dll rau zaub pab tau kawm ntawv nyob rau hauv SP2010

Yog nyeem forums no tav su thiab kawm tej yam tshiab (tej yam uas yuav tshwm sim tau yuav luag txhua hnub).  Qhov no yog qhov posting:

http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/1cbdb0b4-eeda-4c61-9a52-da6212eebec5/

Yeej, koj yuav tau nthuav qhia cov ncauj lus txog kev kawm ntawv ib tug los invoking owssvr.dll tiv thaiv (h/t rau Bil Simser thiab John Timney).

Kuv tau muab qhov no ib zaug hauv ib leej ib tug NTXHUAB thiab ib lub chaw SP2010.  Ua nws haujlwm fine NTXHUAB puag ncig.  Txawm li cas los, nyob rau lub 2010 ib puag ncig, Internet explorer tsis xav mus download tau lub XML:

image

Raws li koj tau pom, Kuv paub tias nws muaj 21k los yog cov ntsiab lus ntawd.  Txawm li cas los, Thaum twg kuv clicked txuag tau khawm, Kuv tau txais:

image

(Tsis tau qhib cov qhov Web site no hauv Internet.  Cov kawm ntawv thov yog tog twg los luv los yog nrhiav tsis tau.  Thov koj sim rov tom qab.)  

Raug rho tawm kuv haujlwm tuaj Fiddler thiab thiab kuv twb tau pom cov qhov tso zis, tsis tas li ntawd.  No mas, xws li tej zaum yuav muaj ib yam dab tsi uas zom hauv SP2010 txwv tsis pub owssvr.dll kis nws cov XML payload ntawv nws xav li.  Los sis, Kuv lub chaw SP2010 no xwb kuj txawj tso dag.

Xav tias yog nws nthuav...

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin