Publishing with WebBrowser component

daganlev

Member
Joined
Sep 20, 2006
Messages
5
Programming Experience
Beginner
Hey guys,
Have created a small App to copy users website (so clients can browse the site offline) - the App downloads the DB for the CMS and uses the:
System.Windows.Forms.WebBrowser component to load static HTML pages in the backend and populate them with the info (mimicing IIS)...

My problem is, that I have had to create all the CSS, Images and other folders inside the application and it works fine - on debug mode - however when I publish the application it does not copy those folders with it and the Browser can not browse anything (comes up with page not found)

I am using VB.Net 2005 Express and I can seem to tell the App where to install itself to (in the Publish wizard) - it chooses to install itself in the Application data folder of the user - which is no good for me... :(

Any ideas?

How can I tell it to install on C:\Program Files\ - for example???

Is there a way for me to tell Vb.net to include the HTML and CSS folders in the installation and also to direct my System.Windows.Forms.WebBrowser object to browse to those...

At the moment in debug mode I tell the component to use:
WebBrowser1.Navigate(Application.StartupPath & "\HTML\main.htm")

and I load all the folders (HTML and CSS) onto the Debug directory for it to find them...

Please help,
Cheers
Dagan
 
You can add files and folders to the solution (Solution Explorer/menu, "add existing") and set Build Action (Content) and copy mode (Copy always/if newer) for those files. Doing that the files will be copied to output directory when solution is compiled for debug and included in setup/ClickOnce (as part of "application files") when deployed to other computers.
 
Thanks JohnH that seemed to have fixed it - I did not add the items to the project (just manually added them to the debug folder)...

Its a shame Visual Basic Express does not have add existing folder (as I had to create the folders and only than add the items to them)

Cheers
Dagan
 
Its a shame Visual Basic Express does not have add existing folder (as I had to create the folders and only than add the items to them)
You do know you can add all files to a folder in one operation?
 
yes of course - its just that my offline website is devided into CSS, Images, SWF, etc folders and its a pain adding each folder and than adding all the items in it (in one go) as oppose to just adding the full website folder with all the subfolders in it...
 
Back
Top