We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

publishing ASP.NET web services issue with VS2008 and IIS 5.1 [Answered]RSS

6 replies

Last post Jul 12, 2011 04:53 AM by mthpvg

  • publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 08, 2011 09:05 AM|mthpvg|LINK

    Hello,

    I work with these : VS2008, IIS 5.1, XP SP3.

    So I made an ASP.NET web service application which contains :

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

    public class Service : System.Web.Services.WebService
    {
        public static int valeur = 42; //I know that's ugly

        public Service () {
        }
        [WebMethod]
        public string valueIs(){
            return "value is : " + valeur.ToString();
        }
        [System.Web.Services.WebMethod()]
        public string setValue(int newValue){
            value = newValue;
            return "new value is " + value.ToString();
        }
    }


    With ctrl+F5 in ASP.NET Development Server everything's fine.

    But then I want to use IIS 5.1. So I try  Build>Publish web site and put "http://localhost/momaws2" for target location and I just check use fixed naming.

     So then I see the folder momaws with IIS. But when I type "http://localhost/momaws/Service.asmx" I get :

    The XML page cannot be displayed

    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


    Invalid at the top level of the document. Error processing resource 'http://localhost/dog/Service.asmx'. Line 1, Position 1

    This is a marker file generated by the precompilation tool, and should not be deleted!
    ^

    I really miss a lot of things there.

     

    Thanks for your time :).

     

  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 09, 2011 01:47 AM|Sahishnu|LINK

    Hi, You try to run "http://localhost/momaws/Service.asmx" and end up with an error in 'http://localhost/dog/Service.asmx' ? Try going to IIS -> wwwroot -> momaws -> Service.asmx. Right click on service.asmx and choose Browse. What does it say now?
  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 09, 2011 03:32 AM|mthpvg|LINK

    Ok I'll try that on monday... I feel stupid :S. Ayway these 3 folders were all attempts of doing the same thing, so it may no be the issue but if it is I am stupid.

    Thanks, I'll let you know about that try. 

  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 11, 2011 03:15 AM|mthpvg|LINK

    So now everything is in the same directory : same problem.

    When I try "browse", I get :

    The XML page cannot be displayed

    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


    Invalid at the top level of the document. Error processing resource 'http://localhost/cameleon/Service.asmx'. Line 1, Posi...

    This is a marker file generated by the precompilation tool, and should not be deleted!
    ^

     

  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 11, 2011 08:26 AM|mthpvg|LINK

    Well I gave up on this one.

    I install mono for windows and with xsp it works like a charm.

    With VS2008 publish your web site in the folder : C:\PROGRA~1\MONO-2~1.7\lib\xsp\test\MyWebSite

    Create a file startXsp.bat with these lines :

    @echo off
    call C:\PROGRA~1\MONO-2~1.7\bin\setmonopath.bat
    cd /D C:\PROGRA~1\MONO-2~1.7\lib\xsp\test\MyWebSite
    xsp2 --address yourIPAdress --root . --port 8080 --applications /:.

    launch startXsp.bat

     in your browser :

    http://yourIPAdress:8080/Service.asmx

    And it works... it's not IIS but it is still ASP.NET.

  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 11, 2011 08:33 AM|HCamper|LINK

    Hello,

    Either way you got the service.

    Since your using Mono for Windows you might try

    Mono Develop also.

    General Disclaimer: Mono and Mono Develop are not Microsoft Supported Producted or suggested Solutions.

    Cheers :)

    Martin

     

    Windows and Linux work Together IT-Pros
    Community Member Award 2011
  • Re: publishing ASP.NET web services issue with VS2008 and IIS 5.1

    Jul 12, 2011 04:53 AM|mthpvg|LINK

    I''ll take a look to Mono Develop. Thanks for the free advice :).