文化名称ne-NP不受支持

时间:2014-08-18 05:12:28

标签: c# asp.net visual-studio-2010 visual-studio-2008 culture

我必须托管一个用c#.net,Asp.net和后端构建的应用程序作为oracle。此应用程序已托管在其中一个服务器中并且运行顺利。我已将所有文件和文件夹复制到另一台服务器中,其配置与当前正在运行的服务器的配置相同。

IIS的版本是6.0,机器上运行的是Windows Server 2003。当我部署应用程序时,我在浏览时收到以下错误消息。任何人都可以帮我解决这个问题。

 Culture name 'ne-np' is not supported.
Parameter name: name
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Culture name 'ne-np' is not supported.
Parameter name: name

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentException: Culture name 'ne-np' is not supported.
Parameter name: name]
   System.Globalization.CultureTableRecord..ctor(String cultureName, Boolean useUserOverride) +7481609
   System.Globalization.CultureTableRecord.GetCultureTableRecord(String name, Boolean useUserOverride) +213
   System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) +45
   System.Web.HttpServerUtility.CreateReadOnlyCultureInfo(String name) +200
   System.Web.UI.Page.set_Culture(String value) +194
   _Default.OnPreInit(EventArgs e) +232
   System.Web.UI.Page.PerformPreInit() +31
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

2 个答案:

答案 0 :(得分:1)

在aspx页面中声明文化:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="xxx.aspx.cs" Inherits="xxx" Culture="ne-NP" %>

答案 1 :(得分:0)

在web.config中添加以下行,因此无需在每个页面中指定

<globalization uiCulture="ne" culture="ne-NP" requestEncoding="utf-8" responseEncoding="utf-8" />