简体   繁体   中英

How can I get Cassini web hosting framework to work without adding it to GAC?

I am trying to use Cassini (from http://www.asp.net/Downloads/archived/cassini/ ) to host my old style asp.net web service in-process, ideally in a WCF style. However, when I run it, I get an exception that the Cassini.dll could not be found. The Readme.txt that comes with it says to add it to the GAC, but the whole point of using an inprocess hosting is to avoid installing stuff in global places. Any ideas how to make it work without the GAC? Or maybe some other alternatives?

Extract the WebDev.WebHost DLL from your GAC. It has no other dependecies apart from the .NET Framework itself. You can then reference it locally, and instantiate a Server object from it which has a Start() and - hooray - a Stop() method.

I normally browse to the GAC folders at a command prompt and copy files out, but if you Google you'll find other approaches.

Found the way to use the Cassini as well: I had to put Cassini.DLL in the Bin directory under the application root for the your web application.

Source: http://forums.asp.net/p/869425/869846.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM