में targetFramework से संबंधित कॉन्फ़िगरेशन त्रुटि मैंने विजुअल स्टूडियो 2015 में एक एमवीसी वेबसाइट बनाई है और यह मेरे लोकहोस्ट में काम करता है। लेकिन जब मैंने अपनी वेबसाइट प्रकाशित की और मेरे मेजबान में डाल दिया, तो यह काम नहीं करता है। मेरी web.config मेंweb.config
Server Error in '/' Application.
Configuration Error
Parser Error Message: The 'targetFramework' attribute in the element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, ''). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: G:\xxx\xxx.com\httpdocs\web.config Line: 24
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
संबंधित भागों:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
और त्रुटि के साथ इस हिस्से:
<system.web>
<authentication mode="None" />
<customErrors mode="Off" />
<compilation debug="true" targetFramework="4.6" />
<httpRuntime targetFramework="4.6" />
</system.web>
मेरी वेबसाइट के गुण:
यह मुझे इस त्रुटि सूचना देता ,210और NuGet पैकेज प्रबंधक:
EntityFramework संदर्भ गुण:
डिफ़ॉल्ट वेब साइट मूलभूत सेटिंग्स: (ईमानदारी से कहूं तो मैं यकीन नहीं है कि मैं एक नया जोड़ना चाहिए नहीं कर रहा हूँ वेबसाइट (मेरी वेबसाइट) यहां।)
मेरे स्थापित .net चौखटे:
मेरे विधि प्रकाशित:
मैं इंटरनेट पर इस समस्या की जांच की है और मैं मेरी समस्या से संबंधित कई लिंक मिल गया है: Asp.net MCV4 framework issue। इस लिंक में, वहाँ दो मुख्य प्रस्तावों हैं:
असल में IIS में इस संकलन टैग
अद्यतन करने अनुप्रयोग पूल बदल रहा, मैं इस टैग को बदलने की कोशिश की है लेकिन यह नहीं करता है बदल नहीं है तब मैंने अपने एप्लिकेशन पूल को नियंत्रित किया है लेकिन यह अद्यतित लगता है।
मैं अपने मेजबान प्रदाता कहा जाता है और मैं मेरी समस्या समझा दिया है। वे कहते हैं कि यह त्रुटि उनके सर्वर से संबंधित नहीं है।
मुझे क्या करना चाहिए? इसके लिए समाधान क्या है?
अग्रिम धन्यवाद।
क्या नेट फ्रेमवर्क 4.6 सर्वर पर स्थापित है? – DavidG
@ डेविड जी ईमानदार होने के लिए, मैंने यह मेरे मेजबान प्रदाता से नहीं पूछा था। लेकिन स्थानीयहोस्ट में नेट फ्रेमवर्क 6 स्थापित है। मैं अपनी तस्वीर जोड़ रहा हूँ। – rockenpeace
तो क्या आप कह रहे हैं कि जब आप अपने स्थानीय आईआईएस में प्रकाशित होते हैं, तो यह काम नहीं कर रहा है? या बस जब आप अपने होस्टिंग प्रदाता को प्रकाशित करते हैं? – DavidG