954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Running apps in subfolders in Visual Studio with MS SQL

I have searched the world over for answers to my dilemma and have learned a lot, but not what I need to know.

My programmer compiled our website and pushed it to the server and sent me the source code. I cannot get the source to compile.
I have a web application (two of them, actually, since I have added one) nested in the primary app. The primary has its own web.config, as do both of the nested apps. It works fine online, but I cannot get it to work on my testing server. When working with the ASP.Net server using VS 2008, the primary application works but the secondary apps do not:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

If I run the site from http://localhost , the primary app cannot access the database:
System.Data.SqlClient.SqlException: Cannot open database "pac_bkbfc" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\bkbfightclub.com'.

I have configured the virtual directories as applications in IIS to no avail, and I have given every user imaginable permissions to the folders, and I have run out of options.

Please help.

CNIDog
Newbie Poster
12 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

>> Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Did you upgrade versions of visual studio? If you do that it creates backup files which will cause this error message to occur.

>>System.Data.SqlClient.SqlException: Cannot open database "pac_bkbfc" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\bkbfightclub.com'.

You need to specify a username and password in your connection string. If your connection string uses windows authentication it will work fine during development because it uses your developer account. When you deploy and run it on full-blown IIS it uses an unpriveledged user account which doesn't authenticate.

sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: