English 中文(简体)
C#和ASP撰写的网站。 NET MVC正在编纂具有视觉基本特征的ASCX网页。
原标题:Website written in C# and ASP.NET MVC is compiling ASCX pages with Visual Basic

我正在协会中开发一个网站。 使用C#.C的NET MVC在我的机器上操作了罚款,但是当我把它装到生产服务器时,它会产生一个错误,试图介绍主页。

造成这一错误的原因是,协会系统正在使用视觉基础汇编成像页,因为所有代码都在C#。

我如何确定这一点?

问题回答

贵方的产量是否在 app中达到了以下足迹?

<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v3.5"/>
    <providerOption name="WarnAsError" value="false"/>
</compiler>

另外,如果你证实你的主页/意见中包含的内容。

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<YourType>" %>

以及

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<LoginPageView>" %>

语言特征?

我发现,缺省汇编者的语言需要在网上填写。

由于某种原因,我的项目(由视觉演播室模板建造)没有具体说明这一点。 看来,当在当地运行时,协会系统正确推断出缺省语,但在使用远程服务器时,它就违背了视觉基本原理。

缺省编辑语言如下:

<compilation
   defaultLanguage="c#"
/> 

汇编标本在系统中。 处于组合标签的网络标签。 请注意,缺省有L资本。 并且注意到,通常本信标本会有许多其他信息,因此,你只需要加上违约的Language属性。

我昨天曾有过这个问题,事实上......

在您的档案中,你需要把控制指令列入网页顶端的适当语言:

<%@ Control Language="C#" ... %>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签