Tagged: SharePoint Toggle Comment Threads | Keyboard Shortcuts

  • Ali BaderEddin 2:48 am on February 24, 2010 Permalink | Reply
    Tags: AbsoluteUri, GetResponseUri, SharePoint, SPUrlZone, SPWebApplication, Url   

    SPWebApplication Url 


    I was trying to get the url of a SharePoint web application, but I couldn’t find a Url property for that class. Trying out several properties, I finally found an easy way to get the Url:

    string webUrl = webApp.GetResponseUri(SPUrlZone.Default).AbsoluteUri;

    where webApp is a reference to an object of type SPWebApplication. For example, here is a sample code that displays all web urls in the Farm (except for Central Admin WebApp).

    foreach (SPWebApplication webApp in SPWebService.ContentService.WebApplications)
    {
        string webUrl = webApp.GetResponseUri(SPUrlZone.Default).AbsoluteUri;
        Console.WriteLine(webUrl);
    }
     
    • Girish Kumar Meena 4:36 am on June 25, 2010 Permalink | Reply

      good one. I found your article after I found the solution myself, nevertheless its a nice read.

    • royaline 8:59 am on September 9, 2010 Permalink | Reply

      Thanks for this post. I’ve spent a lot of time trying to get the SPContext of a timer job. Referencing the AbsouteUri was far from thought. This solved my problem. :)

      Thanks,
      Rick

    • Ali BaderEddin 2:12 pm on September 9, 2010 Permalink | Reply

      Glad it helped..

    • Avinash Kumar 1:47 am on March 25, 2011 Permalink | Reply

      Thanks for the valuable post…. :)

    • Mainer 7:24 am on April 12, 2011 Permalink | Reply

      Thank you a lot!

    • Smnkuurg 2:07 am on September 8, 2011 Permalink | Reply

      Recorded Delivery toplist lolita
      rgg

    • Kmmsupyn 6:18 am on September 8, 2011 Permalink | Reply

      I’ve just graduated pedoclub illegal cp
      tgp

    • Nwmgpwom 10:58 pm on September 20, 2011 Permalink | Reply

      What university do you go to? Fuskem Nymphets :DDD

    • Ckaqpjfc 9:27 pm on September 22, 2011 Permalink | Reply

      I’d like to transfer some money to this account Lolita Toplist Bbs ilrnt

    • Ootuavaw 9:55 am on September 24, 2011 Permalink | Reply

      Enter your PIN Silver Teen Model
      %OOO

    • Pqvkxikj 11:01 pm on January 4, 2012 Permalink | Reply

      I can’t stand football Max Bbs Touzokudan Livedoor
      dora

    • Cmenfenj 11:02 pm on January 4, 2012 Permalink | Reply

      I’m on a course at the moment Dorki Info Loli
      qvzb

    • click here 8:53 am on May 27, 2012 Permalink | Reply

      I had been wondering if you ever considered modifying the design of your blog? Its well written; I really like what you have got to state. But maybe you can include a little more in the way of written content so people might connect to it better. Youve got an awful lot of wording for only having one or two photos. Maybe you can space it out better?

    • Ibraheem 7:36 pm on December 17, 2012 Permalink | Reply

      Thanks for the quick piece of info, saved me time instead of trying the multiple url options available :)

    • kesuburan lelaki 11:19 pm on July 15, 2014 Permalink | Reply

      On the other hand, the second one works the same way except that it only detects if ovulation has already passed.
      It is important to choose a good fertility clinic since you will work with
      them intimately if you happen to require their help. Calculate and study your menstrual cycle
      to determine the time when you are highly fertile and be sure to make love frequently within that fertility window.

    • compro oro 10:59 pm on July 21, 2014 Permalink | Reply

      If you are going for most excellent contents like myself, only
      visit this site daily as it gives feature contents, thanks

    • keyword rank checker 6:54 pm on July 24, 2014 Permalink | Reply

      Quality content is thhe main to bе a focus for thhe people tо pay a
      visit the web site, tҺɑt’s ԝhat tҺіs web site іs providing.

    • Evelyne 2:10 am on August 27, 2014 Permalink | Reply

      These tiny components can damage easily if a large amount of current
      passes through them. During World War II, Eisler was interned in England for being
      an illegal alien. Deliver A Presentation, most performers
      from the witout a doubt throughout-deal through the development of
      awful excessiveness amount the actual malfunction stacking wire small business, even worse.

    • buy grow lights, 11:41 am on September 7, 2014 Permalink | Reply

      It’s amazing designed for me to have a web page, which is good
      in favor of my know-how. thanks admin

    • дизайн 3:23 am on September 17, 2014 Permalink | Reply

      Simply wish to say your article is as surprising.
      The clearness on your post is just great and that
      i could assume you’re a professional in this subject.

      Fine together with your permission let me to snatch your RSS feed to stay up
      to date with approaching post. Thanks a million and please carry on the enjoyable work.

    • wincont.ru 4:38 pm on September 19, 2014 Permalink | Reply

      The juicing recipes company was back in peak performance?
      I am going to preserve thee juice’s valuable nutrients making them fell fuller longer in your juicing recipes using oonly one day and be with people we care about.

    • GTA 5 online money glitch 5:57 am on September 25, 2014 Permalink | Reply

      Thanks on your marvelous posting! I definitely enjoyed reading it, you may be a great author.
      I will remember to bookmark your blog and definitely will come back very
      soon. I want to encourage one to continue your great work, have a nice holiday weekend!

    • san ramon medical center 1:05 am on September 30, 2014 Permalink | Reply

      At this time it seems like Movable Type is the best blogging platform available right now.
      (from what I’ve read) Is that what you are using on your blog?

    • results page 3:56 pm on October 5, 2014 Permalink | Reply

      Nice post. I was checking continuously this blog and I am impressed!

      Extremely useful information specially the last part :) I care for such
      information a lot. I was looking for this certain info for a long time.
      Thank you and best of luck.

  • Ali BaderEddin 5:49 am on May 14, 2008 Permalink | Reply
    Tags: CAML, , SharePoint, Visual Studio, wss, ,   

    SharePoint CAML IntelliSense 


    So you’ve been having some pain trying to put IntelliSense into your frequent CAML (Collaborative Application Markup Language) files. For every new XML file you create, you have to go to its properties and then point to the target schema located at ../TEMPLATE/XML/wss.xsd.

    If you don’t know what I mean, usually, in order to display IntelliSense in an XML file opened through Visual Studio, we must link the XML file to an XSD. This is done by going to the file properties and linking to the XSD every time we open the XML file in Visual Studio.

    One way to avoid having to link to the XSD every time, is to add the file(s) to a Visual Studio project. However, what if you create CAML files so frequently that you don’t want to add them to a Visual Studio project every time?

    The best solution would be to load the XSD whenever a new XML file referencing it is opened; and I have the steps to do that!

    Under the Schemas folder of the Visual Studio installation folder (Ex: C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas), there is a file named Catalog.xml.

    Reference wss.xsd from it by adding the following tag:

    Make sure that href is pointing to the correct location of the wss.xsd file.

    <Schema href="C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/12/TEMPLATE/XML/wss.xsd" targetNamespace="http://schemas.microsoft.com/sharepoint/" />

    Enjoy!

    Ali B

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: