系统本地测试无错误 服务器上运行报错 错误信息如下:
Server Error in '/' Application.
--------------------------------------------------------------------------------Object variable or With block variable not set.
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.NullReferenceException: Object variable or With block variable not set.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:
[NullReferenceException: Object variable or With block variable not set.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +423428
HhSoft.wcc.RecordEdit.FillControl() +372
HhSoft.wcc.RecordEdit.DataBind() +757
publicHotle.Added.Add_T_Personal_integral_send.Page_Load(Object sender, EventArgs e) in F:\怀化移动酒店系统\publicHotle\publicHotle\Added\Add_T_Personal_integral_send.aspx.cs:87
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
目前知道是WITH块错误 但是怎么改问下各位大侠
Server Error in '/' Application.
--------------------------------------------------------------------------------Object variable or With block variable not set.
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.NullReferenceException: Object variable or With block variable not set.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:
[NullReferenceException: Object variable or With block variable not set.]
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +423428
HhSoft.wcc.RecordEdit.FillControl() +372
HhSoft.wcc.RecordEdit.DataBind() +757
publicHotle.Added.Add_T_Personal_integral_send.Page_Load(Object sender, EventArgs e) in F:\怀化移动酒店系统\publicHotle\publicHotle\Added\Add_T_Personal_integral_send.aspx.cs:87
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
目前知道是WITH块错误 但是怎么改问下各位大侠
解决方案 »
- sql server数据库被注入
- 在线求助 treeview的焦点问题!!!
- ViewState对内存的占用影响大吗?
- 在线急等(datagrid).....
- ------------------------------三层体系架构和MVC模式是否有一定的联系--------------------------------
- asp.net中 如何给带有参数的URL加密??? 高手来看看!~~~
- 关于asp.net和java的问题
- NeatUpload上传文件问题
- 大家用什么编辑软件编辑asp.net网页阿?
- 用Directory.CreateDirectory()方法建立映射盘中的目录失败?
- 急、急、急、急、在线等[新浪微博API如何获取用户信息,已经可以获取博文]
- 基类包括字段“page”,但其类型(System.Web.UI.Page)与控件(System.Web.UI.WebControls.DropDownList)
在本地又没问题你的web.config中authorization是怎么配置的?
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="sql1" value="server=wlj;database=hotle;uid=sa;pwd=sa" />
</appSettings> <connectionStrings/>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true" defaultLanguage="c#" />
<!--
通过 <authentication> 节可以配置 ASP.NET 用来
识别进入用户的
安全身份验证模式。
-->
<authentication mode="Windows"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="Off" >
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages validateRequest="false">
<controls>
<add tagPrefix="PageUC1" tagName="Header" src="~/Control/Header.ascx"/>
<add tagPrefix="PageUC1" tagName="Footer" src="~/Control/Footer.ascx"/>
<add tagPrefix="PageUC1" tagName="PageEditBar" src="~/Control/PageEditBar.ascx"/>
<add tagPrefix="PageUC1" tagName="HeaderIndex" src="~/Control/HeaderIndex.ascx"/>
<add tagPrefix="PageUC1" tagName="AdvancedSearch" src="~/Control/AdvancedSearch.ascx"/>
<add tagPrefix="HhSoft" namespace="HhSoft.wcc" assembly="HhSoft.wcc"/>
<add tagPrefix="HhSoft" namespace="HhSoft.wfw" assembly="HhSoft.wfw"/>
<add tagPrefix="HhSoft" namespace="HhSoft.wpc" assembly="HhSoft.wpc"/>
<add tagPrefix="HhSoft" namespace="HhSoft.wuc" assembly="HhSoft.wuc"/>
</controls>
</pages>
</system.web>
</configuration>
<allow users="*" />加上试试看