Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 ASP.NET Connection Problem

Author  Topic 

bellis
Starting Member

1 Post

Posted - 2013-03-18 : 16:34:35
I am new to ASP.NET and am creating a restricted-access web page (through windows authentication) to be used on my company's intranet for SSRS developers to update a table on SQL server.

So that we can track who made changes to the table, we need to be able to pass the username of the web page user through to SQL server and record that windows username in a table.

The application works perfectly on localhost, but will not work when deployed to a web server running IIS.

The problem I am encountering is that when I attempt to use integrated security to pass the users username on the web server, I get--depending on precisely how IIS is configured--either an error 500 internal server error, or a connection error which seems to indicate that the web app is attempting to pass the application pool or server ID instead of the users ID.

Here is the string I am using:

add name="ConnectionStringName" connectionString="Data Source=server\instance;Initial Catalog=dbname;Persist Security Info=True;Integrated Security=True"
providerName="System.Data.SqlClient"

This web app will work if I specify an authorized username in the connection string, but then the specified username is listed as the web app user instead of the actual user.

Any idea what I am missing or doing wrong?
   

- Advertisement -