Last post Aug 18, 2009 05:10 PM by bbxrider
Aug 16, 2009 08:04 PM|bbxrider|LINK
my app runs of course in my vs2005 environment, and it works on my own iis 5.1 limited version on win xp.
for my iis site, i just copied the .aspx, its associated .vb, styles.css, global.asax my root dir, i never copied the web.config. i created the application directories needed
when i copied/did the same to the godaddy site, it wasn't to the site root dir but a sub-directory under the root i wanted to run it from. right away i got an error msg about settings in a web.config file, so i added the web.config file from my vs2005, and
had to add a <customErrors mode="Off"/> section just so i could see the errors on a remote machine.
now the error i'm getting is about the web.config,
it highlights this line:
Line 54: <authentication mode="Windows"/>
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.
Aug 16, 2009 11:37 PM|pramsperger|LINK
You can't use Windows authentication on a server in a domain you don't control. You can try using authentication mode="Forms".
Aug 16, 2009 11:47 PM|kgooding|LINK
Try adding <authentication mode="None" />.
Aug 16, 2009 11:54 PM|HostingASPNet|LINK
You could read more about Authentication in ASP.NET here -
Aug 17, 2009 04:54 AM|bbxrider|LINK
'Forms' or 'None' these do not work, what finally worked was just commenting out the authentication completely. there doesn't appear to be an easy answer to this. i'm afraid as a programmer developing a web form application i don't have the time right now
to become an expert on the interplay between .net and iis authentication. the godaddy support is essentially useless because they just say they can't provide application support, their security is what is it is but they can't say what that is, and other solutions
i've seen to create an 'application name' in iis just are not available to a hosted account.
Aug 17, 2009 08:45 AM|pramsperger|LINK
You can definately use Forms authentication, I have a site running it right now. Check in your IIS Settings on GoDaddy that you're allowing anonymous authentication.
Aug 17, 2009 02:29 PM|bbxrider|LINK
yes anonymous is currently allowed at site root, however i'm running out of a directory 1 level below the root directory, and i don't see access to that specifically in the godaddy iis panel
Aug 17, 2009 04:06 PM|bbxrider|LINK
ok, here's what works, turns out the web.config file needs to go in the site root, not the directory where the application lives.
authentication mode = forms works there. the other way to do this is to make/classify the application root directory as an iis application with the iis property panel for the directory.
if anybody can explain, how an authentication mode of forms in the web.config file is equivalent to making a directory to be known as an 'application' to iis is somehow the same? when i say same, it allows iis and .net to publish the .aspx web page that
resides in the directory under the site root directory and not get the error in the original post
Aug 17, 2009 11:02 PM|rtccroy|LINK
I've been looking for possible solutions regadring the error message. Maybe the discussion on this topic might help you, you can view it at http://www.dotnetmonster.com/Uwe/Forum.aspx/asp-net-web-services/4644/Error-authentication-mode-Windows
Aug 18, 2009 12:51 AM|bbxrider|LINK
well, the main idea presented in the above link is to classify the top directory of your pages as an 'application' in iis, which means you need access the iis snapin/management console. i don't know much about other hosters but godaddy doesn't give out that
capability, and i would think thats pretty common amongst hosters. so if thats the case then one needs a workaround. for me the workaround has been to put the web.config file in my godaddy site root directory, which is different from my 'application' directory.
so still have the same question. put a slightly different way from before: .net is unhappy if an .aspx page is in a directory that has not been classified as an application in iis OR doesn't have an acceptable 'authentication mode' from a web.config file.
the web.config file evidently can't be present in the same directory as the .aspx page, but must be present in root directory for the entire domain. sorry this all seems really whacked to me. if .net and iis are so fussy about a directory being an 'application'
why wouldn't it be appropriate for the web.config file to be in the top directory, allowing each 'application' to have its own particular provisioning.
Aug 18, 2009 10:31 AM|pramsperger|LINK
Your question is confusing and I think you may be confusing yourself.
Certain aspects of an asp .net application can only be specified at the root application level, such as authentication. This root level can really be just about anywhere in a web server directory structure as long as it's not embedded in the directory structure
of another asp .net application.
Authentication is an application level concept, where you can allow and deny access to users and roles in the web.config file without having to code each page to do so. This is particularly important for non code files such as images, scripts or other file
types that aren't pages. If you don't want people looking at pictures you've put on a site without logging in first, how are your .aspx pages going to handle somebody just typing in the URL for those file types directly?
The asp .net application handles that based on the authentication setting you've defined at the application level and you want it that way.
Hope that helps.
Aug 18, 2009 05:10 PM|bbxrider|LINK
ok thanks, sounds like the web.config file is real powerful then, another project, but if it can simplify or add additional authentication features, sounds to be worth it.
for my app, it didn't work when placed in the app directory, which is one below the site root directory. only by lucky chance did i read some post somewhere, that talked about putting it in the site root directory, where it started working for me. when
i put it in the app directory, .net complained about the authentication directive no matter what it was.
about that direct url access to images etc., up till now anyway, i thought that was a function of the webserver. i know you can control that in apache, for sure and would guess it would be available in iis as well.