कोड के नीचे टुकड़ा दे रहा है त्रुटि संदेश: "प्रचालन का समय समाप्त हो गया है" त्रुटि Sourse: System.Net.httpWebRequest.GetResponse (कम)System.Net.WebRequest - टाइमआउट त्रुटि
यह विधि एक यूआरएल बुला रही है और प्रतिक्रिया वस्तु ला रही है।
नोट: यह मेरा end..but में सभी कार्य ठीक जब मैं production..it के लिए एक ही कोड भेजने के समय oout त्रुटियों
public GetUpdatedInventoryUnitValues(Vehicle aeVehicle)
{
WebRequest oWebRequest = null;
StringBuilder oStringBuilder = null;
StreamReader oStreamReader = null;
dcDealerDetails = new Dictionary<string, string>();
MSRP = string.Empty;
NetPrice = string.Empty;
string strLine = string.Empty;
string strURL = GetUpdatedInventoryUnitValues.GetFormattedURL(aeVehicle);
try
{
/* Open the requested URL */
oWebRequest = WebRequest.Create(strURL);
oWebRequest.Method = "GET";
oWebRequest.ContentType = "application/xml";
/* Get the stream from the returned web response */
oStreamReader = new StreamReader(oWebRequest.GetResponse().GetResponseStream());
/* Get the stream from the returned web response */
oStringBuilder = new StringBuilder();
/* Read the stream a line at a time and place each one into the stringbuilder */
while ((strLine = oStreamReader.ReadLine()) != null)
{
/* Ignore blank lines */
if (strLine.Length > 0)
oStringBuilder.Append(strLine);
}
string[] tempArray = null;
string[] tempNextArray = null;
//Split string by semicolon as a separater
tempArray = Data.SplitString(oStringBuilder.ToString(), new char[] { ';' });
if (tempArray != null)
{
foreach (string invUnits in tempArray)
{
//Split string by '=' as a separater
tempNextArray = Data.SplitString(invUnits, new char[] { '=' });
if (tempNextArray != null && tempNextArray.Length == 2)
{
switch (tempNextArray[0].ToLower())
{
//case "msrp":
// MSRP = Data.RemoveDoubleCode(tempNextArray[1]);
// break;
case "netprice":
NetPrice = Data.RemoveDoubleCode(tempNextArray[1]);
break;
}
}
}
}
}
catch (Exception ex)
{
ErrorLog.ErrorMessage = ErrorLog.Separator;
ErrorLog.ErrorMessage = "Exception during posting data to another application .";
ErrorLog.ErrorMessage = "ERROR MESSAGE : " + ex.Message;
ErrorLog.ErrorMessage = "ERROR SOURCE: " + ex.StackTrace.ToString();
}
finally
{
if (oStreamReader != null)
{
oStreamReader.Close();
}
if (oWebRequest != null)
{
oWebRequest = null;
}
}
}
कृपया सुझाव है कि क्या मैं गलत कर रहा हूँ या लापता से पता चलता है?
क्या आपको यकीन है आपके अनुरोध अच्छा है और यह कोड से बाहर का समय-समाप्त नहीं करता है? मेरा मतलब है कि आपने इसे सीधे अपने ब्राउज़र में लॉन्च करने का प्रयास किया है? –
यह सब मेरे अंत में ठीक काम कर रहा है..लेकिन जब मैं उत्पादन के लिए एक ही कोड भेजता हूं .. यह समय के दौरान त्रुटियों को दिखाता है –
आपके विकास मंच और आपके उत्पादन मंच के बीच अंतर क्या हैं? क्या कोई फ़ायरवॉल या ऐसा कुछ है जो आपके अनुरोध को रोक सकता है? –