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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Error in the Web Service

Error in the Web Service

Scheduled Pinned Locked Moved ASP.NET
helpcsharpvisual-studiosysadminxml
1 Posts 1 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.
  • A Offline
    A Offline
    Aashutoshkumar
    wrote on last edited by
    #1

    Hi All, I have a problem in my web service application. I have created the web service in visual studio 2005 in which a method ReceiveMsg(string strMessage) accept the string(in Xml format) from the client and created the xml file. The web service is hosted on the IP(.203) , when I access this service from another IP(.73) it working fine and return “SUCCESS”. But when the client accesses this service they receive the “Fail” message. I have created the log file for this method. When client access this method a message “string instance not set to an instance of the string” is inserted into the log file. Following is the code of the ReceiveMsg(string strMessage) method. [WebMethod] public string ReceiveMsg(string strMessage) { string strFinalResponse = null; try { strFinalResponse = "SUCCESS"; intNo++; // this is static variable. string strdocPath; strdocPath = "C:\\RQFEED\\RQ"+intNo+".XML"; Byte[] docbinaryarray = Encoding.GetEncoding(1253).GetBytes(strMessage); FileStream objfilestream = new FileStream(strdocPath, FileMode.Create, FileAccess.ReadWrite); objfilestream.Write(docbinaryarray, 0, docbinaryarray.Length); objfilestream.Close(); CreateLogFiles Err = new CreateLogFiles(); Err.ErrorLog(Server.MapPath("Logs/ErrorLog"), strMessage); return strFinalResponse; } catch (Exception ex) { strFinalResponse = "FAIL"; CreateLogFiles Err = new CreateLogFiles(); Err.ErrorLog(Server.MapPath("Logs/ErrorLog"), ex.Message); return strFinalResponse; } } Please help me as asap. Thanks with Regards Ashutosh Kumar

    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