Professional Web Applications Themes

Web Services, Remoting, Network Security headache - ASP.NET Web Services

I have a web service that is accessed from the Internet. From that service I want to call into a remoting server that will create a doent that is returned as a DIME attachment. So far so good. The problem comes within the remoting server. The server calls a service which, in turn executes an exe and passes to it a pregenerated file containing a list of parameters for the doent generation. The exe's job is to read the parameter file, connect to a database, generate the doent, and exit. The exe performs flawlessly if all the resources for generating ...

  1. #1

    Default Web Services, Remoting, Network Security headache

    I have a web service that is accessed from the Internet. From that service
    I want to call into a remoting server that will create a doent that is
    returned as a DIME attachment. So far so good. The problem comes within
    the remoting server.

    The server calls a service which, in turn executes an exe and passes to it a
    pregenerated file containing a list of parameters for the doent
    generation. The exe's job is to read the parameter file, connect to a
    database, generate the doent, and exit. The exe performs flawlessly if
    all the resources for generating the doent are on the local machine.
    However that will not be the case in the production environment. All the
    doent templates will reside on network share drives and this is where I
    am running into trouble. Once the exe begins referencing the network
    shares, I am seeing the following exception:

    System.IO.IOException: Logon failure: unknown user name or bad password.

    at System.IO.__Error.WinIOError(Int32 errorCode, String str)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share, Int32 bufferSize, Boolean useAsync, String
    msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share)
    at System.IO.File.Open(String path, FileMode mode)
    at MergeDoc.Merge.GetFile()

    I understand the reason for this - that the context of the ASPNET account
    does not have the authority and is not recognized by the Domain. However, I
    have tried without success to do the following:

    1) Impersonation - I have impersonated a valid domain account for the entire
    Web Service Application and I have impersonated at the code block level
    without success.
    2) Assert - I have tried a number of different variations of asserts using
    the FileIOPermission object but have not had any success here either. I
    must admit that I am fairly green to the System.Security.Permissions objects
    and functionality so I may be missing something here.

    Can anybody tell me if this is an issue that I am ever going to solve and if
    so, point me in the right direction?

    Thanks in advance.
    Charlie
    charlie Guest

  2. #2

    Default Web Services, Remoting, Network Security headache

    I have a web service that is accessed from the Internet. From that service
    I want to call into a remoting server that will create a doent that is
    returned as a DIME attachment. So far so good. The problem comes within
    the remoting server.

    The server calls a service which, in turn executes an exe and passes to it a
    pregenerated file containing a list of parameters for the doent
    generation. The exe's job is to read the parameter file, connect to a
    database, generate the doent, and exit. The exe performs flawlessly if
    all the resources for generating the doent are on the local machine.
    However that will not be the case in the production environment. All the
    doent templates will reside on network share drives and this is where I
    am running into trouble. Once the exe begins referencing the network
    shares, I am seeing the following exception:

    System.IO.IOException: Logon failure: unknown user name or bad password.

    at System.IO.__Error.WinIOError(Int32 errorCode, String str)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share, Int32 bufferSize, Boolean useAsync, String
    msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share)
    at System.IO.File.Open(String path, FileMode mode)
    at MergeDoc.Merge.GetFile()

    I understand the reason for this - that the context of the ASPNET account
    does not have the authority and is not recognized by the Domain. However, I
    have tried without success to do the following:

    1) Impersonation - I have impersonated a valid domain account for the entire
    Web Service Application and I have impersonated at the code block level
    without success.
    2) Assert - I have tried a number of different variations of asserts using
    the FileIOPermission object but have not had any success here either. I
    must admit that I am fairly green to the System.Security.Permissions objects
    and functionality so I may be missing something here.

    Can anybody tell me if this is an issue that I am ever going to solve and if
    so, point me in the right direction?

    Thanks in advance.
    Charlie
    charlie Guest

Similar Threads

  1. Difference between remoting and web services?
    By msnews.microsoft.com in forum ASP.NET Web Services
    Replies: 2
    Last Post: January 21st, 04:32 PM
  2. .NET Remoting & Web Services in TierDeveloper
    By janie in forum ASP.NET Web Services
    Replies: 0
    Last Post: September 24th, 06:02 AM
  3. .NET Remoting & Web Services with TierDeveloper
    By janie in forum ASP.NET Web Services
    Replies: 0
    Last Post: September 16th, 10:57 AM
  4. Web Services vs. Remoting
    By Mike Malter in forum ASP.NET Web Services
    Replies: 2
    Last Post: September 23rd, 08:38 AM
  5. What should I use: Remoting or Web Services ?
    By David Michal in forum ASP.NET Web Services
    Replies: 1
    Last Post: August 26th, 09:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139