Hi,
My application is acting weird and the research I've done leads me to an answer why it's breaking, but not how to fix it.
My web app is hosted by a remote company. I have the main website sitting in the root web directory and in a subfolder I have another application that will handle login and updating the content in the SQL 2K5 backend (not an Express DB).
The website itself is able to pull in informaiton from the DB without any trouble, so I know it's able to connect to the DB and everything is peachy. The login app though is acting as though it can't get to the DB. I've applied the ASPNET schema to the DB using the aspnet_regsql.exe from the framework and the login application is using the same connection string as the main website.
One thing to note here is that the website and the login app have seperate web.config files since they were developed as different projects.
With my customized provider defined in the web.config for the login app I get this error on page load:
"Parser Error Message:Itis an error to use a section registered asallowDefinition='MachineToApplication' beyond application level. Thiserror can be caused by a virtual directory not being configured as anapplication in IIS."
If I comment out the custom provider, the page loads but when I try to create a user it tells me that "...the SQL Server couldn't be contacted. This may be because it doesn't accept remote connections." Thing of it is that it's not a remote connection and it's the same connection string and db as the other site.
Now, the research I've done points at the two different web.config files, which makes sense. But how do I make the one web.config work for both the website and the subdirectory with the login app? Keep in mind that I can't create any new virtual directories or modify IIS since this is a remote hosting company.
Can someone help me understand the fix with a little more clarity?
Your admin application needs to be setup as a Virtual Directory. Your hosting company will have to do this for you. You know you can make it all one application and just control which Roles/Users have access to the admin folder in the web.config? :>
No comments:
Post a Comment