vs2008的网页应用程序调试与IIS发布情况下出现的差异

来源:百度知道 编辑:UC知道 时间:2024/05/30 14:25:49
网页应用程序在VS2008调试中无任何报错,但是放到IIS内发布后就报错。
主要报错内容为:Microsoft JScript 运行时错误: 缺少对象
附上程序代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lookup.aspx.cs" Inherits="电子消缺台账_网页版_.lookup" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>电子消缺台账</title>
</head>
<body>
<form id="form1" runat="server">
<script language="javascript" type="text/javascript" src="/datepicker/WdatePicker.js">&l

Microsoft JScript 运行时错误: 缺少对象

应该是Jscript到不到方法

可能是你引用的JS的路径放到IIS上就访问不到

可能你的IIS不支持ASP.Net,试试在开始菜单->Visual Studio 2008->命令提示符->执行 aspnet_regiis -i -enable

你引用的JS是放在主目录下吗?
如果是放在虚拟目录的主目录下,那js的路径的第一个/要去掉。

泛泛而问,泛泛而答。