aspose file tools*
The moose likes Meaningless Drivel and the fly likes Why I'm learning to hate .Net Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Why I Watch "Why I New topic
Author

Why I'm learning to hate .Net

Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I have been trying to develop a simple distributed web service using .Net. The client calls the web service and the web service calls the database on a different server. Well, guess what? .NET sucks on distributed architecture. .NET won't pass the clients credentials to the database. .NET won't pass its own credentials to the database. .NET sucks. So how do you get this to work (not that I have gotten it to work yet)? You have to build a "ServicedComponent" object which is basically a link to a COM+ dll! Which means that you have to deal with the nightmare of COM's meaningless error codes. This should be the simplest distributed architecture and Microsoft has completely blown it. Microsoft sucks!!!


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome back.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
Good Bye Thomas
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Good night, Tom


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Thomas
Glad to see you've finaly come to your senses. We knew you'd get better.


Dave
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Thomas, maybe there is another way to do what you want to achieve.
Like using ASP.net to act as the web service. I think of a web service as a non-user/password method call, meaning you might need to use a user and password to get to the web server, but once you do and you call the web service, the web service has no more security, and has free access to the database.
In that I mean that the webservice object doesn't need a user password from the client to pass to the database. the webservice object already has one user password that it uses for all users, of course this data is encapsulated in the webservice object, so that no one can see it.
Now I am not an expert or have really good experience in .net, I have taken a class , but I think the problem is more in the design, or choice of implementation.
Hope that helps
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I should clarify that this is an intranet application. The idea was that the web service would use the windows credentials of the user that is using the web service. So we couldn't get that to work off the web service server so we went with the idea of passing a user id/password as part of the connection string. Wouldn't work. SQL Server insists on using Windows credentials. Since the web service doesn't have a network id, it uses the anonymous_user id and fails on the security check.
The solution from Microsoft was to use COM. Which means that .NET apparently isn't designed for an Enterprise level distributed architecture.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
You can never truly turn from the dark side.


Matthew Phillips
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Originally posted by Thomas Paul:
The solution from Microsoft was to use COM.

WHAT!!!
You have got to be kidding me. That was one of the things that they kept saying. "This is so great - you don't have to deal with COM any more".
:roll: sheesh


"JavaRanch, where the deer and the Certified play" - David O'Meara
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

so we went with the idea of passing a user id/password as part of the connection string. Wouldn't work.

Really. Are you sure the connection string was 100% correct? Did it run in a seperate class that is not a web service?
Mark
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Absolutely. If the database is on the same server as the web service then it runs fine. If the database is on another server then it fails. The web service always tries to log into the SQL Server as anonymous.
Here is my exchnage with one of the guys at Microsoft. The ServicedComponent object that he is recommending is a .NET hook into a COM component. This is my favorite quote in poor Andy's response, "I'm not certain of the best solution..." The most basic distributed architecture and Microsoft has no solution. Un-friggin believable.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Your right Thomas, I keep thinking Logically, and not Microsoftly.
Mark
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Strange.
Sounds like an all or nothing approach in security?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Forgot to put in the link to my exchange with the Microsoft guy:
http://www.gotdotnet.com/community/messageboard/Thread.aspx?id=16399
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Interesting. I guess the seams are starting to show eh? I don't doubt MS wants to have a nice seamless architecture for their enterprise space, but it seems clear that .Net is still a mostly marketing facade to their existing toolsets.


Rob
SCJP 1.4
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
btw, do you *have* to use NT credentials with MSSql server, or isn't there an option to just use a regular user name and password login and let SQL server authenticate based on it's own list of users?
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Take out the nouns of this conversation -- just leave in the verbs and the semantics of problems and responses -- and this topic sounds like every Microsoft technology discussion I've ever been privy too, from Microsoft Windows for Workgoups and Microsoft LAN Manager on up.
The more things change, the more they stay the same.
[ May 18, 2002: Message edited by: Michael Ernest ]

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320

Originally posted by Michael Ernest:

*WARNING*
so far off topic it's not even funny
*END WANRING
Love your book man.


SOURCE CODE should be SURROUNDED by "code" tags.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Welcome back, Tom.
I am not surprised, its Microsoft technology right?
Its so easy to use, once you do it their way. - Someone's signature.

- madhav


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Rob Ross:
btw, do you *have* to use NT credentials with MSSql server, or isn't there an option to just use a regular user name and password login and let SQL server authenticate based on it's own list of users?

You can use a regular id and password but MS SQLServer insists that you come in on a "trusted connection". What's a trusted connection, you ask? Why that's a connection with a valid network id! Which means that you are screwed either way.
We will be back to the drawing board on Monday trying a few other things. I'll let you know if we make any progress.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why I'm learning to hate .Net