问题推出了ADO.Net数据服务应用到IIS [英] Problem rolling out ADO.Net Data Service application to IIS
问题描述
我增加了ADO.Net数据服务查找功能,以现有的Web页面。从Visual Studio中运行时,一切都很正常,但是当我摇出来给IIS,我得到以下错误:
I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error:
请求错误
处理请求的服务器遇到错误。请参阅服务器日志的更多细节。
Request Error
The server encountered an error processing the request. See server logs for more details.
我想显示的默认页面,当得到这样即使如:
I get this even when trying to display the default page, i.e.:
我已经在服务器上安装3.5 SP1。
I have 3.5 SP1 installed on the server.
我在想什么,并且服务器日志是指的什么?我找不到任何进一步的错误消息。
What am I missing, and which "Server Logs" is it refering to? I can't find any further error messages.
有没有在事件查看器日志(系统或应用程序),并没有什么比让其他IIS日志:
There is nothing in the Event Viewer logs (System or Application), and nothing in the IIS logs other than the GET:
2008-09-10十五时20分十九秒10.7.131.71 GET /FFLookup.svc - 8082 - 10.7.131.86 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US)+AppleWebKit/525.13+(KHTML,+like+Gecko)+Chrome/0.2.149.29+Safari/525.13 401 2 2148074254
2008-09-10 15:20:19 10.7.131.71 GET /FFLookup.svc - 8082 - 10.7.131.86 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US)+AppleWebKit/525.13+(KHTML,+like+Gecko)+Chrome/0.2.149.29+Safari/525.13 401 2 2148074254
没有堆栈跟踪返回。我得到的唯一回应是请求错误如上所述。
There is no stack trace returned. The only response I get is the "Request Error" as noted above.
感谢
帕特里克
推荐答案
在以冗长显示来自数据服务所造成的错误,你可以把你的DataService上面的定义如下标签:
In order to verbosely display the errors resulting from your data service you can place the following tag above your dataservice definition:
[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
这将然后在浏览器窗口中显示的错误以及堆栈跟踪。
This will then display the error in your browser window as well as a stack trace.
在除了这个DataService的抛出的所有异常的HandleException方法,因此,如果您实现这个方法对你的DataService类,你可以把一个破发点就可以了,看到了异常:
In addition to this dataservices throws all exceptions to the HandleException method so if you implement this method on your dataservice class you can put a break point on it and see the exception:
protected override void HandleException(HandleExceptionArgs e)
{
try
{
e.UseVerboseErrors = true;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
这篇关于问题推出了ADO.Net数据服务应用到IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!