Click to See Complete Forum and Search --> : About source ???


ISMSH
March 27th, 2004, 06:52 AM
Hi everyone ... i am new here and i really liked this fourm it looks very nice and complementary

well am having a problim with the sources ...

i make a small program in vb.net and i put in it a web browser and some html pages ... the problim is when i copy this program to another computer the web pages won't open with me ... coz its lloking in the same drive and directory i made it on it at the other computer !!!

how can i make the vb.net read my file from any pc i copy the program to it ...

thanks everyone and take care :)

swamivishal1
March 27th, 2004, 07:12 AM
dear friend,

you may be trying to do the job in asp.net

send the code as attachment so as to enable us to understand the problem easily and efficiently.

good luck:thumb:

Craig Gemmill
March 27th, 2004, 10:27 AM
I think you are talking about when you try to open your webapp project in Visual Studio, and it tries to connect to the host.

If that is the source of error, then what you have to do is create a new virtual directory (http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/core/iicodirv.htm) in IIS and name it exactly what you had it named on the original computer, then you want to point the folder location to where the project files are now stored.

Keep in mind that the .NET Framework must be installed on that machine as well.

More howto:
http://www.webreference.com/js/tips/020723.html

ISMSH
March 27th, 2004, 12:10 PM
Thanks guys ...

but sorrry its not what i mean :(

i will show u the code so u can understand me well .. am sorry am not that good in English ..

The is the Code Line :
AxWebBrowser1.Navigate ("D:\W4M\s-all.htm")

As u can see guys its on drive D:\
so its open this HTM page from drive D:\

well now i change to another computer and there is no Drive D:\ !!! and in my Work everyday u have to change to another computer so sometimes there is D:\ and Somtimes there is not .

in VB6 I was Writting the Code like this to make it work in any drive :
App.path & "\W4M\s-all.htm"
So its look in the Folder ( W4M ) at any drive and open the things i want from it

now in VB.NET this code ( APP.PATH ) is not work with it

i think u understand me well now ( i did my best ) ... lol
How can i open and file even if its in CD Drive not in the Drive i type like C: or D: or anythings ?

please guys ... HELP !!!

Craig Gemmill
March 27th, 2004, 01:08 PM
You can use the following to get the same results as app.path in <= VB6:

System.AppDomain.CurrentDomain.BaseDirectory()
System.GetEntryAssembly().Location

Also, is it possible for you to set up a shared folder on one computer? That way you can just reference that shared folder from any other computer on the network (if there is one).

\\SOME-COMPUTER\MySharedFolder\W4M\whatever.htm

ISMSH
March 27th, 2004, 04:17 PM
I am very THANKFUL :)

i will try it now ... :)

and if there is any problima m hona aske you again ... lol

well thanks again guys