Type 'GoogleSearchService' not defined

  • Thread starter Thread starter daniele.iacono
  • Start date Start date
D

daniele.iacono

Hello all,

1) i made the GoogleProxy.dll
2) i created a bin directory in the root of the website and i pasted
there the .dll
3) the namespace name is: 'google'

Now I am trying to run the following asp.net code:

------------------------------
<%@ Page Language="VB" %>
<%@ import Namespace="google" %>
<script runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim search As GoogleSearchService = New
google.GoogleSearchService()
Dim result As GoogleSearchResult

result = search.doGoogleSearch("lfSLS91QFHKTUZe+et/bk86AvahdQV+1",
"ASP", 0, 10, True, "", True, "", "", "")

dlResults.DataSource = result.resultElements
dlResults.DataBind()
End Sub
</script>
------------------------------

but i got the following error:

------------------------------
Compiler Error Message: BC30002: Type 'GoogleSearchService' is not
defined.
Source Error:
Line 3: <script runat="server">
Line 4: Sub Page_Load(sender as Object, e as EventArgs)
Line 5: Dim search As GoogleSearchService = New
GoogleSearchService()
Line 6: Dim result As GoogleSearchResult
------------------------------

Can someone help me to figure it out?

Thx in advance,
Daniele
 
Ray Booysen ha scritto:
You have to add the GoogleProxy.dll as a reference to your web application.

Thx for your reply.

I do not use VS.NET, i compiled it by wsdl.exe, in this way:

wsdl /protocol:SOAP /namespace:google /out:GoogleProxy.cs
C:\GoogleSearch.wsdl
(This will create a C# file named GoogleProxy.cs)

csc /t:library /out:GoogleProxy.dll GoogleProxy.cs
(This compile it in a .dll)

Then i created a simple "bin" directory in the root of my website and i
pasted in it the GoogleProxy.dll produced by the steps above.

What do i missed?

I am crashing my head finding around a solution since 2 days but i am
not able to figure it out... please help me!

Daniele
 
You've compiled googleproxy.dll fine, its your website that needs the
changes.

Open up the website project and add the google dll to the references there.

Regards
Ray
 
Ray Booysen ha scritto:
You've compiled googleproxy.dll fine, its your website that needs the
changes.

Open up the website project and add the google dll to the references there.

Regards
Ray

How can I do it without Visual Studio?
 
I'm not sure, I haven't had to do that before.

Also, this newsgroup uses top-posting for posts, so it'll be helpful if
you can follow that standard.

Regards
Ray
 
Back
Top