发布时母版页无法加载类型错误 [英] Master Page getting Could Not Load Type error when publishing

查看:115
本文介绍了发布时母版页无法加载类型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一切正常,都可以在本地找到,但是当我将asp.net应用程序发布到远程服务器时,出现以下错误:

Everything works find locally, but when I publish my asp.net application to a remote server I get the following error:

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

    Parser Error Message: Could not load type 'JournalPages.MasterMain'.

    Source Error: 

    Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Main.master.cs" Inherits="JournalPages.MasterMain" %>
    Line 2:  
    Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

Source File: /journalpages/Main.Master    Line: 1 

在具有主页的任何页面上都会发生这种情况.我使用了Reflector来查看bin目录中的程序集,并且类型都在那里.有什么想法吗?

This happens on any page with a master page. I used Reflector to look at the assembly in the bin directory and the types are all there. Any ideas??

推荐答案

好吧,事实证明他们没有将IIS中的站点文件夹设置为应用程序.一旦他们做得很好,就可以了.

Ok it turns out they hadn't set up the site folder in IIS to be an Application. Once they did all worked well.

这篇关于发布时母版页无法加载类型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆