|
-
Apr 18th, 2002, 04:11 PM
#1
Thread Starter
Hyperactive Member
Web Services/References
I have several .NET books but am still confused about utilizing web services. My scenario is that I have a parent form that calls another form ( a dll ) that calls a web service. The web service accesses a database on a different machine. So, the parent app and child form dll are on one machine, the web service ( a dll also ) is on another, and the database on yet another. I made a web reference in the child form dll to the web service but this apparently isn't enough. What is missing?
A cynic knows the price of everything but the value of nothing.
-
Apr 20th, 2002, 05:56 AM
#2
Member
Please give more details and what is apparently isn't enough?
-
Apr 22nd, 2002, 11:33 AM
#3
Thread Starter
Hyperactive Member
If I access the web service through a browser on the client machine it runs fine. When I try to access my web service through the app on the client machine I get an error that says:
"An unhandled exception has occurred in your application...Client found response content type of 'text/html; charset=utf-8' but expected 'text/xml'.
[ConfigurationException]: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (c:\inetpub\wwwroot\webservice1\web.config line 25)
Source Error:
Line 23: "Forms", "Passport" and "None"
Line 24: -->
Line 25: <authentication mode="Windows" />
Line 26:
Line 27:
Source File: c:\inetpub\wwwroot\webservice1\web.config Line: 25
Last edited by Dman; Apr 22nd, 2002 at 12:03 PM.
A cynic knows the price of everything but the value of nothing.
-
Apr 23rd, 2002, 11:49 AM
#4
Member
Please see Microsoft Visual Studio .NET documentation. Search for "Walkthrough: Creating a Distributed Application" or type "ms-help://MS.VSCC/MS.MSDNVS/vsintro7/html/vbwlkCreatingDistributedWebApplicationWalkthrough.htm" in the URL field.
Follow the instruction and you should be able to get it right. If I'm not mistaken, try taking the following steps:
[list=1][*]Start the Internet Information Services tool. It can be run from the Administrative Tools of the Control Panel. (For more information on starting this tool, see your Windows help documentation.)[*]Expand the node for your server.[*]Expand the Default Web Site node. [*]Right-click the node for your web service and choose Properties from the shortcut menu. [*]Click the Directory Security tab. [*]Click the Edit button in the Anonymous access and authentication control section. [*]Clear the Anonymous Access check box. [*]Select the Integrated Windows authentication check box. You have now configured your XML Web service directory. [*]Returning to the project in Visual Studio, double-click the Web.config file in Solution Explorer. [*]Add the following tag on the line after the <system.web> tag to configure integrated security for your XML Web service.
<identity impersonate="true"/>[/list=1]
-
Apr 23rd, 2002, 03:51 PM
#5
Thread Starter
Hyperactive Member
Upon reading the recommended document above I noticed that in the system requirements section it says that they want you to use Integrated Windows Authentication. Will it not work with mixed authentication in SQL Server?
A cynic knows the price of everything but the value of nothing.
-
Apr 24th, 2002, 02:46 AM
#6
Member
My SQL Server is in Mixed Mode and it works fine.
Try going through the walkthrough... maybe you missed something.
-
Apr 26th, 2002, 10:39 AM
#7
Thread Starter
Hyperactive Member
I have done the Walkthrough: Creating a Distributed Application link at the MSDN site mentioned above and it worked fine while it remained on the development machine. I wanted to test whether or not the application that is part of the tutorial could access the web service while on another machine. I changed the web reference in the application from 'localhost' to the name of the server that held the web service:
http://MyServerName/AuthorsWebServic...ervice.vsdisco
The .vsdisco contents appear in the left side of the Add Web Reference dialog box but the right side contains the following error:
"The document was not recognized as a known document type (WSDL, XML Schema, or Discovery document) for the following reason:
- The content type 'application/octet-stream' is not valid for an XML document."
However, when I reference the AuthorsService.asmx file (as I saw one example do) it successfully registers the web reference, however, the app still doesn't work when moved to a different machine. The machine I'm moving it to DOES have the .NET Framework installed on it but I'm just copying the file over to that machine (rather than use an installer) as it was my understanding (maybe wrong understanding) that the .NET Framework made this possible.
Any idea where I'm getting derailed? Thanks in advance.
A cynic knows the price of everything but the value of nothing.
-
Apr 27th, 2002, 05:37 AM
#8
Member
The step you have taken when adding the web reference is correct. Just point it to a .asmx file. So far, pointing it to a .vsdisco file does not work for me too.
You need to install the .NetFramework on the server. Then you can simply create a virtual directory and copy the files for you webservice into the directory. If you're not sure how to copy the files, then create an installer for it.
Oh by the way, you need to have an IIS with Frontpage Extender installed on the server.
-
May 1st, 2002, 01:44 PM
#9
Thread Starter
Hyperactive Member
How can I tell if Front Page Extender is loaded? Do you mean Front Page extensions?
A cynic knows the price of everything but the value of nothing.
-
May 2nd, 2002, 04:05 AM
#10
Member
It should be installed... not loaded. To know whether it is installed, go to Control Panel->Add/Remove Program->Add/Remove Windows Component->IIS
The FrontPage 2000 Server Extension should be checked.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|