URGENT * PLEASE - problem when sending mail - C# - Framework 1.1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?B?RulybmFz?=

    URGENT * PLEASE - problem when sending mail - C# - Framework 1.1

    Hey all,

    I have a URGENT problem and I hope someone could help me...

    scenery:
    I have a windows app, coded using C# (framework 1.1 - VS2003)... The

    exe and dlls of the app is are stored in a server, and the clients

    access this app through a shortcut that points to this. The folder of

    the app is shared on the network. This app accesses a oracle database.
    I'm using system.web.mail namespace..

    The users/clients can access the app with no problem, everything ok.

    But when I try to send mails, I get an exception...

    When I'm debuging the app and running it local, the e-mail is sent,

    but when I copy it to the server and access the app through the

    network, i get the error...

    So here are my question:

    - What's the name given to this programming model (user/client

    accessing exes on a server)?
    - What are the requirements to accomplish this task according to this

    programming model?
    - Do the client pcs need something special to send the mail?

    Thanks for your help and sorry for poor english.
  • Leon Jollans

    #2
    Re: URGENT * PLEASE - problem when sending mail - C# - Framework 1.1

    The exception should give you some clues as to what the problem is. You
    don't say if you're accessing the app on a mapped drive or a UNC share, but
    I suspect it's a security issue where either the runtime is not letting you
    access network resources because you launched it remotely, or your
    application is trying to load an associated dll from the server folder and
    being denied access.

    I suggest either
    a) mapping a drive to access the executable over, rather than a UNC network
    path, or if that doesn't work
    b) redeploy your application on your webserver directly and migrate the app
    to call a web service on the originating server to send the mail

    Leon

    "Férnas" <garbage@widewe b.com.brwrote in message
    news:c286694d-bb25-4cd0-b842-de9604b235f6@d7 7g2000hsb.googl egroups.com...
    Hey all,
    >
    I have a URGENT problem and I hope someone could help me...
    >
    scenery:
    I have a windows app, coded using C# (framework 1.1 - VS2003)... The
    >
    exe and dlls of the app is are stored in a server, and the clients
    >
    access this app through a shortcut that points to this. The folder of
    >
    the app is shared on the network. This app accesses a oracle database.
    I'm using system.web.mail namespace..
    >
    The users/clients can access the app with no problem, everything ok.
    >
    But when I try to send mails, I get an exception...
    >
    When I'm debuging the app and running it local, the e-mail is sent,
    >
    but when I copy it to the server and access the app through the
    >
    network, i get the error...
    >
    So here are my question:
    >
    - What's the name given to this programming model (user/client
    >
    accessing exes on a server)?
    - What are the requirements to accomplish this task according to this
    >
    programming model?
    - Do the client pcs need something special to send the mail?
    >
    Thanks for your help and sorry for poor english.

    Comment

    • Alberto Poblacion

      #3
      Re: URGENT * PLEASE - problem when sending mail - C# - Framework 1.1

      It does really look like a Code Access Security problem, since the
      application runs correctly from the local PC but fails when run from the
      server, which by default would give it greatly reduced permissions.

      The text of the exception should give you more detailed information about
      exactly which permission you are missing. As a test, I would suggest that
      you go to the Administrative Tools in Control Panel and use the .NET
      Framework Configuration tool to assign Full Trust to your assemblies (the
      ..exe and dll's of your program). If the program runs correctly under Full
      Trust (it should) you can then trim down the permissions until you grant the
      minimum needed.

      Once you have established a correct security configuration, you can then use
      the same .NET Framework Configuration tool to generate a .msi that will set
      those permissions when run in any other computer. You will have to
      distribute and execute the .msi on all the computers in your network that
      require access to the application that you are sharing in your server. You
      can, for instance, set a policy that says "grant Full Trust to all
      assemblies loaded from Server X", or "grant Full Trust to all assemblies
      signed with this Key" (and sign with that key your deployed assemblies).



      "Férnas" <garbage@widewe b.com.brwrote in message
      news:c286694d-bb25-4cd0-b842-de9604b235f6@d7 7g2000hsb.googl egroups.com...
      Hey all,
      >
      I have a URGENT problem and I hope someone could help me...
      >
      scenery:
      I have a windows app, coded using C# (framework 1.1 - VS2003)... The
      >
      exe and dlls of the app is are stored in a server, and the clients
      >
      access this app through a shortcut that points to this. The folder of
      >
      the app is shared on the network. This app accesses a oracle database.
      I'm using system.web.mail namespace..
      >
      The users/clients can access the app with no problem, everything ok.
      >
      But when I try to send mails, I get an exception...
      >
      When I'm debuging the app and running it local, the e-mail is sent,
      >
      but when I copy it to the server and access the app through the
      >
      network, i get the error...
      >
      So here are my question:
      >
      - What's the name given to this programming model (user/client
      >
      accessing exes on a server)?
      - What are the requirements to accomplish this task according to this
      >
      programming model?
      - Do the client pcs need something special to send the mail?
      >
      Thanks for your help and sorry for poor english.

      Comment

      Working...