Arkivji tal-Kategorija: Debugging

View CAML Mistoqsijiet fil-ħin reali ma ULS Viewer

Kollega tiegħi, Ashsih Patel, wrote up a nice walk-through describing how to see the CAML behind various SP queries that happen in the course of business in real-time using the ULS viewer.

Hawn l-intro:

Did you ever want to know what CAML queries are executed by SharePoint Server?

Well, for troubleshooting and learning purpose, it is not a bad idea. Wara kollox, SQL Profiler has been helping us troubleshoot a lot of issues.

There may be products out there but I figured out a way to do it without spending extra bucks! And here it is…

Tista 'taqra l-ħaġa sħiħa hawn: http://www.bigapplesharepoint.com/pages/View-An-Insight.aspx?BlogID=68&rsource=pgblog&rtitle=caml.

</aħħar>

Quick u sempliċi: Solve "Invalid URL Parametru” problema bil UpdateListItems fil lists.asmx

When working with UpdateListItems via lists.asmx, it’s easy to generate the error:

Invalid URL Parameter.

The URL provided contains an invalid Command or Value. Please check the URL again.

You can get this error when you forget to include ID in the the list of fields to update.  Dan, like a lot of these SP web services, is a bit counterintuitive since you need to include the ID in the ID attribute of the <Method> element.  And you’re not updated ID and probably never want to in the first place.

This SOAP envelope works:

<soapenv:Xmlns Pakkett:soapenv ='http://schemas.xmlsoap.org/soap/envelope/'>
  <soapenv:Korp>                      
    <UpdateListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>                     
      <Jwaqqgħu l-weraq>{C712E2EA-54E1-47AD-9D99-1848C7773E2F}</Jwaqqgħu l-weraq>                     
        <updates>                     
         <Batch OnError="Continue">
          <Method ID="1" Cmd="Update">
            <Field Name="CooperativeLock">locked!</Field>
            <Field Name="ID">1</Field>
          </Method>
        </Batch>                     
        </updates>                
      </UpdateListItems>             
  </soapenv:Korp>         
</soapenv:Envelop>

If you strip out the ID field reference then you’ll get the annoying “Invalid URL parameter” message.

</aħħar>

undefinedAbbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

 

Quick jiffissaw: "L-isem tip kontenut" $ Riżorsi:ReportServerResources … ma jistax ikun fiha … karattri speċjali”

I’ve been spending some time cleaning up a SharePoint 2010 site and one of the cleanup issues relates to a corrupt / incorrectly installed SQL Server Report Services issue.  The issue arose when one of my colleagues tried to save a site as a template and then create create a new site based on that template.  The save operation worked fine, but when she tried to create the new site, SharePoint displayed the following error message:

Error

The content type name ‘$Resources:ReportServerResources,DataSourceContentTypeName;’ cannot contain: \ / : * ? " # % < > { } | ~ & , two consecutive periods (..), or special characters such as a tab.

Here’s a screen cap:

 

image

I had a look at the content types in the site and found this:

image

Those content types are clearly unhealthy.

This issue seems to come up a lot on the Internets and there doesn’t seem to be a single consensus on how to solve it.  I found a handy table that mapped the bad content type names to good content type names here: http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010programming/thread/cb03e866-8184-4943-acfe-cafffa1b8b7a.  I manually updated them thusly:

image

(BrightStarr in the name is obviously optional, but it can’t hurt Tbissem )

This allowed me to create a new template and didn’t break anything on the other sites, including some PerformancePoint Server stuff that a completely different group of people were working on.  I was then able to create a new site on the template.  Success!

I am not sure this is a 100% solution, but it got me and everyone involved past this annoying error.  If I find anything new, I’ll post an update.  My nervousness stems from the fact that these names shouldn’t be wrong in the first place and by fixing the display name, I am not touching the internal name. 

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

Quick u Easy: Debugging VS 2010 Użu Soluzzjoni

Visual Studio 2010 rapporti hard-to-debug żbalji matul l-iskjerament xi drabi.  A mezz rapidu u faċli biex jagħmlu xi debugging raffa ħafna huwa li tarmi eċċezzjonijiet tiegħek jismu.  Visual Studio se juru lilhom fl-output console.

Ikkunsidra dan daqsxejn ta 'kodiċi:

image

Jekk din il-karatteristika huwa scoped għal applikazzjoni web, sit se jkun null.  Jekk inti tipprova u jagħmlu riferenza għal proprjetà ta 'sit, inti ser tingħata l-iżball ambigwa:

Error occurred in deployment step ‘Add Solution’: Referenza Għan mhux stabbiliti għal istanza ta 'oġġett.

Madankollu, jekk tarmi Eċċezzjoni ġdida u tgħaddi string għall-kostruttur, ikollok messaġġ ftit aktar utli:

image

Huwa ta 'teknika mhux raffinat, iżda pjuttost veloċi u faċli.

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

Uża owssvr.dll li juri informazzjoni Site Utli fl SP2010

I kien qari forums dan wara nofsinhar u tgħallimt xi ħaġa ġdida (xi ħaġa li jiġri kważi kuljum).  Dan huwa l-istazzjonar:

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

Bażikament, inti tista 'tikseb xi informazzjoni interessanti dwar is-sit bl-invokazzjoni owssvr.dll kontriha (h / t għal Esplorazzjoni Simser u John Timney).

I taw dan jipprova fil kemm MOSS u ambjent SP2010.  Hija ħadmet multa fl-ambjent MOSS.  Madankollu, fil- 2010 ambjent, Internet Explorer ma riedx li tniżżel il-XML:

image

Kif tistgħu taraw, Naf li kellha 21k jew hekk ta 'kontenut.  Madankollu, meta I għafast il-buttuna Save, I ltqajna:

image

(Kapaċi li tiftaħ dan is-sit Internet.  Is-sit mitlub huwa jew mhux disponibbli jew ma jistgħux jinstabu.  Jekk jogħġbok erġa 'pprova aktar tard.)  

I fired up Fiddler u u I kien kapaċi li tara l-output, madankollu.  Jidher bħal jista 'jkun hemm xi ħaġa jiġri fil SP2010 li jipprevjeni owssvr.dll milli tittrażmetti payload XML tagħha il-mod trid.  Jew, ambjent SP2010 tiegħi huwa biss jaġixxi umoristiċi.

Ħsibt li kien interessanti ...

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin