system.web.dll中发生了'system.web.httpexception'类型的异常,但未在用户代码中处理 [英] An exception of type 'system.web.httpexception' occurred in system.web.dll but was not handled in user code

查看:1194
本文介绍了system.web.dll中发生了'system.web.httpexception'类型的异常,但未在用户代码中处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在global.asax页面中为一些数据表连接添加以下代码。

i add the below code for some datatable connection in global.asax page.

void Application_Start(object sender, EventArgs e)
{
string destinationConfigName = "development";
IDestinationConfiguration destinationConfig = null;
bool destinationIsInitalized = false;
if (!destinationIsInitalized)
{
destinationConfig = new SAPDestinationConfig();
destinationConfig.GetParameters(destinationConfigName);
RfcDestinationManager.RegisterDestinationConfiguration(destinationConfig);
destinationIsInitalized = true;
}
}







but i add the above code below error is occured. 
 
 
Error:
An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code

Additional information: Request is not available in this context





我尝试过:



搜索一些解决方案,但没有一个解决方案解决了这个问题。如何修复它。



What I have tried:

search some solutions but none of the solutions fix this issue.how to fix it.

推荐答案

错误说出来确切地说,您无法在此处访问Request对象。请参阅 IIS7集成模式:请求不可用在这个背景下,Application_Start中的异常 - Mike Volodarsky的博客 [ ^ ]了解更多详情。
The error says it exactly, you cannot access the Request object here. See IIS7 Integrated mode: Request is not available in this context exception in Application_Start - Mike Volodarsky's Blog[^] for more details.


这篇关于system.web.dll中发生了'system.web.httpexception'类型的异常,但未在用户代码中处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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