다음을 통해 공유


ASP.NET Web Services

Posted June 21, 2002

Chat Date: June 6, 2002

Chat Participants:

  • John Perry, Program Manager
  • Kent Sharkey, Technical Evangelist

MS_John_P
Welcome to today's ASP.NET Chat on WebServices. I will ask the hosts to introduce themselves.

ksharkey_MS
My name is Kent Sharkey - I'm one of the Technical Evangelists for the .NET Framework. I specialize in XML Web Services using ASP.NET and Remoting (and I'm wearing my SOAP Toolkit T-shirt today)

MS_John_P
And I'm John Perry, PM For Communities for ASP.Net. I'll be your moderator for this chat.

MS_John_P
Let's get started! Fire away with your questions for our hosts.

ksharkey_MS
Not really -- IIS 6 changes the process model, but doesn't change how web services work

MS_John_P
Q: gerasha: Is there any difference to Web Service at IIS 5 or 6? As far as I know, IIS doing Keep-Alive protection, to release every 200 ms data back??

MS_John_P
Q: Michel: What kind of .Net project uses wsdl files

ksharkey_MS
A: You can make use of WSDL files in any project that makes use of XML Web Services

ksharkey_MS
A: You can create a WSDL file by creating an ASP.NET Web Service Project

ksharkey_MS
Q: gerasha: When SOAP 3.0 will be released?

ksharkey_MS
A: Very soon, but (I hate to say this) - this doesn't have anything to do with ASP.NET Web Services

MS_John_P
Q: Ralph: I'm new to .net and come from a C programming background. There are a lot of new technologies to get my hands around. What order do you suggest tackling these?

ksharkey_MS
A: Your best bet is to download the .NET Framework, and then to start going through the quickstarts. Learning C# should be quite easy for you.

MS_John_P
Q: sidd: this quetion realates more to ASP.net ..is there a way to override a onclick event for a control which has runat server attribute set so that we can handle it at client side and then it should not make a round trip to the server

ksharkey_MS
A: You need to have some JavaScript code added that will run on the client

MS_John_P
Q: gerasha: answers coming verrrrrrrrrrrrrrrrrrrrry slow

ksharkey_MS
A: If you have an existing WSDL file, you connect to it by adding a "Web Reference" to the WSDL file

MS_John_P
Sorry, we're having a little network issue......

ksharkey_MS
A: ASP.NET and .NET Remoting (using IIS and SOAP) are roughly comparable in speed however, they have two different targets.

MS_John_P
Q: Dan_Kahler: Are there any rules of thumb on how ASP.NET Web Service performance compares to using .NET Remoting hosted in IIS and SOAP?

MS_John_P
Q: jello: Are there changes when dealing with ADSI components in ASP.NET?

ksharkey_MS
A: There is also a good comparison on www.dotnetremoting.cc

ksharkey_MS
A: You should be using the System.DirectoryServices, but they provide the same functions as ADSI

MS_John_P
Q: ChrisKirby: can you talk about the soap exception object and how it is utilized either automatically or manully in a .net www service

ksharkey_MS
A: SOAP exceptions in ASP.NET bubble up from any exceptions that occur in your code

MS_John_P
Q: Michel: how to using existing wsdl from the web service side ?

ksharkey_MS
A: When you add a Web Reference, you point it to the existing WSDL, and it generates a class (proxy) for you to use it in your code normally

MS_John_P
Q: jello: Where can I find information about the System.DirectoryServices objects and function/

ksharkey_MS
A: That's in the .NET Framework documentation (hidden under System.DirectoryServices ;)

MS_John_P
Q: Michel: It's not very clear. I try to add web reference. But VS.Net ask me for an address ?

ksharkey_MS
A: The address it's looking for is the URL to the WSDL file

ksharkey_MS
So, either enter in the path, or URL to the WSDL

MS_John_P
Q: Yianni: Can I use an existing VB .NET Class Library (has some math functions) as a Web Service without having to code it again and also without having to upgrade both the Web Service and the the Class Library, each time I want to add a new function?

ksharkey_MS
A: You would need to create a Web Service wrapper around it, but yes this is possible

MS_John_P
Q: ChrisKirby: how can I tell how my web service is being consumed, i.e. via soap, http post, or http get.

ksharkey_MS
A: Neat question! You could tell by looking at the HttpRequest.ServerVariables collection. It should tell you the method (and QueryString if GET)

ksharkey_MS
and the Request itself should tell you if it's containing SOAP or not

MS_John_P
Q: Yianni: ksharkey_MS, what is a "Web Service wrapper" ?

ksharkey_MS
A: VB class (calling them) and exposing them as Web Services

MS_John_P
Q: Dan_Kahler: ChrisKirby how can I tell how my web service is being consumed, i.e. via soap, http post, or http get." - Should this information be available in a Trace as well?

ksharkey_MS
A: Yes, I thought Dan was asking how to programmatically determine this

MS_John_P
Q: ColdGreenFish: I'm currently developing an Internet app with VB6/ASP/XML/XSLT. From my standpoint, it's difficult to select a technology to use in .NET to begin a new app development. Any guidelines?

ksharkey_MS
A: I would first look at ASP.NET -- it's very easy to migrate your brain over from ASP to that

ksharkey_MS
A: Then, start looking at the System.Xml classes for your XML/XSLT coding (or keep using MSXML)

MS_John_P
Q: ilovebrookies: I am trying out the .NET website creation sample; I am creating a connection to the pubs DB in SQLServer; SQL is configured for integrated NT security (no userid, password); the error tells us there is an SQL exception: login failure for localhost\aspnet

ksharkey_MS
A: ASP.NET runs as a local user for security reasons. You can either give that user rights to access your database, or change the user ASP.NET runs as.

MS_John_P
Q: gerasha: How to secure web service? Like authorization? Is Web Services really secured?

ksharkey_MS
A: It depends on what you want to secure. The easiest way is to use HTTPS for your Web Service

ksharkey_MS
A: Alternately, you can use SOAP Headers to add authentication information into the SOAP message

MS_John_P
Q: ColdGreenFish: I want to create an interactive ASP.NET form that makes use of the user's sound card/MIDI port/etc. Can I get this rich with functionality?

ksharkey_MS
A: ...Sort of. There is an upcoming .NET Speech SDK that will allow you to use SALT to communicate with users of your ASP.NET Form

MS_John_P
Q: gerasha: like for sending username and password, can I set some kind of encryption between client and server,if i dont have HTTPS?

ksharkey_MS
A: Yes, I've got (and Rob Howard has also done) a SOAP extension that encrypts a message while in transit

ksharkey_MS
Check out www.gotdotnet.com/team/rhoward for Rob's

MS_John_P
Q: ColdGreenFish: I caught wind of that (Speech SDK) at the TechEd in NewOrleans. Please expound somewhat on SALT, relative to ASP.NET usage.

ksharkey_MS
A: SALT is an acronym I haven't memorized yet, but it is implemented as a Server Control, so you'll be able to add it to your pages and have your pages 'talk' to browsers that recognize it.

MS_John_P
Q: Michel: How to create a .Net framework component ? Is it the same than Web service ?

ksharkey_MS
A: A .NET Component is more of a general term for a number of different things.

ksharkey_MS
Including Web Services, Controls and more

MS_John_P
Q: ChrisKirby: if my return type on my webmethod is of type DataSet what is the best way to return a custom error if soap faults are not an option. i.e the service was consumed via http post

ksharkey_MS
A: What is the client for this, Chris?

ksharkey_MS
A: Odds are, the user on a simple POST will get a 500, you could update the 500 error page if necessary, or redirect

MS_John_P
Q: cmaroto: I am trying to access a table in an Oracle Database with Crystal Reports. I've had success in VB.NET but whenever I try to do it from an ASP.NET page or a Web Service, I get LOGON FAILURE. I've tried different ODBC drivers, including the MS ORACLE ODBC?

ksharkey_MS
A: This one is also caused by the fact that ASP.NET is running as local\ASPNET you need to give that account permission to your database

MS_John_P
Q: aleksey: How can an XML-RPC client consume a .NET Web Service

ksharkey_MS
A: XML-RPC is an older XML-based format. Likely, you'll need to get the provider to update to use full SOAP

MS_John_P
Q: Rick: someone here that can answer a question

MS_John_P
A: Maybe.....

MS_John_P
**Q:**gerasha: Is any example to translate Dataset XML to ADO XML for returning data to VB6

ksharkey_MS
A: None that I've seen, however, it should be relatively 'easy' if you use one standard schema, and know XSLT ;)

MS_John_P
Q: Michel: Ok, Now I have a web reference to my wsdl file. but how can I use this WebReference ? Some good sample to suggest ?

ksharkey_MS
A: Certainly -- if you look under the Web References section in the Solution Explorer, you should see an entry -- what is it?

MS_John_P
Q: knick: Where are good places to register web services?

ksharkey_MS
A: The best location is www.uddi.com (or uddi.microsoft.com)

ksharkey_MS
A: alternately, you could list them at www.salcentral.com or www.xmethods.net

MS_John_P
Q: cmaroto: LOGON FAILURE I get is only in runtime, that means the account permission you're telling me is only for access in runtime, 'cause I can access the DB while in design time and create the report w/o problems?

ksharkey_MS
A: Correct -- when you're in design time, you're executing code as yourself, however ASP.NET uses it's own permissions for security reasons.

MS_John_P
Q: knick: Yes, but how do I register there? It does not want to accept Passport.

ksharkey_MS
A: I'll look into that one, it should be working

ksharkey_MS
A: Actually, I just tried -- it signed me in

MS_John_P
Q: Michel: VS.net split to kind of component COM component and .Net component. ActiveX are COM component. What kind of .Net component are closer of ActiveX component.

ksharkey_MS
A: Windows Forms Controls are probably the closest to COM components (at least visual ones)

MS_John_P
Q: Michel: What wsdl file are from the WebService point of view ? From the clientappl is add web reference. but what is this existing wsdl file for a ASP.Net webservice ?

ksharkey_MS
A: the WSDL file describes the objects and methods that the Web Service provides.

ksharkey_MS
no problem. you should read my French

ksharkey_MS
A: So, for the OPC web service, it would describe the data that could be transferred, and the actions (I can't think of any off the top of my head)

MS_John_P
Q: jjh: if I want to use a web service from the internet but my webserver has no direct access can I force the traffic to a proxy server

ksharkey_MS
A: The proxy class generated has a .Proxy property that you can use to redirect the traffic

ksharkey_MS
A: So, if you were in the client code, your code would look like:

ksharkey_MS
dim myService as new SomeWebService()

ksharkey_MS
myService.Proxy = new webproxy("https://foo:8080")

ksharkey_MS
myService.MyMethod

MS_John_P
Q: markbos: when using a web service with a server certificate that has expired an exception is thrown. how can one ignore this and connect?

ksharkey_MS
A: I don't believe you can -- but do you really want to connect to a server with an expired certificate?

MS_John_P
Q: Michel: in fact the data are in a COM component called OPC DA server. The WSDL describe (i think) the way to exchange data using XML/SOAP. but the OPC XML spec tell nothing regarding existing tools. As an OPC foundation member i study this way.

MS_John_P
Q: Michel: The use of .Net for OPC XML implementation.

ksharkey_MS
Does the OPC provide a server? Or are you expected to write both?

MS_John_P
Q: Michel: The server are provided by PLC manufacturers like Siemens, ABB, Schneider....

MS_John_P
Q: Michel: The OPC server are COM/DCOM component.

ksharkey_MS
A: But they also communicate using SOAP? So, you should be able to connect to Siemens' (or another's) server, can't you?

MS_John_P
Q: aleksey: Is it possible to consume a .NET web service from PocketPC 2000?

ksharkey_MS
A: Yes, you can either use the .NET Compact Framework (currently in Beta), or PocketSOAP to access these services (www.pocketsoap.com)

ksharkey_MS
(from PocketPC's)

MS_John_P
any final questions?

MS_John_P
Q: aleksey: This is probably off topic, but I was under the impression that .NET does not run on PocketPC 2000?

ksharkey_MS
A: The main .NET Framework does not run on Pocket PCs, but the Compact Framework does

ksharkey_MS
(although I see your point about Pocket PC 2000 as opposed to 2002)

MS_John_P
This has been a GREAT chat. Thank you to everyone. Unfortunately, it is time to go. For more information, please visit https://www.ASP.NET

Top of PageTop of Page