Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Help, problem with Web Service (ASP.NET, VWD 2005, XP, IIS 5.1)

Help, problem with Web Service (ASP.NET, VWD 2005, XP, IIS 5.1)

Scheduled Pinned Locked Moved Web Development
helpcsharpquestionasp-netwindows-admin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DoomedOne
    wrote on last edited by
    #1

    Hi I’m trying to create a Web Service with Visual Web Developer 2005 (C#), Win XP Pro SP2 (Spanish), IIS 5.1. it works ok from de debug option, but when I try to call it directly from the browser I get the following error: Referencia a objeto no establecida como instancia de un objeto (Object reference not set to an instance of an object) NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.] System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1618 System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +593 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 This is whit de standard code generated by default by VWD. Any ideas of what is wrong? :( Walter Charrière

    B 1 Reply Last reply
    0
    • D DoomedOne

      Hi I’m trying to create a Web Service with Visual Web Developer 2005 (C#), Win XP Pro SP2 (Spanish), IIS 5.1. it works ok from de debug option, but when I try to call it directly from the browser I get the following error: Referencia a objeto no establecida como instancia de un objeto (Object reference not set to an instance of an object) NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.] System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1618 System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +593 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 This is whit de standard code generated by default by VWD. Any ideas of what is wrong? :( Walter Charrière

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #2

      I don't know too much about ASP.net, but unless that script creates a WDSL then you should not access it unless making a soap request.


      Brad Australian - Christian Graus on "Best books for VBscript" A big thick one, so you can whack yourself on the head with it.

      D 1 Reply Last reply
      0
      • B Bradml

        I don't know too much about ASP.net, but unless that script creates a WDSL then you should not access it unless making a soap request.


        Brad Australian - Christian Graus on "Best books for VBscript" A big thick one, so you can whack yourself on the head with it.

        D Offline
        D Offline
        DoomedOne
        wrote on last edited by
        #3

        Hi The .wsdl file is there, an accesing it from a web page whit a post request. Here is the full code: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------< Web Service File: Service.asmx <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------< File: Service.cs (in APP_Code sub dir) using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://localhost/WebServices")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { public Service () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public string[] ListaCiudades() { string[] Ciudades = new string[30]; Ciudades[0] = "Asunción"; Ciudades[1] = "Belmopan"; Ciudades[2] = "Bogota"; Ciudades[3] = "Brasilia"; Ciudades[4] = "Bridgetown"; Ciudades[5] = "Buenos Aires"; Ciudades[6] = "Caracas"; Ciudades[7] = "Georgetown"; Ciudades[8] = "Guatemala"; Ciudades[9] = "Kingston"; Ciudades[10] = "La Habana"; Ciudades[11] = "La Paz"; Ciudades[12] = "Lima"; Ciudades[13] = "Managua"; Ciudades[14] = "Mexico"; Ciudades[15] = "Montevideo"; Ciudades[16] = "Nassau"; Ciudades[17] = "Otawa"; Ciudades[18] = "Panama"; Ciudades[19] = "Paramaribo"; Ciudades[20] = "Puerto España"; Ciudades[21] = "Puerto Príncipe"; Ciudades[22] = "Quito"; Ciudades[23] = "San José"; Ciudades[24] = "San Salvador"; Ciudades[25] = "Santiago"; Ciudades[26] = "Santo Domingo"; Ciudades[27] = "Sucre"; Ciudades[28] = "Tegusigalpa"; Ciudades[29] = "Washington"; return Ciudades; } } --------------------------------------------------------------------------------------------------------------------------------------------------------------------- File: Service.asmx.wsdl (generated by http:/

        D 1 Reply Last reply
        0
        • D DoomedOne

          Hi The .wsdl file is there, an accesing it from a web page whit a post request. Here is the full code: ---------------------------------------------------------------------------------------------------------------------------------------------------------------------< Web Service File: Service.asmx <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------< File: Service.cs (in APP_Code sub dir) using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://localhost/WebServices")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { public Service () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public string[] ListaCiudades() { string[] Ciudades = new string[30]; Ciudades[0] = "Asunción"; Ciudades[1] = "Belmopan"; Ciudades[2] = "Bogota"; Ciudades[3] = "Brasilia"; Ciudades[4] = "Bridgetown"; Ciudades[5] = "Buenos Aires"; Ciudades[6] = "Caracas"; Ciudades[7] = "Georgetown"; Ciudades[8] = "Guatemala"; Ciudades[9] = "Kingston"; Ciudades[10] = "La Habana"; Ciudades[11] = "La Paz"; Ciudades[12] = "Lima"; Ciudades[13] = "Managua"; Ciudades[14] = "Mexico"; Ciudades[15] = "Montevideo"; Ciudades[16] = "Nassau"; Ciudades[17] = "Otawa"; Ciudades[18] = "Panama"; Ciudades[19] = "Paramaribo"; Ciudades[20] = "Puerto España"; Ciudades[21] = "Puerto Príncipe"; Ciudades[22] = "Quito"; Ciudades[23] = "San José"; Ciudades[24] = "San Salvador"; Ciudades[25] = "Santiago"; Ciudades[26] = "Santo Domingo"; Ciudades[27] = "Sucre"; Ciudades[28] = "Tegusigalpa"; Ciudades[29] = "Washington"; return Ciudades; } } --------------------------------------------------------------------------------------------------------------------------------------------------------------------- File: Service.asmx.wsdl (generated by http:/

          D Offline
          D Offline
          DoomedOne
          wrote on last edited by
          #4

          Ups!!!, sorry The wsdl is not shown in the prior message, I forget to mark ignore tags. Here iy is:

          D 1 Reply Last reply
          0
          • D DoomedOne

            Ups!!!, sorry The wsdl is not shown in the prior message, I forget to mark ignore tags. Here iy is:

            D Offline
            D Offline
            DoomedOne
            wrote on last edited by
            #5

            Finally I solved the problem. As I think it was an installation problem, to solve y find an article in Microsoft Knowledge Base: See: http://support.microsoft.com/kb/309051 I run in the command line C:>cd %windir%\system32\inetsrv C:>rundll32 wamreg.dll, CreateIISPackage C:>regsvr32 asptxn.dll C:>IISRESET /restart Problem solved. I hope this be of use to someone else, and avoid looking articles and web forums for a month or two to find the answer. :-D :-D

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups