Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:05:57+00:00 2026-06-05T22:05:57+00:00

At the moment I am trying to HTTP response request in my Sharepoint WarmUp

  • 0

At the moment I am trying to HTTP response request in my Sharepoint WarmUp script, however for this, I will have to use this code

 using (System.IO.StreamReader file = new System.IO.StreamReader(filePath))
                while ((line = file.ReadLine()) != null)
                {
                    try
                    {
                        WebRequest request = WebRequest.Create(line);
                        request.Proxy = null;

                        if ((userName == null) || (userName == ""))
                        {
                            request.Credentials = CredentialCache.DefaultCredentials;
                        }
                        else
                        {
                            CredentialCache myCache = new CredentialCache();
                            myCache.Add(new Uri(line), "NTLM", new NetworkCredential(userName, password, DomainName));
                            request.Credentials = myCache;
                        }

                        HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                        using (Stream dataStream = response.GetResponseStream())
                        using (StreamReader reader = new StreamReader(dataStream))
                        {
                            string responseFromServer = reader.ReadToEnd();
                            reader.Close();
                            dataStream.Close();
                            response.Close();
                        }

                        Thread.Sleep(2000);
                    }

I am not suppose to use any User Account to get response, however I can use Default Credentials that only works when am logged in at server, otherwise they wont gonna work i guess.

Is there any other way of doing it, can’t use powershell as its MOSS not sharepoint 2010

cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:05:58+00:00Added an answer on June 5, 2026 at 10:05 pm

    You CAN use Powershell for the warm-up script. You can call stsadm command, make HTTP requests and even use the server object model once you do the proper imports.

    This post uses powershell to retrieve available sites using stsadm. Once the script retrieves this list, it instantiates a WebClient object and hits each site URL.

    If you only want to hit the sites in a list, you can simply use a WebClient object to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use embedded ActiveMQ broker for unit testing, as explained here: http://activemq.apache.org/how-to-unit-test-jms-code.html
I'm trying to post to Blogger using idHTTP component, however, I'm getting HTTP/1.0 400
At the moment I'm trying to figure out how use default and custom settings
Trying to write a code at the moment that basically tests to see if
http://pastebin.com/rXbeKqAa Hi all I have been trying to parse the above JSON into a
Just trying to implement these buttons at the moment: http://web.archive.org/web/20110721191046/http://particletree.com/features/rediscovering-the-button-element/ Can't decide which to
I'm trying to make a submit button on my form look like this: http://nulaena.si/temp/triangle.jpg
This is a snippet of what I'm trying to do at the moment: var
Im trying to recreate this page http://psdtowp.com/order-now but for another purpose, Im very new
I'm trying to use hibernate with spring 3 mvc but at the moment I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.