-
April 2nd, 2019, 10:17 AM
#1
Web.config error in 2017
Hello
I am coming to terms with the Web Forms Identity template and when I try to compile my Web Forms project in VS 2017, I get the following: error ASPCONFIG in my Web.config(18) file:
'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'.
I see no reference to allowDefinition or MachineToApplÃ*cation in the entire Solution - let alone Web.config - when I search for either of those terms. This is line 18 in my Web.config file:
Code:
<authentication mode="None"/>
There seems to be two servers that my project uses which I can see in SQL Server Object Explorer:
(localdb)\MSSQLLocalDB (SQL Server 13.0.4001)
(localdb)\ProjectsV13 (SQL Server 13.0.4001)
If I need to configure a virtual directory as an application in IIS, how would I do that and which directory?!
It's all a bit beyond me, but thank you for any help.
Thanks
-
April 2nd, 2019, 08:09 PM
#2
Re: Web.config error in 2017
Are you running Visual Studio as an administrator? If not, try running it as an admin. See if the problem resolves itself (if not, post back).
-
April 4th, 2019, 07:38 AM
#3
Re: Web.config error in 2017
Hello Arjay
Thanks for your reply.
Unfortunately, I am still getting that same error as administrator in Cmd Prompt which is how I usually compile:
C:\Users\Steve\source\repos\WebFormsIdentity\webformsidentity\web.config(18): error ASPCONFIG: 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.
C:\>
I can trying compiling (building?) via VS 2017 as admin, though I have never done it that way before.
Thanks again.
-
April 6th, 2019, 05:50 AM
#4
Re: Web.config error in 2017
Hello Arjay
This is the output of my 'Build' test from within VS2017 itself.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
I assume that these pre-compiled files (I selected the pre-compile checkbox during the build) still need to be compiled before FTP uploading them to my Web hosting service's server, but that still doesn't resolve the server 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' - that I get through Cmd Prompt, does it?
Thanks again.
-
April 6th, 2019, 03:09 PM
#5
Re: Web.config error in 2017
Is IIS installed on the machine where you are compiling the code? Have you created an IIS virtual application?
-
April 8th, 2019, 06:43 AM
#6
Re: Web.config error in 2017
Thanks, Arjay
Yes, IIS is installed - I can see the icon next to the clock on my screen. I haven't created a virtual application, no. I wouldn't know how to do it! The error implies that I should be, doesn't it?
Thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|