Web applikation i .NET C# med Visual Studio 2008
Hej eksperterJeg har kastet mig ud i at lære ASP.NET med C# i Visual Studio 2008. Jeg har lavet en meget simpel applikation (næsten alt er generet automatisk fra deres wizard), som kører fint lokalt. Men hvis jeg prøver at lægge den op på min webserver hos Surftown får jeg følgende fejl:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
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.
Source Error:
Line 25: -->
Line 26:
Line 27: <authentication mode="Windows" />
Line 28:
Line 29: <!--
og min Web.config fil ser således ud:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<customErrors mode ="Off" />
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
Jeg har selv været inde og tilføje customErrors mode = "Off", da det var hvad jeg kunne læse mig frem til af løsninger, men det hjalp ikke. Jeg kører desuden i .NET version 2.0, da surftown ikke understøtter højere.
Jeg er på rimelig bar bund med det problem her - om jeg skal ind og rette noget hos surftown eller i koden ved jeg ikke engang.
Håber på I kan hjælpe.
På forhånd tak.
Venlig hilsen
Peter Damgaard