ASP.Net中的WebService [英] WebService in ASP.Net
问题描述
大家好,
最近我在asp.net开发了一个 WebService应用程序。 我希望从Excel文件(已经打开/正在运行)中读取值,在IIS 5.1中创建虚拟目录之前,它可以正常工作。但是当我在IIS中创建虚拟目录时,我在读取excel文件(已经打开/正在运行)时收到错误Microsoft Jet数据库引擎无法打开文件。它已经由另一个用户独占打开,或者您需要获得查看其数据的权限。。请让我知道我面临的问题是什么。这是紧急的。
先谢谢。
Hi to All,
Recently i was developed a WebService Application in asp.net. In that i want read values from an Excel file (Which is already opened/running), Before creating virtual directory in IIS 5.1 it is working perfectly. But when i was created virtual directory in IIS i recieved an error while reading excel file (Which is already opened/running) is "The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data." . Please let me know what is the problem i was facing. It is Urgent.
Thanks in Advance.
推荐答案
因为花时间阅读整个文件并保持文件处于打开状态。
完成Excel阅读后使用使用处理。
还要检查连接和文件状态,然后再读取它是否关闭。
如果您仍然遇到困难,请告诉我。
Because its taking time to read the whole file & keep file in open state.
Use "using" for disposing after completion of Reading from Excel.
Also check connection & file state before reading whether its closed or not.
Let me know if you still find difficulties.
这篇关于ASP.Net中的WebService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!