1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP.NET Newbie Question - CompilerVersion

Discussion in 'C#' started by jms.heath, Feb 9, 2008.

  1. #1
    I'm new to Digital Point, and I am new to ASP.NET.
    I like the look of some of the discussable topics around here and will do my best to help others as much as they can help me.

    I have a question for some of you ASP.NET pro's. It's a fairly basic question, but after a fair bit of research I have had little luck in tracking down the problem myself. My situation is this:

    I have downloaded and installed Microsoft Visual Web Developer (most recent release as of post date). I have configured a new ASP.NET FTP based site with my hosting provider (Fasthosts). Fasthosts offer little information on exactly which version of ASP.NET they have installed on their servers, but based on the error reports I am getting, it is apparently Microsoft .NET Framework Version:2.0.50727.832.

    After publishing my site which has nothing in it (just the standard new default.aspx page), I recieve the following error:

    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: Child nodes not allowed.
    Source Error:
    Line 117:        <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
    Line 118:                  type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    Line 119:          <providerOption name="CompilerVersion" value="v3.5"/>
    Line 120:          <providerOption name="WarnAsError" value="false"/>
    Line 121:        </compiler>
    Source File: e:\domains\d\digitalme.eu\user\htdocs\web.config    Line: 119
    Code (markup):
    Im guessing the issue here is that <providerOption name="CompilerVersion" value="v3.5"/> is set to the wrong ASP.NET version. However when I change the value to "v2.0", I still get the same error.

    If anyone out there has some experience on this seemingly problematic error, please reply.

    Many thanks in reply!

    jms.heath, Feb 9, 2008 IP
  2. mascix

    mascix Active Member

    Likes Received:
    Best Answers:
    Trophy Points:
    it says provideroption is not allowed. you need to remove those lines. as you said your host gives asp.net 2 and in asp.net2 there is no config like that. and you used vs.net 2008 it makes things complexer. you need to configure your vs.net to support asp.net 2 version.

    I dont remember any compiler tag from my web.configs :)
    mascix, Feb 9, 2008 IP
  3. ScepterMT

    ScepterMT Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    Your problem is deeper than just setting the compiler version in web.config. The assemblies that your site is running on are still v3.5. Go back into visual web developer and under the Website menu select Start Options. Then click on build in the menu to the left and select .Net Framework 2.0 as the Target Framework for your solution. Now rebuild your website and upload it to your host. If you have build errors they probably stem from using v3.5 features in your code. If so you'll either have to redesign your site to make it v2.0 friendly or find a host that supports v3.5.
    ScepterMT, Feb 10, 2008 IP