locked
publishing ASP.NET web services issue with VS2008 and IIS 5.1 RRS feed

  • Question

  • User830945118 posted

    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 :).

     

    Friday, July 8, 2011 9:05 AM

Answers

  • User830945118 posted

    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.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, July 11, 2011 8:26 AM

All replies

  • User1839162291 posted
    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?
    Saturday, July 9, 2011 1:47 AM
  • User830945118 posted

    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. 

    Saturday, July 9, 2011 3:32 AM
  • User830945118 posted

    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!
    ^

     

    Monday, July 11, 2011 3:15 AM
  • User830945118 posted

    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.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Monday, July 11, 2011 8:26 AM
  • User-1672167363 posted

    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

     

    Monday, July 11, 2011 8:33 AM
  • User830945118 posted

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

    Tuesday, July 12, 2011 4:53 AM