Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I currently have a web application developed and am creating a new one in which I would like to access some of the code that I already have written in the previous web application. How do I go about adding a reference to my old code? I tried to add web reference, but when I entered the web address of my original app it tells me "The HTML document does not contain Web service discovery information.". Am I not wanting to add web reference? Any help would be appreciated.

Thanks In Advance,

Brad
Posted

use add reference instead of add web reference and locate bin\*.dll of old web application and add that dll to new application.
 
Share this answer
 
Comments
clugsy64 24-Jun-11 8:21am    
OK, I thought about that as well. Another question, after selecting my dll to add reference to and deploy this new web app, how does my old code get utilized? What I mean by that is does my old code get "built" into this new dll? Reason for this question is that my employer has paths different to project: on local development computer it is in folder named "local" on test server it is in folder named "test" and on live server it is in folder named "live". So I am concerned about adding reference to original code in "local" folder and then when goes to test and/or live server this new project is looking for original dll in "local" and that is not where it exists. So when this new project goes to test or live server, will new web app be looking in "local" folder to find original dll or when build new web app does it "build" the old dll up into new dll?

Thanks,

Brad
hitesh_tech 27-Jun-11 9:54am    
Your refered dlls will get path from bin of new web application whether your new web applicatuion is in local, test , live. Just ensure once refered old web application dll it should exist in bin of new web application
Unless you have put the reuseable code in dll's instead of directly in your web project or you have webservices enabled this is not possible.
 
Share this answer
 

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