Microsoft Knowledge Base Email Alertz

(176380) - When you use Microsoft SQL Server with Integrated or Mixed Security with Microsoft Internet Information Server (IIS), it may be necessary to access SQL Server from a guest account. You can set up a guest account to work around problems connecting an...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 176380 - Last Review: March 22, 2007 - Revision: 5.4

How To Use ASP with a SQL Trusted Connection with Guest Account

This article was previously published under Q176380

On This Page

SUMMARY

When you use Microsoft SQL Server with Integrated or Mixed Security with Microsoft Internet Information Server (IIS), it may be necessary to access SQL Server from a guest account. You can set up a guest account to work around problems connecting an IIS computer to SQL Server on a separate physical computer over a trusted connection.

This method allows IIS, using Active Server Pages (ASP), to access a SQL Server over a trusted connection, but the method limits all SQL access to guest access only. If you want all users to connect to the SQL Server and maintain their identity to properly map to different privilege levels in SQL Server, you will need to use Basic authentication.

Create a Guest Account to Access SQL Server from an IIS Server

Create an NT user account (WEBUSER for this example) that both computers can access. To do this:
  1. Create an user account on the domain controller called WEBUSER.

    Note  If this is not possible, a local user account must be set up on both the IIS computer and the computer that is hosting SQL Server. Make sure that the passwords match on all accounts you create and keep track of this password.
  2. Add the WEBUSER account to the guests group of both the SQL Server and the IIS computer.
  3. On the computer that is running IIS, start the Internet Service Manager.
  4. Open the properties for the WWW service.
  5. In the Anonymous Logon section on the Service tab of this dialog box, change the user name to WEBUSER and the password to the password that you used in step 1.
  6. On the computer that is hosting SQL Server, use the Security manager to map the WEBUSER account to an existing user logon on SQL Server. For more information on how to do this, consult the SQL Server documentation.
Make sure that any pages that need to access the SQL Server are accessible by the WEBUSER account. All users that browse these pages will be authenticated by NT as the WEBUSER; consequently, all connections to SQL Server will be made as the WEBUSER.

REFERENCES

For the latest Knowledge Base artices and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:



APPLIES TO
  • Microsoft Active Server Pages 2.0
  • Microsoft Active Server Pages 3.0
  • Microsoft Internet Information Server 3.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
Keywords: 
kbhowto kbhowtomaster kbsecurity kbwebserver KB176380
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate