I have this problem in vusal j#,
C:\Work\Form1.jsl(92): Cannot find method 'Navigate(String)' in 'AxSHDocVw.AxWebBrowser'
I have no clue how to fix this, the program works on my friends comp but not mine, I'm running win xp sp2 with zone alarm security suite installed.
Please reply
-- Thanks

axWebBrowser
M W
Anything I could do
BrandonD
cd C:\
C:\> aximp c:\windows\system32\shdocvw.dll
but it then tells me " 'aximp' is not recognized as an internal or external command, " so it doesn't work, Is there a way that I can generate assemblies in Visual Studio or something like that, and am I doing my console commands right, all I did was open it and write that.
- Please reply
Web Explorer
PS, I'm at school right now so i'll be home in 4 hrs
Please Reply
willwang
No, the solution is not specific to J#. Since you have got a older dll, you must get the same compilation error with C# and VB also. The only difference is that you have to follow the respective language syntax.
I didn't get the sentence "but for C++, and I don't think I will be passing any params into the Method". It will be better if you send the piece of c++ code across.
Thanks.
Yosmanor
I feel you are missing the reference to the required assemblies on your system. To compile this code you need to refer following two assemblies
1. SHDocVw.dll
2. AxSHDocVw.dll
Above two assemblies need to be generated form shdocvw.dll, which is a com dll. You can issue following command from Visual studio command prompt to generate the dlls...
aximp d:\windows\system32\shdocvw.dll
Please correct the path for shdocvw.dll as per your system settings.
To know more about aximp, please refer to http://msdn.microsoft.com/library/default.asp url=/library/en-us/cptools/html/cpgrfWindowsFormsActiveXControlImporterAximpexe.asp.
Please let us know if it doesn't help.
Thanks.
vinnisharma
Seems you really have got the older version of WINDOWS\system32\SHDOCVW.DLL which doesn't implement the required overlaod of Navigate function, which you are using in your code.
I would suggest you to use following lines of code in you application instead of replacing SHDOCVW.DLL. Replacing this dll may break other applications on your system...
Object obj =
null;axWebBrowser2.Navigate("http://www.msn.com/", obj, obj, obj, obj);
Please note that here we are passing null for rest of the parameters. So this code will work fine until unless you want to do something from your code which depends upon those parameters, which i believe you are not likely to do as you wanted to use the overload which takes only the URL.
Please reply back if your problem is not solved.
Thanks alot !
ramsun
From "By both the assemblies are being referenced to in your project" i meant that can you see both the assemblies generated by aximp in the solution explorere under references folder. But i believe they are there because you are able to see navigate method in intellisense drop down.
Ca you check that how many overlaods of Navigate function are shown on your machine On my machine, I can see two with following prototypes...
1. public void Navigate ( String uRL , Object flags , Object targetFrameName , Object postData , Object headers )
2. public void Navigate ( String uRL )
If you are not able to see the second overload then you have got older dlls. You can work around by copying both dlls from the other machine where the code compiles.
If not, then please mail back.
Thanks for your patience.
CarlN
Please Reply
Ps- Thanks for your help.
Herman du Plessis
Please Reply
Praisy Noel
You are getting the error because aximp is not in the PATH.
If you are working on J# express, then you need to add the path of aximp to the PATH environment variable. Aximp is shipped with Visual studio sdk and you can find it at
%systemdrive%\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin.
After adding above path to PATH variable, you should not be getting the error.
If you are working on VSTS instead of express then go to Start > Programs > Microsoft Visual Studio 2005 >Visual Studio Tools > Visual Studio 2005 Command prompt. Here you can directly use aximp beause it is already included in the path for this command prompt.
After you have generated the required assemblies, just refer them and build the project. You should be ableto compile successfully.
Please, let us know if u face any problem.
Thanks,
Jaiprakash
jfstephe
No, you need not reboot your machine. It must work if boht the assemblies are being refered in your project. Can you please try following...
1. Make sure that both the assemblies are being referenced in your project.
2. When you type browser. in the editor, does the intellisense shows the "navigate" method there.
3. Can you tell me the fileversion of C:\windows\system32\shdocvw.dl. That you can check by right clicking on the dll > Properties > Version > File Version. I have got 6.00.2800.1622 (xpsp2.050218-1437) on may machine and it works perfectly fine for me.
BTW, i feel this issue is a common issue to all the langs. If you follow the same steps in a C#/VB project then too you should hit the same issue.
Thanks
CodeW
l
Generated Assembly: C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\SHDocVw.dll
Generated Assembly: C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\AxSHDocVw.dll
It worked!!! yay!!
Ok should I restart my system I tried to use the navigate method in VS it still gives me that error
Plz Reply
pravsaugat
Please Reply
Mohammed Elnahrawi
Is the problem my dll version maybe
Please Reply