![]() |
|
|
|||||||
![]() |
ASP Net - How - Convert Classe/DLL to Web Service? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I wrote an ASPX web application and a C# Classes which compiled as a
seperated DLLs. In my ASPX web app. I import that DLL as Reference. How do I convert those Classes to Web Services? is it easy? so that other ASPX web app can reuse my classes over the network. Is this possible? or do I have to rewrite the classes? Thanks a lot Zean Smith |
|
|
|
|
#2 |
|
Posts: n/a
|
Its not that easy.. that's not really what a WebService is for.. it's usually
an entirely different animal. Anyway, are all these sites on the same server? Put the DLL's in the GAC perhaps, otherwise just add the reference to the other sites. -- Curt Christianson site: http://www.darkfalz.com blog: http://blog.darkfalz.com "Zean Smith" wrote: > I wrote an ASPX web application and a C# Classes which compiled as a > seperated DLLs. In my ASPX web app. I import that DLL as Reference. > > How do I convert those Classes to Web Services? is it easy? so that other > ASPX web app can reuse my classes over the network. Is this possible? or do > I have to rewrite the classes? > > Thanks a lot > > > > =?Utf-8?B?Q3VydF9DIFtNVlBd?= |
|
|
|
#3 |
|
Posts: n/a
|
"Zean Smith" <> wrote in message news:Mo-dnZ2dnZ2jIQ3knZ2dndopiN6dnZ2dRVn-... >I wrote an ASPX web application and a C# Classes which compiled as a >seperated DLLs. In my ASPX web app. I import that DLL as Reference. > > How do I convert those Classes to Web Services? is it easy? so that other > ASPX web app can reuse my classes over the network. Is this possible? or > do I have to rewrite the classes? > Sure it's very easy. Just add a ASMX web service class to your project and expose methods which use your DLL. http://support.microsoft.com/default...b;en-us;308359 http://samples.gotdotnet.com/quickst...icesintro.aspx You don't expose the classes directly; if that's what you need then you'll need to share the assembly. David David Browne |
|
|
|
#4 |
|
Posts: n/a
|
> How do I convert those Classes to Web Services? is it easy? so that other
> ASPX web app can reuse my classes over the network. Is this possible? or > do I have to rewrite the classes? You don't convert the classes. You write a web service that has web service methods that talk to the class and send responses to the client. The trickiest part is how you expose the classes (if necessary) to the web client. Any data returned by a web service method must be serializable as XML. That includes primitives, and classes. Primitives serialize automatically, as do some CLR classes, such as DataSet, DataTable, and some Collections. If you create custom classes, only parts of them can be automatically serialized. Public primitive fields are automatically serialized. Methods are not. In some cases, you may want or need to create a custom XML Serializer for your class. However, be aware that unless there is a corresponding XML desrializer on the other end, it may not be useful to do so. Creating custom XML serializers and de-serializers is a bit more advanced, but as of yet I haven't had to in any of my web services projects. -- HTH, Kevin Spencer Microsoft MVP ..Net Developer Neither a follower nor a lender be. "Zean Smith" <> wrote in message news:Mo-dnZ2dnZ2jIQ3knZ2dndopiN6dnZ2dRVn-... >I wrote an ASPX web application and a C# Classes which compiled as a >seperated DLLs. In my ASPX web app. I import that DLL as Reference. > > How do I convert those Classes to Web Services? is it easy? so that other > ASPX web app can reuse my classes over the network. Is this possible? or > do I have to rewrite the classes? > > Thanks a lot > > > Kevin Spencer |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Rip DVD and Convert Video on Mac OS | dave345 | Media | 12 | 07-07-2008 09:32 AM |
| Novice needs help with Adserver.Adtech.de | CPU Rookie | General Help Related Topics | 3 | 05-10-2008 05:54 PM |
| Trojan Horse! AHHH! | okstatefan@swbell.net | A+ Certification | 11 | 02-08-2005 07:12 PM |
| Re: High Gasoline Prices Create A+ Service Opportunities | Frederic | A+ Certification | 3 | 01-17-2004 11:38 PM |