Showing posts with label applications. Show all posts
Showing posts with label applications. Show all posts

Monday, March 12, 2012

integrated authentication

Hi,

I am writing project in asp .net with sql server 2005. But I need support him by some applications like deamon in linux systems.(but it will be in windows) So i write it in java. I download jdbc driver and install it. I wrote simple project:

package MainW;

//import javax.mail.*;

//import javax.mail.internet.*;

//import com.sun.mail.smtp.*;

//import javax.swing.*;

//import java.awt.*;

//import java.awt.event.*;

//import java.io.*;

import java.sql.*;

//import java.text.DateFormat;

//import java.text.SimpleDateFormat;

//import java.util.*;

//import java.util.Date;

class Main

{

public static void main(String[] args)

{

String connectionUrl = "jdbc:" + "sqlserver://localhost;databaseName=ASPNETDB.MDF;IntegratedSecurity=True";

Connection con = null;

Statement stmt = null;

ResultSet rs = null;

try

{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

con = DriverManager.getConnection(connectionUrl);

String SQL = "SELECT * FROM aspnet_Users";

stmt = con.createStatement();

rs = stmt.executeQuery(SQL);

// Iterate through the data in the result set and display it.

while (rs.next())

{

System.out.println(rs.getString(4) + " " + rs.getString(6));

}

}

catch (Exception e)

{

e.printStackTrace();

}

finally

{

if (rs != null) try { rs.close(); } catch(Exception e) {}

if (stmt != null) try { stmt.close(); } catch(Exception e) {}

if (con != null) try { con.close(); } catch(Exception e) {}

}

}

}

But i have error:

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.AuthenticationJNI SNISecGenClientContext

WARNING: Initialize context failed

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.SQLServerConnection SSPIData

WARNING: ConnectionID:1 TransactionID:0x0000000000000000 Authentication failed code-2146893052

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.SSPIData(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at MainW.Main.main(Main.java:29)

I am googling about this error second day but i cannot find solve.

Please help.

The failure code -2146893052 is 0x80090304. Some results on the Internet mentions firewall blocking the SQL Server TCP port, but since you are connecting to the local machine it should not be a problem. I also heard of out of memory scenarios causing this error to be raised.

I think it would be helpful if you can mention the environment setup you are running the app under. Also, which SQL Server 2005 edition on you using?

Some things you may consider trying:

On the same machine, try running the "sqlcmd" tool that comes with SQL Server 2005 to see if you get the same error

sqlcmd -Slocalhost -E

Integrated Auth vs SQL Auth

I know integrated Auth is preferred, but how does one use integrated auth
for web applications when customers are external ?
I know we can have integrated auth for internal customers where all these
customers have a valid domain account and we can add these domain accouts as
logins to SQL
How does one set up integrated auth for external customers coming thru the
front end web application ?
Is SQL Auth not secure and not recommended by MS ? When would one use SQL
Auth ?
Thanksif its through an ASP.Net application, then you can use the delegation.
the user is authenticated at the web level, then using the impersonation
feature of the ASP.NET the web delegates the user for database access.
if your database server & web servers are on 2 separete servers, then you
have to made some configuration in your active directory.
(If you use Basic authentication for the web access, this config is not
required)
you have to setup the Kerberos delegation.
search for kerberos delegation with IIS under on the microsoft web site to
found more information.
"Hassan" <hassan@.hotmail.com> wrote in message
news:e4ymgzQ%23FHA.3340@.TK2MSFTNGP12.phx.gbl...
>I know integrated Auth is preferred, but how does one use integrated auth
>for web applications when customers are external ?
> I know we can have integrated auth for internal customers where all these
> customers have a valid domain account and we can add these domain accouts
> as logins to SQL
> How does one set up integrated auth for external customers coming thru the
> front end web application ?
> Is SQL Auth not secure and not recommended by MS ? When would one use SQL
> Auth ?
> Thanks
>|||"I know integrated Auth is preferred, but how does one use integrated
auth
for web applications when customers are external ? "
-If you have many customers I wouldn=B4t prefer Windows authentication
on a user basis as a good approach, because you have to maintain the
users in your active directory (create, alter,etc) and the most worst
thing, you have to buy Windows CALs as well as SQL Server CALs (if you
don=B4t have a processor licence for the server).
-If you want to accomplish the authentication via using a service
Windows account which can be authentication in the WIndows Domain and
usally the Webserver is running on I can tell you that this is a very
common approach. But remember that even only 1 (Windows) User is
accessing the SQL Server you have to get appropiate SQL Server Cals OR
or processor licence for the SQL Server machine.
"How does one set up integrated auth for external customers coming thru
the.."
-YOu can setup the web server to use basis authentication for
connection made from outside the intranet. Though this is basis
authentication you should use a SSL Certificate to encrypt your data,
otherwise data (Username / password) "could" be compromised over the
internet.
"Is SQL Auth not secure and not recommended by MS ? When would one use
SQL Auth ?"
-SQL Server Auth is for example used when you don=B4t have a Active
Directory, if you handle your security within your application and
therefore only have to access via one user, if you have plenty of time
maintaining twice users and groups if you plan to administer them on a
per user basis.
HTH, Jens Suessmeyer.|||Hi,
its recomended to use Windows Authentication with Kerbros for more secure
communication ,
www.sql-server-performance.com/foru...?TOPIC_ID=11499
http://ureader.com/group/456-1.aspx
support.microsoft.com/default.aspx?ID=kb;en-us;Q247931
www.eggheadcafe.com/forums/ForumPos...D=43760&INTID=9
www.codecomments.com/archive319-2005-10-639284.html
www.codecomments.com/archive319-2005-9-597955.html
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Jens" wrote:

>
> "I know integrated Auth is preferred, but how does one use integrated
> auth
> for web applications when customers are external ? "
> -If you have many customers I wouldn′t prefer Windows authentication
> on a user basis as a good approach, because you have to maintain the
> users in your active directory (create, alter,etc) and the most worst
> thing, you have to buy Windows CALs as well as SQL Server CALs (if you
> don′t have a processor licence for the server).
> -If you want to accomplish the authentication via using a service
> Windows account which can be authentication in the WIndows Domain and
> usally the Webserver is running on I can tell you that this is a very
> common approach. But remember that even only 1 (Windows) User is
> accessing the SQL Server you have to get appropiate SQL Server Cals OR
> or processor licence for the SQL Server machine.
>
> "How does one set up integrated auth for external customers coming thru
> the.."
> -YOu can setup the web server to use basis authentication for
> connection made from outside the intranet. Though this is basis
> authentication you should use a SSL Certificate to encrypt your data,
> otherwise data (Username / password) "could" be compromised over the
> internet.
>
> "Is SQL Auth not secure and not recommended by MS ? When would one use
> SQL Auth ?"
> -SQL Server Auth is for example used when you don′t have a Active
> Directory, if you handle your security within your application and
> therefore only have to access via one user, if you have plenty of time
> maintaining twice users and groups if you plan to administer them on a
> per user basis.
> HTH, Jens Suessmeyer.
>

Integrated Auth vs SQL Auth

I know integrated Auth is preferred, but how does one use integrated auth
for web applications when customers are external ?
I know we can have integrated auth for internal customers where all these
customers have a valid domain account and we can add these domain accouts as
logins to SQL
How does one set up integrated auth for external customers coming thru the
front end web application ?
Is SQL Auth not secure and not recommended by MS ? When would one use SQL
Auth ?
Thanksif its through an ASP.Net application, then you can use the delegation.
the user is authenticated at the web level, then using the impersonation
feature of the ASP.NET the web delegates the user for database access.
if your database server & web servers are on 2 separete servers, then you
have to made some configuration in your active directory.
(If you use Basic authentication for the web access, this config is not
required)
you have to setup the Kerberos delegation.
search for kerberos delegation with IIS under on the microsoft web site to
found more information.
"Hassan" <hassan@.hotmail.com> wrote in message
news:e4ymgzQ%23FHA.3340@.TK2MSFTNGP12.phx.gbl...
>I know integrated Auth is preferred, but how does one use integrated auth
>for web applications when customers are external ?
> I know we can have integrated auth for internal customers where all these
> customers have a valid domain account and we can add these domain accouts
> as logins to SQL
> How does one set up integrated auth for external customers coming thru the
> front end web application ?
> Is SQL Auth not secure and not recommended by MS ? When would one use SQL
> Auth ?
> Thanks
>|||"I know integrated Auth is preferred, but how does one use integrated
auth
for web applications when customers are external ? "
-If you have many customers I wouldn=B4t prefer Windows authentication
on a user basis as a good approach, because you have to maintain the
users in your active directory (create, alter,etc) and the most worst
thing, you have to buy Windows CALs as well as SQL Server CALs (if you
don=B4t have a processor licence for the server).
-If you want to accomplish the authentication via using a service
Windows account which can be authentication in the WIndows Domain and
usally the Webserver is running on I can tell you that this is a very
common approach. But remember that even only 1 (Windows) User is
accessing the SQL Server you have to get appropiate SQL Server Cals OR
or processor licence for the SQL Server machine.
"How does one set up integrated auth for external customers coming thru
the.."
-YOu can setup the web server to use basis authentication for
connection made from outside the intranet. Though this is basis
authentication you should use a SSL Certificate to encrypt your data,
otherwise data (Username / password) "could" be compromised over the
internet.
"Is SQL Auth not secure and not recommended by MS ? When would one use
SQL Auth ?"
-SQL Server Auth is for example used when you don=B4t have a Active
Directory, if you handle your security within your application and
therefore only have to access via one user, if you have plenty of time
maintaining twice users and groups if you plan to administer them on a
per user basis.
HTH, Jens Suessmeyer.|||Hi,
its recomended to use Windows Authentication with Kerbros for more secure
communication ,
www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=11499
http://ureader.com/group/456-1.aspx
support.microsoft.com/default.aspx?ID=kb;en-us;Q247931
www.eggheadcafe.com/forums/ForumPost.asp?ID=43760&INTID=9
www.codecomments.com/archive319-2005-10-639284.html
www.codecomments.com/archive319-2005-9-597955.html
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Jens" wrote:
>
> "I know integrated Auth is preferred, but how does one use integrated
> auth
> for web applications when customers are external ? "
> -If you have many customers I wouldn´t prefer Windows authentication
> on a user basis as a good approach, because you have to maintain the
> users in your active directory (create, alter,etc) and the most worst
> thing, you have to buy Windows CALs as well as SQL Server CALs (if you
> don´t have a processor licence for the server).
> -If you want to accomplish the authentication via using a service
> Windows account which can be authentication in the WIndows Domain and
> usally the Webserver is running on I can tell you that this is a very
> common approach. But remember that even only 1 (Windows) User is
> accessing the SQL Server you have to get appropiate SQL Server Cals OR
> or processor licence for the SQL Server machine.
>
> "How does one set up integrated auth for external customers coming thru
> the.."
> -YOu can setup the web server to use basis authentication for
> connection made from outside the intranet. Though this is basis
> authentication you should use a SSL Certificate to encrypt your data,
> otherwise data (Username / password) "could" be compromised over the
> internet.
>
> "Is SQL Auth not secure and not recommended by MS ? When would one use
> SQL Auth ?"
> -SQL Server Auth is for example used when you don´t have a Active
> Directory, if you handle your security within your application and
> therefore only have to access via one user, if you have plenty of time
> maintaining twice users and groups if you plan to administer them on a
> per user basis.
> HTH, Jens Suessmeyer.
>

Integrated Auth vs SQL Auth

I know integrated Auth is preferred, but how does one use integrated auth
for web applications when customers are external ?
I know we can have integrated auth for internal customers where all these
customers have a valid domain account and we can add these domain accouts as
logins to SQL
How does one set up integrated auth for external customers coming thru the
front end web application ?
Is SQL Auth not secure and not recommended by MS ? When would one use SQL
Auth ?
Thanks
if its through an ASP.Net application, then you can use the delegation.
the user is authenticated at the web level, then using the impersonation
feature of the ASP.NET the web delegates the user for database access.
if your database server & web servers are on 2 separete servers, then you
have to made some configuration in your active directory.
(If you use Basic authentication for the web access, this config is not
required)
you have to setup the Kerberos delegation.
search for kerberos delegation with IIS under on the microsoft web site to
found more information.
"Hassan" <hassan@.hotmail.com> wrote in message
news:e4ymgzQ%23FHA.3340@.TK2MSFTNGP12.phx.gbl...
>I know integrated Auth is preferred, but how does one use integrated auth
>for web applications when customers are external ?
> I know we can have integrated auth for internal customers where all these
> customers have a valid domain account and we can add these domain accouts
> as logins to SQL
> How does one set up integrated auth for external customers coming thru the
> front end web application ?
> Is SQL Auth not secure and not recommended by MS ? When would one use SQL
> Auth ?
> Thanks
>
|||"I know integrated Auth is preferred, but how does one use integrated
auth
for web applications when customers are external ? "
-If you have many customers I wouldn=B4t prefer Windows authentication
on a user basis as a good approach, because you have to maintain the
users in your active directory (create, alter,etc) and the most worst
thing, you have to buy Windows CALs as well as SQL Server CALs (if you
don=B4t have a processor licence for the server).
-If you want to accomplish the authentication via using a service
Windows account which can be authentication in the WIndows Domain and
usally the Webserver is running on I can tell you that this is a very
common approach. But remember that even only 1 (Windows) User is
accessing the SQL Server you have to get appropiate SQL Server Cals OR
or processor licence for the SQL Server machine.
"How does one set up integrated auth for external customers coming thru
the.."
-YOu can setup the web server to use basis authentication for
connection made from outside the intranet. Though this is basis
authentication you should use a SSL Certificate to encrypt your data,
otherwise data (Username / password) "could" be compromised over the
internet.
"Is SQL Auth not secure and not recommended by MS ? When would one use
SQL Auth ?"
-SQL Server Auth is for example used when you don=B4t have a Active
Directory, if you handle your security within your application and
therefore only have to access via one user, if you have plenty of time
maintaining twice users and groups if you plan to administer them on a
per user basis.
HTH, Jens Suessmeyer.
|||Hi,
its recomended to use Windows Authentication with Kerbros for more secure
communication ,
http://www.sql-server-performance.co...TOPIC_ID=11499
http://ureader.com/group/456-1.aspx
support.microsoft.com/default.aspx?ID=kb;en-us;Q247931
http://www.eggheadcafe.com/forums/Fo...=43760&INTID=9
http://www.codecomments.com/archive3...10-639284.html
http://www.codecomments.com/archive3...-9-597955.html
Regards
Andy Davis
Activecrypt Team
SQL Server Encryption Software
http://www.activecrypt.com
"Jens" wrote:

>
> "I know integrated Auth is preferred, but how does one use integrated
> auth
> for web applications when customers are external ? "
> -If you have many customers I wouldn′t prefer Windows authentication
> on a user basis as a good approach, because you have to maintain the
> users in your active directory (create, alter,etc) and the most worst
> thing, you have to buy Windows CALs as well as SQL Server CALs (if you
> don′t have a processor licence for the server).
> -If you want to accomplish the authentication via using a service
> Windows account which can be authentication in the WIndows Domain and
> usally the Webserver is running on I can tell you that this is a very
> common approach. But remember that even only 1 (Windows) User is
> accessing the SQL Server you have to get appropiate SQL Server Cals OR
> or processor licence for the SQL Server machine.
>
> "How does one set up integrated auth for external customers coming thru
> the.."
> -YOu can setup the web server to use basis authentication for
> connection made from outside the intranet. Though this is basis
> authentication you should use a SSL Certificate to encrypt your data,
> otherwise data (Username / password) "could" be compromised over the
> internet.
>
> "Is SQL Auth not secure and not recommended by MS ? When would one use
> SQL Auth ?"
> -SQL Server Auth is for example used when you don′t have a Active
> Directory, if you handle your security within your application and
> therefore only have to access via one user, if you have plenty of time
> maintaining twice users and groups if you plan to administer them on a
> per user basis.
> HTH, Jens Suessmeyer.
>

Wednesday, March 7, 2012

Installing SQL Reporting Services on 2 Tiers

I would like to install the Report Manager on a web tier and the Reporting
Services on an applications tier behind a firewall. The install program
automatically installs Report Manager and Services on the same box, but it
seems that the Manager is only a UI for calling the Services which are web
services. We would like to call the services from the web tier through 443
on the firewall to the application tier. Can anyone provide assistance on if
and how we could install Reporting Services as mentioned above?
Thanks!Report Manager and Reporting Services are both asp.net application. As you
noted Report Manager is essentially a portal. Report Manager and Reporting
Services must be on the same box. However, Reporting Services and the
database do not need to be on the same box.
So, if you are planning on using Report Manager portal as the UI to
Reporting Services, then what you want to do is not possible (separating the
two). If, however, you are planning on using your own web page then it is
possible. There are two ways to integrate, web services and URL integration.
URL integration however only works if the Report Server is visible to the
client, which, again, is not what you want. You would need to use web
services to integrate with your own web site.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ChrisG" <ChrisG@.discussions.microsoft.com> wrote in message
news:8D6B764F-3365-406C-B65A-BF9477F947A5@.microsoft.com...
>I would like to install the Report Manager on a web tier and the Reporting
> Services on an applications tier behind a firewall. The install program
> automatically installs Report Manager and Services on the same box, but it
> seems that the Manager is only a UI for calling the Services which are web
> services. We would like to call the services from the web tier through
> 443
> on the firewall to the application tier. Can anyone provide assistance on
> if
> and how we could install Reporting Services as mentioned above?
> Thanks!