ASP.NET网站智能卡读卡器DLL路径错误 [英] ASP.NET Website Smart Card Reader dll path error

查看:67
本文介绍了ASP.NET网站智能卡读卡器DLL路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用智能卡读卡器进行个人信息跟踪。我已经在网站bin文件夹中包含了读卡器的所有dll和扩展程序并构建了解决方案。

但是当我调用卡片阅读器的对象时,它会出现错误,例如,



Hi,
I am using smart card reader for personal information tracking.I had included all the dll and Extensions for the card reader inside website bin folder and bulid the solution.
But when i am invoking the object for card reader it gives an error like,

Could not find a part of the path 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\hims\ba0ddc3b\bd494651\assembly\dl3\5e365102\0047b093_cf50d001\Extensions'





然后我将相同的dll和扩展文件夹复制到上面的位置。

现在创建对象并成功读取数据。

但问题是现在我复制临时文件夹中的文件,所以一旦我停止了应用程序,它将丢失所有东西,并且将无法正常工作。



当我在服务器中托管它时当我从临时文件夹中读取时,我可以映射吗。



任何人都可以帮助我创建正确的结构,这些dll可以完美地读取开发系统和当我将它托管在服务器上。



托管时,应用程序将在服务器中,客户端将使用智能卡读卡器设备。



请帮我映射这些东西



提前感谢



then i copied the same dll and extension folder to the above location.
now the object is created and data read successfully.
But the problem is that now i copied the files in temp folder so once i stopped the application it will loss every thing and will not work.

Also when i host it in server how can i map when its reading from temp folder.

can any one help me to create the correct structure for these dll to be read perfectly both developement system and when i host it on server.

When hosted the application will be in server and smart card reader device will be used by the client .

Please help me to map these things

thanks in advance

推荐答案

您需要使用Project-> Add Reference添加对dll的引用。这样就可以确保将dll复制到bin文件夹,或者将它们复制到其他任何地方。



但是我不打算继续这样做。它工作的唯一原因是因为您正在使用一台计算机,而服务器和客户端是同一个物理盒,并且您可能在登录用户的帐户下运行。这给你的假象是你的代码在部署到实际服务器时仍然可以工作,而客户端和服务器不再是同一台物理机。



你的asp .net代码无法访问客户端上的硬件,因此当所有内容都在同一个盒子上时,硬件连接到服务器以便它可以工作。当服务器与客户端不同时,它将停止工作。
You need to add a reference to the dlls using Project->Add Reference. That ensures the dlls are copied to the bin folder, or wherever else they are needed.

However I wouldn't bother going any further with this. The only reason it is working at all is because you are working on one machine and the server and client are the same physical box, and you're probably running under the account of the logged-in user. This is giving you the false impression that your code will still work when deployed to an actual server and the client and server are no longer the same physical machine.

Your asp.net code can't access hardware on the client, so when everything is on the same box the hardware is connected to the server so it works. When the server is a different machine from the client this will stop working.


这篇关于ASP.NET网站智能卡读卡器DLL路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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