Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to launch a web service from Visual Web Developer using IIS. When I open the .asmx file in a web browser, I get an error that I do not have permission to access that page.

I am using windows automatic authentication in SQL Server Express. I read that I need to give SQL server the machine username and password to get this to work, but I don't know how to set that up. Can anyone point me in the right direction?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

My suspicion is the permissions issue is not with SQL Server (or if it is, that is a separate issue).

Instead I most often encounter what you are seeing when IIS does not have permission to access the source files on the disk. I would suggest going to Explorer, finding the folder containing your source files, and ensuring the account that IIS is running under has permission to read those files.

If that is not the issue, it would be helpful if you could paste the exact error text.

share|improve this answer
    
Great! I just fixed it. –  Bryan Oct 25 '09 at 17:10
add comment

Is the error related to SQL Server? If so then you're probably on the right track. There are multiple errors that could cause a webpage to fail.

Windows auth should be fine, as long as the user you are connecting with has access. In the case of IIS, the app pool user needs to be a user that has access to SQL Server. Just create a custom user, assign to the app pool for your site and grant that user access to SQL server.

However, if you do decide to switch to sql auth, also fully acceptable, a good place to start is http://www.connectionstrings.com/. You can get any connection string that you need from there.

share|improve this answer
    
Thanks a lot! Very helpful. –  Bryan Oct 25 '09 at 17:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.