Results 1 to 13 of 13

Thread: [RESOLVED] C# Web Service publish problem(S)

  1. #1

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Resolved [RESOLVED] C# Web Service publish problem(S)

    OK I created a web service in C# with the default "HelloWorld" Class and a second Class of my design (OK copied from another example).

    I was able to "run" it from the IDE, after a web.config tweak.

    However when I publish it to C:\Inetpub\wwroot\MyWebService, and I then browse to it using IE, I get the following error page:

    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: Unrecognized configuration section 'connectionStrings'

    Source Error:


    Line 10: <configuration>
    Line 11: <appSettings/>
    Line 12: <connectionStrings/>
    Line 13: <system.web>
    Line 14: <webServices>


    Source File: c:\inetpub\wwwroot\MyFlexService\web.config Line: 12


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
    Last edited by Dave Sell; May 1st, 2009 at 02:34 PM.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  2. #2

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem

    OK I delete lines 11+12 out of that web.config but still have error:

    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 29: ASP.NET to identify an incoming user.
    Line 30: -->
    Line 31: <authentication mode="Windows"/>
    Line 32: <!--
    Line 33: The <customErrors> section enables configuration


    Source File: c:\inetpub\wwwroot\MyFlexService\web.config Line: 31


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
    Attached Files Attached Files
    Last edited by Dave Sell; May 1st, 2009 at 02:36 PM.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  3. #3

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem

    OK I went to IIS Mangler and went to the WebFolder, right-click, properties.

    On the Directory Tab, I did a "Create Application", but still get an error:

    Server Error in '/MyFlexService' Application.--------------------------------------------------------------------------------

    Parser Error
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not create type 'Service'.

    Source Error:


    Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %>



    Source File: c:\inetpub\wwwroot\MyFlexService\Service.asmx Line: 1


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: C# Web Service publish problem(S)

    The answer is at the bottom of the error message - you're running a .NET 2.0 application on .NET 1.1. Does your server have .NET 2.0?

  5. #5

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem(S)

    It should - Let me try to change this.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: C# Web Service publish problem(S)

    Did it work?

  7. #7

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem(S)

    Yes, sorry for the delayed response. I am still baffled why a default project doesn't work.

    ie... I'm not sure why I needed to do the web.config tweak. Let me look into this again this week to see if all my problems are related to the IIS ASP.NET (1.0 or 2.0) setting.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: C# Web Service publish problem(S)

    Your default, in IIS, is probably set to 1.1. If you have no (other) important apps in IIS, you can right click on default website and set it to use (under the ASP.NET tab) ASP.NET 2.0. New virtual directories will then use .NET 2.0.

  9. #9

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem(S)

    It is already default ASP.NET = 2.0...
    Attached Images Attached Images  
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: C# Web Service publish problem(S)

    Right click default website, create a new virtual directory. Look at its properties. What do you get?

  11. #11

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem(S)

    This is it.
    Attached Images Attached Images  
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: C# Web Service publish problem(S)

    OK, so I wonder if that was only a temporary thing.

    Create a new .NET 2.0 web app in VS 2005. In the project properties, web tab, there is a button which lets you create a new IIS virtual directory. Try that out. Then publish/run the app...

  13. #13

    Thread Starter
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: C# Web Service publish problem(S)

    OK so my 2 problems were:

    a) Default webseite needs to be ASP.NET 2.0, and
    b) machine.config file needs a tweek , see http://www.vbforums.com/showthread.php?t=567742

    I think these problems are resolved now.
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width