Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Web Services, having trouble

Status
Not open for further replies.

motte

Programmer
May 31, 2001
155
US
Hi all,

I have some problems and hope you can help.

I have created my first web service using a text editor. If I seperate my .asmx file & .vb file and try to view the test page after I create the .dll, I get an error that the class can't be created. If I keep the webservice as one file (.asmx) then it works...do you know why? I am putting this on a host provider that has .net.

Also, when I create the consuming client using a text editor, I can create the .wsdl, the .vb proxy & the compiled proxy. I put these on my localhost & put the .dll in bin. However, when I try to create an object of the proxy in my .aspx page, I get an error that the type (Mike is the webservice class) is not defined....if I do this in visual studio & set up a reference, then I get it to work. How can I set up a reference thru a text editor...or is there something I need to do? I am really new to .net/IIS so please bear with me on these questions.


Mike
 
Hey Mike I'll see if I can help you. First off if you have VS why are you using a text editor to develop your apps. That's kinda like cooking over open flame rather than a microwave isn't it?

For the web services there is actually 3 files per service.
mywebservice.asmx
mywebservice.asmx.vb
mywebservice.asmx.resx

I am not sure if that is it most likely would be the contents of your asmx file which points to your vb file. It should look something like this

<%@ WebService Language=&quot;vb&quot; Codebehind=&quot;mywebservice.asmx.vb&quot; Class=&quot;Name.Class&quot; %>


As for the consuming Client you need to setup the web references folder. If you insist on using a text editor I suggest setting up a sample consumer using VS as you have and following it as a reference. That'l do donkey, that'l do
[bravo] Mark
 
Mark,

Thanks for the reply. I'll have to take a look when I am at home into what I have set up on the consuming side. However, as for the server (web service), I think I already saw the problem. I don't think I ever referenced the codebehind. That could be killing me at one point & setting up a references folder on the consuming side as well is probably kicking my can too. Is the references folder the bin directory or is it seperate?

As for why I'm using the text editor: I started with it in a class as .net had not yet been released. I just stuck with it. Slowly, I am transitioning to VS, but since I am building an app for a friends business who just has a site on a hosting provider, I am working with what he has.

I use VS as a guide, making sure I have proper syntax, functions and properties if I get in a bind. Since I also don't have a dedicated ip to set up my own web server, I just use IIS as local to my machine.

Oh yeah, and the VS I have is not for development. It was part of the licensing agreement I signed with my school & Microsoft. For teaching/learning purposes only.

Mike
 
Fair enough Mike I was curious.

As for the references folder it would look something like this.
C:\Inetpub\ References\localhost

As for the files in it I am not sure what you would need as I used VS and the files are auto generated.

If I come across a good notepad style tutorial I'll let you know. That'l do donkey, that'l do
[bravo] Mark
 
Thanks for the additional info Mark. I appreciate the help.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top