473,387 Members | 3,033 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,387 software developers and data experts.

Secure SqlConnection in Web apps

I have an ASP.NET application on IIS6 that will access a SQL2000 database. I would like to use integrated security, ie a connect string similiar to

ConnectionString = "workstation id=WEBSERVER;packet size=4096;integrated security=SSPI;data source=\"SQLSERVER\\INSTANCE\";persist security info=False;initial catalog=Northwind"

Naturally this fails running as-is

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

I've tried setting the Default Web Application pool to run under a domain service account, and then granting permissions to the database for that account. However, that results in a "Service Unavailable

Any quick pointers to doing this the right way? I am currently reading through "Building Secure Microsoft ASP.NET Applications"

Thanks

--Adam
Nov 18 '05 #1
1 873
hi

just try to use like thi

"Data Source=SQlServerName;Initial Catalog=pubs;Integrated Security=SSPI;"
- or
"Server=SQlServerName;Database=pubs;Trusted_Connec tion=True;

Hope this will help u somewhat !

Thank
Piyush
Nov 18 '05 #2

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

Similar topics

6
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic...
6
by: Jochen Berger | last post by:
We've got a serious problem. For invoicing I get the ID for a group of assignments. I open one(!) SqlConnection, select all data rows of that group, start one(!) transaction, and then I update the...
16
by: ed_p | last post by:
Hello, I have implemented the singleton pattern for a class to hold a SqlConnection object that will be used thruout the application to create commands. My application is a simple Windows Form...
4
by: Jurgen | last post by:
Hello, I'm looking for a way to protect some C# libraries (DLL's) with serial keys to prevent unauthorized use and/or copying and/or installing. I've seen allready a number of products, but they...
7
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of...
4
by: ad | last post by:
I want to set integrated Secure in my connect string to SQL Server I set the connect string as: workstation id=xxx;packet size=4096;integrated security=SSPI;initial catalog=vvv;persist...
7
by: John | last post by:
Hi With the availability of tools like this; http://www.remotesoft.com/salamander/ 1. How safe is the source of .net apps? 2. Is MS using .net to write any of their apps? If so,...
7
by: Jim Butler | last post by:
I have this error that is happening on all of our web servers (production included). It basically started occurring once we loaded 2005 sql client tools, asp.net 2.0 (and all related prerequistes)...
9
by: Tomasz | last post by:
Hello everybody, i'm writing an application, which should be connected all the time to the database. So i want to test it in few ways if reconnection works in order. First thing i tried to do is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.