开发者

How to use my Web class library from a windows project

开发者 https://www.devze.com 2023-02-11 20:52 出处:网络
I have a Web project in which I defined some methods to parse some webpages. I then save the retrieved data in a DB.

I have a Web project in which I defined some methods to parse some webpages. I then save the retrieved data in a DB. Now I have run a lengthy operation(it may take 2 days) in which I continously parse webpage this way.

Can I use the webproject from a Windows project. If I try to add a refference to开发者_运维知识库 it it doesn't work. How should I do it?

I have used until now an asp.net application, and done the calls to the parsing methods in the pageLoad event but after an hour or so the process stops.


That's not the best design: Shared assemblies should not have a UI implementation. I suggest you split the assemblies you wish to call from your windows app from your web app into a separate assembly. Your web and windows apps should be in separate solutions, referencing your now separate assembly project.

0

精彩评论

暂无评论...
验证码 换一张
取 消