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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help accessing asp.net 2.0 web service

Status
Not open for further replies.

jrenae

Programmer
Jan 18, 2006
142
0
0
US
Hello,

I've created a web service that I can access fine from a .net windows client. But when I try to access it via a web client created in asp.net it does not add the reference.map file or the reference.cs file under the web reference folder. It added a .disco, .discomap and a .wsdl file. The compile error I'm getting is below:
I might add that I'm using the example in the ".NET XML Web Services Step by Step" book. I'm using Visual STudio 2005.

Any suggestion? Thanks in advance

Error 11 The type or namespace name 'WebFormsClient' could not be found (are you missing a using directive or an assembly reference?) c:\inetpub\ 14 7
 
Ok first of all let's do this step by step. You don't have to add anything manually if you have VS 2005.
You need the whole web service path, something like:


if you when you type in a browser it will show you a web page.
Now if you are using VS 2005 you may be able to check if the path exists or not. But if you couldn't see it in the browser it means you have a different problem, nothing related to VS2005.

Go ahead and try that and if you have troubles just let me know the error and I will do anything that I can to help you out.
 
Step1 - I created a web service (validation.asmx).

Step2 - I created a .Net windows project and added a web reference which uses my web service thru a form. This windows project works fine (I noticed that when I added the web service it added a reference.map and a reference.cs file)

step3 - I created an ASP.Net website client to access the web service. When I build the web site I get the error listed in my first post. I noticed that when adding the web reference to to this ASP.Net project it did not add the files reference.map and reference.cs as it did with the windows project. I was wondering if the absence of these 2 files is the problem when I try to build the site.

Thank you for your help!
 
Can you browse the web service and see the methods in your browser just by typing the url?
 
Yes I can. And it works when I invoke it.
 
Well it seems that you are doing everything the right way. The only I can suggestion now is to use this tool that comes with the SDK "Soapsuds.exe"
It is a tool to use throught the command prompt, it will basically will give you the files you need to make your webservice work on your client application, it should give you anything different from what VS 2005 should be giving you but I think it will help you to double check your problem.

Let me know how it goes or if you need more help with tool(Soapsuds.exe)

P.D: you have to use Visual Studios command prompt. Or calling the exe from the folder where you have the SDK installed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top