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. web service solution

web service solution

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpquestion
10 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.
  • M Offline
    M Offline
    maxiachun
    wrote on last edited by
    #1

    i want to implement a webservice with windows application, and the webservice can create a txt file, but i just can not create this file on the server using streamwriter it says the path is denied, how can i solve this problem I am Entry level person

    M 1 Reply Last reply
    0
    • M maxiachun

      i want to implement a webservice with windows application, and the webservice can create a txt file, but i just can not create this file on the server using streamwriter it says the path is denied, how can i solve this problem I am Entry level person

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      You need to grant the ASP.NET process identity the write permission to the folder which contains the text file .txt. For more information, you can see: Process and request identity in ASP.NET[^]

      M 1 Reply Last reply
      0
      • M minhpc_bk

        You need to grant the ASP.NET process identity the write permission to the folder which contains the text file .txt. For more information, you can see: Process and request identity in ASP.NET[^]

        M Offline
        M Offline
        maxiachun
        wrote on last edited by
        #3

        if i want to send this file to another machine which is not the request machine is that possible ? I am Entry level person

        M 1 Reply Last reply
        0
        • M maxiachun

          if i want to send this file to another machine which is not the request machine is that possible ? I am Entry level person

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Your question IMO is quite vague. That all depends on what you need, so the answer might yes or no. Could you be more specific about what you want to do?

          M 1 Reply Last reply
          0
          • M minhpc_bk

            Your question IMO is quite vague. That all depends on what you need, so the answer might yes or no. Could you be more specific about what you want to do?

            M Offline
            M Offline
            maxiachun
            wrote on last edited by
            #5

            i have a windows application can make a request to the webservice, then the webservice deals with these request data and be able to create a Txt file with these data then send to another machine. if you have Email, i can pass some graph to you as well! I am Entry level person

            M 1 Reply Last reply
            0
            • M maxiachun

              i have a windows application can make a request to the webservice, then the webservice deals with these request data and be able to create a Txt file with these data then send to another machine. if you have Email, i can pass some graph to you as well! I am Entry level person

              M Offline
              M Offline
              minhpc_bk
              wrote on last edited by
              #6

              + If your web service is directly trying to save the file in another machine, then basically the account that your service runs under should have the permissions to that remote machine. + Another way is that you have another process running on another machine, and this process is resposible for receiving the data sent from the web service and saving it to disk.

              maxiachun wrote:

              if you have Email, i can pass some graph to you as well!

              Could you post it here so that people can give you a hand or a better idea?

              M 1 Reply Last reply
              0
              • M minhpc_bk

                + If your web service is directly trying to save the file in another machine, then basically the account that your service runs under should have the permissions to that remote machine. + Another way is that you have another process running on another machine, and this process is resposible for receiving the data sent from the web service and saving it to disk.

                maxiachun wrote:

                if you have Email, i can pass some graph to you as well!

                Could you post it here so that people can give you a hand or a better idea?

                M Offline
                M Offline
                maxiachun
                wrote on last edited by
                #7

                There is a Windows application sitting on Client A can make a request to the server which has a web service on it, then the server can create a Text file send to B and C, there is another windows application sitting on B and C which can read the text file then deal with the data included in the Txt file, and talk to database. i think for me the second solution is better. but how it works ? Can you give me some specific thing such as functions and reading material i can have a look and read?1 I am Entry level person

                M 1 Reply Last reply
                0
                • M maxiachun

                  There is a Windows application sitting on Client A can make a request to the server which has a web service on it, then the server can create a Text file send to B and C, there is another windows application sitting on B and C which can read the text file then deal with the data included in the Txt file, and talk to database. i think for me the second solution is better. but how it works ? Can you give me some specific thing such as functions and reading material i can have a look and read?1 I am Entry level person

                  M Offline
                  M Offline
                  minhpc_bk
                  wrote on last edited by
                  #8

                  In fact, there are a couple of options to do that + The windows applications running on the machines B, C can host a web service that is resposible for receiving the notification about the text file. You can read the article[^] to see you can run a web service without IIS. + You can use the .Net remoting here. Basically, the window application host an object that the web service can remotely access. Once the text file is genererated, the service can notify the window applications via this object. For more information, you can read the documentation: .NET Remoting Overview[^] + The web service can use the Messaging[^] to notify the window applications about the text file .txt + The window applications can listen to a change made to a common/shared directory that the web service is able to save the file. If the file is generated, the applications can detect that and read the file. Just some ideas.

                  M 1 Reply Last reply
                  0
                  • M minhpc_bk

                    In fact, there are a couple of options to do that + The windows applications running on the machines B, C can host a web service that is resposible for receiving the notification about the text file. You can read the article[^] to see you can run a web service without IIS. + You can use the .Net remoting here. Basically, the window application host an object that the web service can remotely access. Once the text file is genererated, the service can notify the window applications via this object. For more information, you can read the documentation: .NET Remoting Overview[^] + The web service can use the Messaging[^] to notify the window applications about the text file .txt + The window applications can listen to a change made to a common/shared directory that the web service is able to save the file. If the file is generated, the applications can detect that and read the file. Just some ideas.

                    M Offline
                    M Offline
                    maxiachun
                    wrote on last edited by
                    #9

                    i have a webservice under C:\Inetpub\wwwroot\RetrieveData\ now i want this web service create a txt file under this folder i have changed the permission of this folder to write as well, but still when i run this webservice i get a exception which is C:\Inetpub\wwwroot\RetrieveData\ the path is denied! how to solve this problem ? pls help me! thank you very much! I am Entry level person

                    M 1 Reply Last reply
                    0
                    • M maxiachun

                      i have a webservice under C:\Inetpub\wwwroot\RetrieveData\ now i want this web service create a txt file under this folder i have changed the permission of this folder to write as well, but still when i run this webservice i get a exception which is C:\Inetpub\wwwroot\RetrieveData\ the path is denied! how to solve this problem ? pls help me! thank you very much! I am Entry level person

                      M Offline
                      M Offline
                      minhpc_bk
                      wrote on last edited by
                      #10

                      Hi there, From the error message, I still might think that the account that your web service runs under does not have the proper permission to the folder. Can you tell me in details how you have granted the permission to the ASPNET account (or NetworkService if you are using IIS 6). Are you sure that you select the right account to grant the permission?

                      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