Click here to Skip to main content
14,735,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created .dll file of my web application. Now i want to use it in my windows form application. Can i do that? If so, how?. I have created both projects in visual studio 2010.

I want my web application to run in my custom made browser/win form application instead of publishing it on internet.

What I have tried:

I tried adding a reference to webapplication1.dll file, but i get a error "Refrence required to 'System.Web, version=4.0.0.0, Culture=Neutral, etc'
I used- "Imports WebApplication1._default"
Later i tried to add refrence to System.Web from "c:/program files/refrence assemblies/Microsoft/framework/
.NETFramework/v4.0/System.Web.dll"
But it gives the error - <system cannot find the refrence specified>
Posted
Updated 2-Jan-19 23:27pm
v3
Comments
F-ES Sitecore 3-Jan-19 5:59am
   
Websites need to be hosted in a web server. If you want to run your site in a windows app then the app itself will also need to act like a web server. The other option is to still host the site somewhere and embed a browser in your app.
Member 10367796 3-Jan-19 12:54pm
   
So like host the web app on IIS (or something similar), and run the local address in windows app. Right?
F-ES Sitecore 3-Jan-19 13:03pm
   
You could do that, yes, but you'd need some way of getting the site created and deployed on the local machine. Given IIS isn't installed on Windows by default that will be some challenge.
Member 10367796 3-Jan-19 13:11pm
   
i am creating both the apps in visual studio 2010 on the same machine.
and for IIS i could install it and publish the web app to it, using the publish wizard. do you have anything else in mind?

1 solution

The web application must run on a web server. You can use IIS on your local system to host it.
   
Comments
Member 10367796 3-Jan-19 12:56pm
   
Thanks.:) I thought there might be some way so that i wont need to host the app.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900