473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A webserivce that connects to different providers

J-T
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based on
the first paramter go through switch case statment or create classes and
interfaces for it .? I could n't find any samples that can give me some
idea.
Thankls for you time in advance.

Janathon
Dec 5 '05 #1
3 1091
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of course,
this means you might have to tweak some things (depending on whether or not
you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed so
that they all derive from common base classes (which means you can use the
abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based on
the first paramter go through switch case statment or create classes and
interfaces for it .? I could n't find any samples that can give me some
idea.
Thankls for you time in advance.

Janathon

Dec 5 '05 #2
J-T
Hello Nicholas,

I am using .Net Framework 2.0 ,so as you said there is no need for
enterprise library. Can you guide me to the some docs or examples of this?

Thanks a lot

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2******************@TK2MSFTNGP09.phx.gbl...
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of
course, this means you might have to tweak some things (depending on
whether or not you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed so
that they all derive from common base classes (which means you can use the
abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based
on the first paramter go through switch case statment or create classes
and interfaces for it .? I could n't find any samples that can give me
some idea.
Thankls for you time in advance.

Janathon


Dec 5 '05 #3
J-T,

If you look at the inheritance tree for SqlDataAdapter, SqlConnection,
SqlCommand, etc, etc, you will notice that they all derive from common base
classes (which the ole-db, odbc provider derive from as well). Once you
know where you have to get your data from, you can create an instance of
this provider, and then reference only the methods on the base classes
shared by all.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <J-*@nospam.com> wrote in message
news:u0****************@tk2msftngp13.phx.gbl...
Hello Nicholas,

I am using .Net Framework 2.0 ,so as you said there is no need for
enterprise library. Can you guide me to the some docs or examples of this?

Thanks a lot

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:%2******************@TK2MSFTNGP09.phx.gbl...
Janathon,

Well, basically, you will want to use the interfaces that are
implemented on the different connections/data-adapters and whatnot.

You might want to look into the Data block in the Enterprise Library.
They have pretty good abstractions for the different databases. Of
course, this means you might have to tweak some things (depending on
whether or not you use stored procs or dynamic/embedded sql).

Also, if you are using .NET 2.0, you might not need the enterprise
application blocks, since the classes for data access have been changed
so that they all derive from common base classes (which means you can use
the abstractions).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"J-T" <Re**@Reza.Com> wrote in message
news:ei****************@TK2MSFTNGP12.phx.gbl...
Hello,

I am trying to create a web service which has 3 parameters.

1) Datasource
2)USerName
3)Password

based on datasource and in the run time ,I have to switch between data
identity providers like sql server,AD, oracle and even another
authentication webservice. Can somebody gives me a clue how to program
this?.Shall I store all data source in web.config and in run-time based
on the first paramter go through switch case statment or create classes
and interfaces for it .? I could n't find any samples that can give me
some idea.
Thankls for you time in advance.

Janathon



Dec 5 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: J.MOUZAKIS | last post by:
Please help me to bring back the AspNetAccessProvider in VS2005. This provider was in the whidbey version (or beta 1). Although the idea of using SQLExpress is maybe the best, I have the problem of...
1
by: John | last post by:
Hi I have created custom membership/role/profile providers as per the web.config below. My questions are; 1. Have I defined them correctly? 2. How can I make the Login and Create User...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
1
by: Raymond | last post by:
Hi All, Can any one point me how I can use classic ASP to connect to a dot net SOAP webserice? The other company has set up dot net webserivce with web address like this: ...
0
by: awrigley | last post by:
Hi An app that was chuntering away quite happily to itself had roles added to it. Just two: Admins and Subscribers. However, I seem to have mucked up when assigning the role provider in the...
2
by: Bart | last post by:
Hi, I ran the same code with two different providers (oledb abd sqlclient), and i got two different behaviours. The code with OLEDB runs perfect without error. The same code with SQLClient...
2
by: =?Utf-8?B?Z292ZXI=?= | last post by:
Hello, I want to provide the ability to log on to a web application on our intranet using different credentials like they do in Sharepoint 2007. When a user hits the site, i want him...
11
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Is there a way in ASP.NET 2.0 to have different connection strings settings in a web.config files that are dynamically used based upon the server that the web application is running on? For...
0
by: Kjartan Furnes | last post by:
Hi, I'm trying to access a webservice on an axis server from my .net client (c#). First I have to call a login service that returns a session ID. This session id should then be added to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.