views:

491

answers:

1

I'm trying to host an asp.net website using iis 5.1 on my computer using xp pro.

I'm using windows authentication in iis. Folder permissions for the site are set to allow authenticated users. Impersenation has been set to true in the web.config file.

The website uses a local database which works just fine when accessed through VWD express 08. But when i try to access it over the internet i get the following error:

"User does not have permission to perform this action."

how do i allow users authenticated by iis's windows authentication to access the database or set database access to everyone?

A: 

The problem is that if you are working with Windows autentication, each user that access your app from the Internet is recognized as IURS_machinename, and of course this user has to be accepted as a user database, but is not so a good idea.

Try to change the type of user permission of your database to SQL managed and create a SQL database user with the requiered properties to access the objects of the database you need to from the application. Then just change your connection string to use the new created user.

backslash17
IURS_machinename came up before i enabled impersenation. in the web.config file i have set impersenation to true. so when i use: WindowsIdentity user = WindowsIdentity.GetCurrent(); user.Name; it gives me Domain/loginName of the windows credentials initially used to login.
see_sharp_guy