> I have an ASP.Net web service class, DataLayer.asmx.cs. I have two
> constructors for the DataLayer class. One is the default
[quoted text clipped - 7 lines]
> web services do not support overloaded constructors? Am i missing
> something?
Hey Dilip,
Thanks for the reply. So does this mean Webservices do not support
Overloaded constructors? I am trying to pass some information as a parameter
to the constructor, so that the webservice can initialize the fields once the
instance is created. To be more precise, I am trying to create a datalayer
using webservices. So i need to pass the connection string as a parameter to
the webservice class. Currently, when i try to create an instance of the
webservice class from an asp.net application, it shows only the default
parameter-less constructor, even though I have specified 2 constructors. If I
ignore this and try to create an instance using the 2nd constructor(with
parameter), it gives me a compilation error saying that "No overload for
method 'MethodName' takes '1' arguments.
I cannot specify this in the web.config file, since everytime, they need to
connect to a new database, the web.config has to be changed. So does this
mean I should have another Web method which will perform the same function
and not use the constructor? I hope I am clear.
Thanks.
> Hello indigator,
> What you see in the Reference.cs is a proxy and not the service itself.
[quoted text clipped - 22 lines]
> > web services do not support overloaded constructors? Am i missing
> > something?
Dilip Krishnan - 01 Feb 2005 06:08 GMT
Hello indigator,
Why not just pass in an (encrypted ??) connection string as a parameter
to the web method?
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
> Hey Dilip,
>
[quoted text clipped - 47 lines]
>>> Is it that web services do not support overloaded constructors? Am i
>>> missing something?
indigator - 01 Feb 2005 15:19 GMT
Hey Dilip,
I guess I will do that. I just preferred passing it as a parameter to the
constructor since I didn't want client applications to call one extra method
to set the connection string. :)
Thanks for your help.
> Hello indigator,
> Why not just pass in an (encrypted ??) connection string as a parameter
[quoted text clipped - 58 lines]
> >>> Is it that web services do not support overloaded constructors? Am i
> >>> missing something?