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. ASP.NET
  4. Web service

Web service

Scheduled Pinned Locked Moved ASP.NET
csharpwindows-adminhelp
2 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.
  • A Offline
    A Offline
    anandhakrishnan
    wrote on last edited by
    #1

    Hi, I have created a web service and i have created the msi file. I deployed the Web service in the IIS by running the msi file. If any exceptions occur during the WS call i want log the exceptions in to a file. I have given the file path in the web.config file. Until or unless i create a directory with write permission, its not creating the file in the mentioned path. for ex: path : c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt If the dont create the ErrorLog folder with write permission its showing the c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt denied message. Is there any way to create directory with write permission through the c# code itself or the above is the only way to log the message. Please help me. With Regards, Anand

    A 1 Reply Last reply
    0
    • A anandhakrishnan

      Hi, I have created a web service and i have created the msi file. I deployed the Web service in the IIS by running the msi file. If any exceptions occur during the WS call i want log the exceptions in to a file. I have given the file path in the web.config file. Until or unless i create a directory with write permission, its not creating the file in the mentioned path. for ex: path : c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt If the dont create the ErrorLog folder with write permission its showing the c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt denied message. Is there any way to create directory with write permission through the c# code itself or the above is the only way to log the message. Please help me. With Regards, Anand

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      anandhakrishnan wrote:

      If the dont create the ErrorLog folder with write permission its showing the c:\Inetpub\wwwroot\webservice\ErrorLog\ErrorLog.txt denied message.

      There are Two Solution for that. 1. If you are using IIS 6.0 or above, Create a separate Application Pool, Change the identity of Application to "Local System", By default it is "Network Service", which is having minimum privilege on your system and that will not allow you to write on server. Change the Identity of Application Pool to "Local System", Assign the Application Pool to you virtual Directory. Then Try. It will work :) 2. Give the Right Permission to All th user to that file. I will suggest you to go for application pool. Let me know if any other issue.

      cheers, Abhijit CodeProject MVP

      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