2013-02-22 20 views
5

मैं MVC 3 उपयोग कर रहा हूँ दृश्य स्टूडियो 2010 और सी # 4.0 के साथ। मेरा एप्लिकेशन विजुअल स्टूडियो से आईआईएस एक्सप्रेस के तहत सही ढंग से काम करता है और जब रिमोट प्रोडक्शन आईआईएस 7.5 सर्वर पर तैनात किया जाता है।रूटिंग त्रुटि HTTP 404 त्रुटि पैदा

जब मैं अपने विकास सिस्टम पर पूर्ण आईआईएस 7.5 सर्वर का उपयोग करने के लिए स्विच मैं अचानक मेरी नियंत्रकों में से दो में कार्रवाई के लिए HTTP 404 त्रुटि प्राप्त करने के लिए शुरू कर दिया है। अन्य नियंत्रक सही ढंग से काम करते हैं। यह या तो विजुअल स्टूडियो या सीधे आईआईएस से आवेदन चला रहा है।

मुझे कोई विन्यास अंतर देख सकते हैं।

नियंत्रकों है कि इस व्यवहार का प्रदर्शन किया जाता है से एक है:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.Mvc; 
using System.Configuration; 
using Mbrrace.ApplicationServices.Validation; 

namespace Mbrrace.WebUI.Areas.Validation.Controllers 
{ 
    public class ValidationController : Controller 
    { 
     // 
     // GET: /Validation/Validation/ 

     [HttpGet] 
     public JsonResult PostcodeCheck([Bind(Prefix = "perinatalView")]AddressViewModel model) 
     { 

      // postcode has already been checked for correct format 
      // now look it up to see if it exists 

      if (PostcodeChecks.CheckPostcodeExists(ConfigurationManager.ConnectionStrings["CommonCodeEntities"].ConnectionString, model.Postcode)) 
      { 
       return Json(true, JsonRequestBehavior.AllowGet); 
      } 

      return Json("This postcode was not found in the database", JsonRequestBehavior.AllowGet); 

     } 

     [HttpPost] 
     public JsonResult PostcodeExtendedCheck(String Postcode) 
     { 

      // check if it exists or of it's sector exists (all but last two characters 

      string message = PostcodeChecks.PostcodeExtendedCheck(ConfigurationManager.ConnectionStrings["MbrraceCommonCodeEntities"].ConnectionString, 
       Postcode, Postcode.Substring(0, Postcode.Length - 2)); 
      string success = (message.Length == 0) ? "OK" : "NO"; 
      var result = new { Success = success, Message = message }; 

      return Json(result, JsonRequestBehavior.AllowGet); 
     } 

     public class AddressViewModel 
     { 
      public string Postcode { get; set; } 
     } 

    } 
} 

यह बर्ताव करता है आईआईएस एक्सप्रेस में होने की उम्मीद है और एक आईआईएस के लिए तैनात किया है। जब आईआईएस डिबगिंग के लिए प्रोजेक्ट से जुड़ा होता है तो यह 404 त्रुटि फेंकता है।

किसी को भी क्यों 404 त्रुटियों उत्पन्न किया जा रहा है पर किसी भी प्रकाश डाला कृपया कर सकते हैं?

+0

क्या आपने एप्लिकेशन पूल में एकीकृत करने के लिए प्रबंधित पाइपलाइन मोड सेट किया है? – levelnis

+0

धन्यवाद, हाँ, हमने यह किया है कि "32-बिट ऐप्स को अनुमति दें" की जांच करें –

+0

क्या आप उन नियंत्रकों के लिए मार्ग दिखा सकते हैं? क्या कार्यों पर कोई विशेषता है? कोई कस्टम हैंडलर चल रहा है? – levelnis

उत्तर

0

पहली बात मैं सोच रहा हूँ IIS configuration बारे में है। एकीकृत मोड में कॉन्फ़िगर साइट के लिए Application Pool है?

आप भी global.asax एक Application_OnError में जोड़ सकते हैं और वहाँ में जाँच करने के लिए कोशिश कर सकते हैं server.GetLastError

एक और विकल्प झलक उपयोग करने के लिए देखने के लिए क्या मार्ग समस्या आप हो सकता है (अगर यह एक मार्ग समस्या है) होना चाहिए

इसके बाद यदि आपको समस्या नहीं मिलती है तो आईआईएस कॉन्फ़िगरेशन के कुछ और विवरण पोस्ट करें

संबंधित मुद्दे